summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lin <dlin@marvell.com>2016-08-23 11:16:12 +0800
committerDavid Lin <dlin@marvell.com>2016-08-23 11:16:12 +0800
commit43ddf0c156fd8c7ace2b080bbed0867887e6ca4f (patch)
tree5a53c2f685ca9c11487e9b2ceb220390f94f5440
parent58fe09164f187f5a28e4dceea5628414dd398a4a (diff)
Added basic rate for assoc request.
Signed-off-by: David Lin <dlin@marvell.com>
-rw-r--r--tx.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/tx.c b/tx.c
index a7bffe7..83812c4 100644
--- a/tx.c
+++ b/tx.c
@@ -824,6 +824,38 @@ void mwl_tx_xmit(struct ieee80211_hw *hw,
tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;
index = mwl_tx_tid_queue_mapping(tid);
}
+
+ if (unlikely(ieee80211_is_assoc_req(wh->frame_control))) {
+ int len;
+ u8 *pos;
+
+ len = skb->len - ieee80211_hdrlen(wh->frame_control);
+ len -= 4;
+ pos = (u8 *)cfg80211_find_ie(WLAN_EID_SUPP_RATES,
+ mgmt->u.assoc_req.variable,
+ len);
+ if (pos) {
+ pos++;
+ len = *pos++;
+ while (len) {
+ if (hw->conf.chandef.chan->band
+ == IEEE80211_BAND_2GHZ) {
+ if ((*pos == 2) ||
+ (*pos == 4) ||
+ (*pos == 11) ||
+ (*pos == 22))
+ *pos |= 0x80;
+ } else {
+ if ((*pos == 12) ||
+ (*pos == 24) ||
+ (*pos == 48))
+ *pos |= 0x80;
+ }
+ pos++;
+ len--;
+ }
+ }
+ }
}
index = SYSADPT_TX_WMM_QUEUES - index - 1;