summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/ie.c
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2015-01-28 10:24:24 (GMT)
committerKalle Valo <kvalo@codeaurora.org>2015-01-29 08:22:10 (GMT)
commit7d652034d1a08bd240c98727bbd55901a174c245 (patch)
treea8473d503aeb2e51a70a59b10ff3d10871807280 /drivers/net/wireless/mwifiex/ie.c
parent3b57c1a713a9dd3b8da74b6df9f16ce1f8f9144b (diff)
downloadlinux-7d652034d1a08bd240c98727bbd55901a174c245.tar.xz
mwifiex: channel switch support for mwifiex
This patch adds cfg80211 channel_switch support for mwifiex. Upon receiving channel switch request, driver would parse channel switch announcement IE from beacon_data. If TX is blocked, netdev queues are stopped. IEs from csa_beacon are then parsed and set to FW. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Qingshui Gao <gaoqs@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex/ie.c')
-rw-r--r--drivers/net/wireless/mwifiex/ie.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/ie.c b/drivers/net/wireless/mwifiex/ie.c
index a6af7b8..f3b6ed2 100644
--- a/drivers/net/wireless/mwifiex/ie.c
+++ b/drivers/net/wireless/mwifiex/ie.c
@@ -325,6 +325,7 @@ static int mwifiex_uap_set_head_tail_ies(struct mwifiex_private *priv,
{
struct mwifiex_ie *gen_ie;
struct ieee_types_header *rsn_ie = NULL, *wpa_ie = NULL;
+ struct ieee_types_header *chsw_ie = NULL;
u16 gen_idx = MWIFIEX_AUTO_IDX_MASK, ie_len = 0;
const u8 *vendor_ie;
@@ -356,9 +357,18 @@ static int mwifiex_uap_set_head_tail_ies(struct mwifiex_private *priv,
ie_len += wpa_ie->len + 2;
gen_ie->ie_length = cpu_to_le16(ie_len);
}
+
+ chsw_ie = (void *)cfg80211_find_ie(WLAN_EID_CHANNEL_SWITCH,
+ info->tail, info->tail_len);
+ if (chsw_ie) {
+ memcpy(gen_ie->ie_buffer + ie_len,
+ chsw_ie, chsw_ie->len + 2);
+ ie_len += chsw_ie->len + 2;
+ gen_ie->ie_length = cpu_to_le16(ie_len);
+ }
}
- if (rsn_ie || wpa_ie) {
+ if (rsn_ie || wpa_ie || chsw_ie) {
if (mwifiex_update_uap_custom_ie(priv, gen_ie, &gen_idx, NULL,
NULL, NULL, NULL)) {
kfree(gen_ie);