aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/scan.c
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2014-09-12 10:38:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-09-15 15:00:52 -0400
commitcb91be87e12c079fcf25069a21123756c0931dd6 (patch)
treef9307b742d8a7017a34f210cd1e3569cc3e40c42 /drivers/net/wireless/mwifiex/scan.c
parenta9c1c89eea11884243825d473fd3991d943ffc65 (diff)
mwifiex: bring in scan channel gap feature
With scan channel gap when any station/AP is active, FW comes back to connected channel for any pending data transfter after scanning each channel. We set scan channel gap TLV to FW in scan command when any of the interface is active. This enables scan channel gap in FW. Also when scan channel gap is enabled, we would scan maximum channels allowed by FW. Scan channel gap is supported only on FW with V15 FW API. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Marc Yang <yangyang@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> 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.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 0c9ed2c730d7..2f86bb63f3c0 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -799,6 +799,7 @@ mwifiex_config_scan(struct mwifiex_private *priv,
799{ 799{
800 struct mwifiex_adapter *adapter = priv->adapter; 800 struct mwifiex_adapter *adapter = priv->adapter;
801 struct mwifiex_ie_types_num_probes *num_probes_tlv; 801 struct mwifiex_ie_types_num_probes *num_probes_tlv;
802 struct mwifiex_ie_types_scan_chan_gap *chan_gap_tlv;
802 struct mwifiex_ie_types_wildcard_ssid_params *wildcard_ssid_tlv; 803 struct mwifiex_ie_types_wildcard_ssid_params *wildcard_ssid_tlv;
803 struct mwifiex_ie_types_bssid_list *bssid_tlv; 804 struct mwifiex_ie_types_bssid_list *bssid_tlv;
804 u8 *tlv_pos; 805 u8 *tlv_pos;
@@ -939,6 +940,22 @@ mwifiex_config_scan(struct mwifiex_private *priv,
939 else 940 else
940 *max_chan_per_scan = MWIFIEX_DEF_CHANNELS_PER_SCAN_CMD; 941 *max_chan_per_scan = MWIFIEX_DEF_CHANNELS_PER_SCAN_CMD;
941 942
943 if (user_scan_in->scan_chan_gap) {
944 *max_chan_per_scan = MWIFIEX_MAX_CHANNELS_PER_SPECIFIC_SCAN;
945 dev_dbg(adapter->dev, "info: scan: channel gap = %d\n",
946 user_scan_in->scan_chan_gap);
947
948 chan_gap_tlv = (void *)tlv_pos;
949 chan_gap_tlv->header.type =
950 cpu_to_le16(TLV_TYPE_SCAN_CHANNEL_GAP);
951 chan_gap_tlv->header.len =
952 cpu_to_le16(sizeof(chan_gap_tlv->chan_gap));
953 chan_gap_tlv->chan_gap =
954 cpu_to_le16((user_scan_in->scan_chan_gap));
955
956 tlv_pos += sizeof(struct mwifiex_ie_types_scan_chan_gap);
957 }
958
942 /* If the input config or adapter has the number of Probes set, 959 /* If the input config or adapter has the number of Probes set,
943 add tlv */ 960 add tlv */
944 if (num_probes) { 961 if (num_probes) {