summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2015-01-09 14:15:52 -0500
committerKalle Valo <kvalo@codeaurora.org>2015-01-23 19:12:12 +0200
commite26dc173a66ab3de38fbb8d71b58dbb72e29d6c9 (patch)
treee12750564432d803ce843ea53ea8d83a044342e3 /drivers/net/wireless/ath/wcn36xx/wcn36xx.h
parent5f3f928585b22aada39f87611df75bac4a12a6c7 (diff)
downloadtalos-obmc-linux-e26dc173a66ab3de38fbb8d71b58dbb72e29d6c9.tar.gz
talos-obmc-linux-e26dc173a66ab3de38fbb8d71b58dbb72e29d6c9.zip
wcn36xx: initiate TX BA sessions
Currently, wcn36xx only asks for a TX BA session if it has already established one for RX. Thus, two wcn36xx devices cannot do a-mpdu between themselves since they both wait for the other to go first. Fix this by starting a BA session after a few QoS data frames have been sent to a STA. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wcn36xx/wcn36xx.h')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/wcn36xx.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
index f0fb81dfd17b..7b41e833e18c 100644
--- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
+++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
@@ -32,6 +32,9 @@
#define WLAN_NV_FILE "wlan/prima/WCNSS_qcom_wlan_nv.bin"
#define WCN36XX_AGGR_BUFFER_SIZE 64
+/* How many frames until we start a-mpdu TX session */
+#define WCN36XX_AMPDU_START_THRESH 20
+
extern unsigned int wcn36xx_dbg_mask;
enum wcn36xx_debug_mask {
@@ -74,6 +77,13 @@ enum wcn36xx_debug_mask {
buf, len, false); \
} while (0)
+enum wcn36xx_ampdu_state {
+ WCN36XX_AMPDU_NONE,
+ WCN36XX_AMPDU_INIT,
+ WCN36XX_AMPDU_START,
+ WCN36XX_AMPDU_OPERATIONAL,
+};
+
#define WCN36XX_HW_CHANNEL(__wcn) (__wcn->hw->conf.chandef.chan->hw_value)
#define WCN36XX_BAND(__wcn) (__wcn->hw->conf.chandef.chan->band)
#define WCN36XX_CENTER_FREQ(__wcn) (__wcn->hw->conf.chandef.chan->center_freq)
@@ -165,6 +175,10 @@ struct wcn36xx_sta {
bool is_data_encrypted;
/* Rates */
struct wcn36xx_hal_supported_rates supported_rates;
+
+ spinlock_t ampdu_lock; /* protects next two fields */
+ enum wcn36xx_ampdu_state ampdu_state[16];
+ int non_agg_frame_ct;
};
struct wcn36xx_dxe_ch;
struct wcn36xx {
@@ -243,4 +257,10 @@ static inline bool wcn36xx_is_fw_version(struct wcn36xx *wcn,
}
void wcn36xx_set_default_rates(struct wcn36xx_hal_supported_rates *rates);
+static inline
+struct ieee80211_sta *wcn36xx_priv_to_sta(struct wcn36xx_sta *sta_priv)
+{
+ return container_of((void *)sta_priv, struct ieee80211_sta, drv_priv);
+}
+
#endif /* _WCN36XX_H_ */
OpenPOWER on IntegriCloud