aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/main.h
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/main.h
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/main.h')
-rw-r--r--drivers/net/wireless/mwifiex/main.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index 54399631599a..c3d097ce2c16 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -84,6 +84,7 @@ enum {
84#define MWIFIEX_PASSIVE_SCAN_CHAN_TIME 110 84#define MWIFIEX_PASSIVE_SCAN_CHAN_TIME 110
85#define MWIFIEX_ACTIVE_SCAN_CHAN_TIME 30 85#define MWIFIEX_ACTIVE_SCAN_CHAN_TIME 30
86#define MWIFIEX_SPECIFIC_SCAN_CHAN_TIME 30 86#define MWIFIEX_SPECIFIC_SCAN_CHAN_TIME 30
87#define MWIFIEX_DEF_SCAN_CHAN_GAP_TIME 50
87 88
88#define SCAN_RSSI(RSSI) (0x100 - ((u8)(RSSI))) 89#define SCAN_RSSI(RSSI) (0x100 - ((u8)(RSSI)))
89 90
@@ -770,6 +771,7 @@ struct mwifiex_adapter {
770 u16 specific_scan_time; 771 u16 specific_scan_time;
771 u16 active_scan_time; 772 u16 active_scan_time;
772 u16 passive_scan_time; 773 u16 passive_scan_time;
774 u16 scan_chan_gap_time;
773 u8 fw_bands; 775 u8 fw_bands;
774 u8 adhoc_start_band; 776 u8 adhoc_start_band;
775 u8 config_bands; 777 u8 config_bands;
@@ -839,6 +841,7 @@ struct mwifiex_adapter {
839 struct memory_type_mapping *mem_type_mapping_tbl; 841 struct memory_type_mapping *mem_type_mapping_tbl;
840 u8 num_mem_types; 842 u8 num_mem_types;
841 u8 curr_mem_idx; 843 u8 curr_mem_idx;
844 bool scan_chan_gap_enabled;
842}; 845};
843 846
844int mwifiex_init_lock_list(struct mwifiex_adapter *adapter); 847int mwifiex_init_lock_list(struct mwifiex_adapter *adapter);
@@ -1139,6 +1142,25 @@ mwifiex_11h_get_csa_closed_channel(struct mwifiex_private *priv)
1139 return priv->csa_chan; 1142 return priv->csa_chan;
1140} 1143}
1141 1144
1145static inline u8 mwifiex_is_any_intf_active(struct mwifiex_private *priv)
1146{
1147 struct mwifiex_private *priv_num;
1148 int i;
1149
1150 for (i = 0; i < priv->adapter->priv_num; i++) {
1151 priv_num = priv->adapter->priv[i];
1152 if (priv_num) {
1153 if ((GET_BSS_ROLE(priv_num) == MWIFIEX_BSS_ROLE_UAP &&
1154 priv_num->bss_started) ||
1155 (GET_BSS_ROLE(priv_num) == MWIFIEX_BSS_ROLE_STA &&
1156 priv_num->media_connected))
1157 return 1;
1158 }
1159 }
1160
1161 return 0;
1162}
1163
1142int mwifiex_init_shutdown_fw(struct mwifiex_private *priv, 1164int mwifiex_init_shutdown_fw(struct mwifiex_private *priv,
1143 u32 func_init_shutdown); 1165 u32 func_init_shutdown);
1144int mwifiex_add_card(void *, struct semaphore *, struct mwifiex_if_ops *, u8); 1166int mwifiex_add_card(void *, struct semaphore *, struct mwifiex_if_ops *, u8);
@@ -1274,6 +1296,7 @@ void mwifiex_disable_all_tdls_links(struct mwifiex_private *priv);
1274bool mwifiex_is_bss_in_11ac_mode(struct mwifiex_private *priv); 1296bool mwifiex_is_bss_in_11ac_mode(struct mwifiex_private *priv);
1275u8 mwifiex_get_center_freq_index(struct mwifiex_private *priv, u8 band, 1297u8 mwifiex_get_center_freq_index(struct mwifiex_private *priv, u8 band,
1276 u32 pri_chan, u8 chan_bw); 1298 u32 pri_chan, u8 chan_bw);
1299int mwifiex_init_channel_scan_gap(struct mwifiex_adapter *adapter);
1277 1300
1278#ifdef CONFIG_DEBUG_FS 1301#ifdef CONFIG_DEBUG_FS
1279void mwifiex_debugfs_init(void); 1302void mwifiex_debugfs_init(void);