diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2013-06-18 19:36:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-06-19 15:28:43 -0400 |
commit | b887664d882ee4f6a67e0bf05e5f141d32fcc067 (patch) | |
tree | 743c252756bcdfc8d129a594ee52a99085d42477 /drivers/net/wireless/mwifiex/scan.c | |
parent | 2a7305c88d245f104c3d6bd3babafb029fd07477 (diff) |
mwifiex: channel switch handling for station
After receiving channel switch announcement from AP, scan and
association on that channel is blocked for DFS_CHAN_MOVE_TIME
(10 seconds). Hence station will be able to connect to the AP,
once it is moved to new channel.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/scan.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/scan.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index 284d68bf6acc..c447d9bd1aa9 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c | |||
@@ -575,6 +575,9 @@ mwifiex_scan_channel_list(struct mwifiex_private *priv, | |||
575 | return -1; | 575 | return -1; |
576 | } | 576 | } |
577 | 577 | ||
578 | /* Check csa channel expiry before preparing scan list */ | ||
579 | mwifiex_11h_get_csa_closed_channel(priv); | ||
580 | |||
578 | chan_tlv_out->header.type = cpu_to_le16(TLV_TYPE_CHANLIST); | 581 | chan_tlv_out->header.type = cpu_to_le16(TLV_TYPE_CHANLIST); |
579 | 582 | ||
580 | /* Set the temp channel struct pointer to the start of the desired | 583 | /* Set the temp channel struct pointer to the start of the desired |
@@ -604,6 +607,11 @@ mwifiex_scan_channel_list(struct mwifiex_private *priv, | |||
604 | while (tlv_idx < max_chan_per_scan && | 607 | while (tlv_idx < max_chan_per_scan && |
605 | tmp_chan_list->chan_number && !done_early) { | 608 | tmp_chan_list->chan_number && !done_early) { |
606 | 609 | ||
610 | if (tmp_chan_list->chan_number == priv->csa_chan) { | ||
611 | tmp_chan_list++; | ||
612 | continue; | ||
613 | } | ||
614 | |||
607 | dev_dbg(priv->adapter->dev, | 615 | dev_dbg(priv->adapter->dev, |
608 | "info: Scan: Chan(%3d), Radio(%d)," | 616 | "info: Scan: Chan(%3d), Radio(%d)," |
609 | " Mode(%d, %d), Dur(%d)\n", | 617 | " Mode(%d, %d), Dur(%d)\n", |
@@ -1594,6 +1602,9 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, | |||
1594 | goto check_next_scan; | 1602 | goto check_next_scan; |
1595 | } | 1603 | } |
1596 | 1604 | ||
1605 | /* Check csa channel expiry before parsing scan response */ | ||
1606 | mwifiex_11h_get_csa_closed_channel(priv); | ||
1607 | |||
1597 | bytes_left = le16_to_cpu(scan_rsp->bss_descript_size); | 1608 | bytes_left = le16_to_cpu(scan_rsp->bss_descript_size); |
1598 | dev_dbg(adapter->dev, "info: SCAN_RESP: bss_descript_size %d\n", | 1609 | dev_dbg(adapter->dev, "info: SCAN_RESP: bss_descript_size %d\n", |
1599 | bytes_left); | 1610 | bytes_left); |
@@ -1746,6 +1757,13 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, | |||
1746 | struct ieee80211_channel *chan; | 1757 | struct ieee80211_channel *chan; |
1747 | u8 band; | 1758 | u8 band; |
1748 | 1759 | ||
1760 | /* Skip entry if on csa closed channel */ | ||
1761 | if (channel == priv->csa_chan) { | ||
1762 | dev_dbg(adapter->dev, | ||
1763 | "Dropping entry on csa closed channel\n"); | ||
1764 | continue; | ||
1765 | } | ||
1766 | |||
1749 | band = BAND_G; | 1767 | band = BAND_G; |
1750 | if (chan_band_tlv) { | 1768 | if (chan_band_tlv) { |
1751 | chan_band = | 1769 | chan_band = |