diff options
-rw-r--r-- | drivers/net/wireless/ti/wl12xx/main.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl12xx/scan.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/main.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/scan.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/scan.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/scan.h | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/wlcore.h | 1 |
7 files changed, 21 insertions, 6 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c index ada7031777cc..0c81eeb4f5b8 100644 --- a/drivers/net/wireless/ti/wl12xx/main.c +++ b/drivers/net/wireless/ti/wl12xx/main.c | |||
@@ -704,6 +704,7 @@ static int wl12xx_identify_chip(struct wl1271 *wl) | |||
704 | wl->scan_templ_id_5 = CMD_TEMPL_APP_PROBE_REQ_5_LEGACY; | 704 | wl->scan_templ_id_5 = CMD_TEMPL_APP_PROBE_REQ_5_LEGACY; |
705 | wl->sched_scan_templ_id_2_4 = CMD_TEMPL_CFG_PROBE_REQ_2_4; | 705 | wl->sched_scan_templ_id_2_4 = CMD_TEMPL_CFG_PROBE_REQ_2_4; |
706 | wl->sched_scan_templ_id_5 = CMD_TEMPL_CFG_PROBE_REQ_5; | 706 | wl->sched_scan_templ_id_5 = CMD_TEMPL_CFG_PROBE_REQ_5; |
707 | wl->max_channels_5 = WL12XX_MAX_CHANNELS_5GHZ; | ||
707 | out: | 708 | out: |
708 | return ret; | 709 | return ret; |
709 | } | 710 | } |
diff --git a/drivers/net/wireless/ti/wl12xx/scan.h b/drivers/net/wireless/ti/wl12xx/scan.h index bd075dec5946..264af7ac2785 100644 --- a/drivers/net/wireless/ti/wl12xx/scan.h +++ b/drivers/net/wireless/ti/wl12xx/scan.h | |||
@@ -26,6 +26,8 @@ | |||
26 | #include "../wlcore/cmd.h" | 26 | #include "../wlcore/cmd.h" |
27 | #include "../wlcore/scan.h" | 27 | #include "../wlcore/scan.h" |
28 | 28 | ||
29 | #define WL12XX_MAX_CHANNELS_5GHZ 23 | ||
30 | |||
29 | struct basic_scan_params { | 31 | struct basic_scan_params { |
30 | /* Scan option flags (WL1271_SCAN_OPT_*) */ | 32 | /* Scan option flags (WL1271_SCAN_OPT_*) */ |
31 | __le16 scan_options; | 33 | __le16 scan_options; |
@@ -107,7 +109,7 @@ struct wl1271_cmd_sched_scan_config { | |||
107 | u8 role_id; | 109 | u8 role_id; |
108 | u8 padding[1]; | 110 | u8 padding[1]; |
109 | struct conn_scan_ch_params channels_2[MAX_CHANNELS_2GHZ]; | 111 | struct conn_scan_ch_params channels_2[MAX_CHANNELS_2GHZ]; |
110 | struct conn_scan_ch_params channels_5[MAX_CHANNELS_5GHZ]; | 112 | struct conn_scan_ch_params channels_5[WL12XX_MAX_CHANNELS_5GHZ]; |
111 | struct conn_scan_ch_params channels_4[MAX_CHANNELS_4GHZ]; | 113 | struct conn_scan_ch_params channels_4[MAX_CHANNELS_4GHZ]; |
112 | } __packed; | 114 | } __packed; |
113 | 115 | ||
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index 97c23c8dd5e9..e81b3518d288 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c | |||
@@ -636,6 +636,7 @@ static int wl18xx_identify_chip(struct wl1271 *wl) | |||
636 | wl->scan_templ_id_5 = CMD_TEMPL_CFG_PROBE_REQ_5; | 636 | wl->scan_templ_id_5 = CMD_TEMPL_CFG_PROBE_REQ_5; |
637 | wl->sched_scan_templ_id_2_4 = CMD_TEMPL_PROBE_REQ_2_4_PERIODIC; | 637 | wl->sched_scan_templ_id_2_4 = CMD_TEMPL_PROBE_REQ_2_4_PERIODIC; |
638 | wl->sched_scan_templ_id_5 = CMD_TEMPL_PROBE_REQ_5_PERIODIC; | 638 | wl->sched_scan_templ_id_5 = CMD_TEMPL_PROBE_REQ_5_PERIODIC; |
639 | wl->max_channels_5 = WL18XX_MAX_CHANNELS_5GHZ; | ||
639 | out: | 640 | out: |
640 | return ret; | 641 | return ret; |
641 | } | 642 | } |
diff --git a/drivers/net/wireless/ti/wl18xx/scan.h b/drivers/net/wireless/ti/wl18xx/scan.h index 404baf17aa28..0e026ecb311e 100644 --- a/drivers/net/wireless/ti/wl18xx/scan.h +++ b/drivers/net/wireless/ti/wl18xx/scan.h | |||
@@ -50,6 +50,8 @@ enum | |||
50 | WL18XX_SCAN_RATE_6 = 2, | 50 | WL18XX_SCAN_RATE_6 = 2, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | #define WL18XX_MAX_CHANNELS_5GHZ 32 | ||
54 | |||
53 | struct wl18xx_cmd_scan_params { | 55 | struct wl18xx_cmd_scan_params { |
54 | struct wl1271_cmd_header header; | 56 | struct wl1271_cmd_header header; |
55 | 57 | ||
@@ -89,7 +91,7 @@ struct wl18xx_cmd_scan_params { | |||
89 | union { | 91 | union { |
90 | struct { | 92 | struct { |
91 | struct conn_scan_ch_params channels_2[MAX_CHANNELS_2GHZ]; | 93 | struct conn_scan_ch_params channels_2[MAX_CHANNELS_2GHZ]; |
92 | struct conn_scan_ch_params channels_5[MAX_CHANNELS_5GHZ]; | 94 | struct conn_scan_ch_params channels_5[WL18XX_MAX_CHANNELS_5GHZ]; |
93 | struct conn_scan_ch_params channels_4[MAX_CHANNELS_4GHZ]; | 95 | struct conn_scan_ch_params channels_4[MAX_CHANNELS_4GHZ]; |
94 | }; | 96 | }; |
95 | struct tracking_ch_params channels_tracking[WL1271_SCAN_MAX_CHANNELS]; | 97 | struct tracking_ch_params channels_tracking[WL1271_SCAN_MAX_CHANNELS]; |
diff --git a/drivers/net/wireless/ti/wlcore/scan.c b/drivers/net/wireless/ti/wlcore/scan.c index 9eab64d1679b..e7d0a02be5b0 100644 --- a/drivers/net/wireless/ti/wlcore/scan.c +++ b/drivers/net/wireless/ti/wlcore/scan.c | |||
@@ -228,7 +228,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, | |||
228 | cfg->channels_5, | 228 | cfg->channels_5, |
229 | IEEE80211_BAND_5GHZ, | 229 | IEEE80211_BAND_5GHZ, |
230 | false, true, 0, | 230 | false, true, 0, |
231 | MAX_CHANNELS_5GHZ, | 231 | wl->max_channels_5, |
232 | &n_pactive_ch); | 232 | &n_pactive_ch); |
233 | cfg->dfs = | 233 | cfg->dfs = |
234 | wlcore_scan_get_channels(wl, | 234 | wlcore_scan_get_channels(wl, |
@@ -239,7 +239,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, | |||
239 | IEEE80211_BAND_5GHZ, | 239 | IEEE80211_BAND_5GHZ, |
240 | true, true, | 240 | true, true, |
241 | cfg->passive[1], | 241 | cfg->passive[1], |
242 | MAX_CHANNELS_5GHZ, | 242 | wl->max_channels_5, |
243 | &n_pactive_ch); | 243 | &n_pactive_ch); |
244 | cfg->active[1] = | 244 | cfg->active[1] = |
245 | wlcore_scan_get_channels(wl, | 245 | wlcore_scan_get_channels(wl, |
@@ -250,7 +250,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, | |||
250 | IEEE80211_BAND_5GHZ, | 250 | IEEE80211_BAND_5GHZ, |
251 | false, false, | 251 | false, false, |
252 | cfg->passive[1] + cfg->dfs, | 252 | cfg->passive[1] + cfg->dfs, |
253 | MAX_CHANNELS_5GHZ, | 253 | wl->max_channels_5, |
254 | &n_pactive_ch); | 254 | &n_pactive_ch); |
255 | 255 | ||
256 | /* 802.11j channels are not supported yet */ | 256 | /* 802.11j channels are not supported yet */ |
diff --git a/drivers/net/wireless/ti/wlcore/scan.h b/drivers/net/wireless/ti/wlcore/scan.h index 25b0422ec989..8465f35c6a06 100644 --- a/drivers/net/wireless/ti/wlcore/scan.h +++ b/drivers/net/wireless/ti/wlcore/scan.h | |||
@@ -71,9 +71,17 @@ struct wl1271_cmd_trigger_scan_to { | |||
71 | } __packed; | 71 | } __packed; |
72 | 72 | ||
73 | #define MAX_CHANNELS_2GHZ 14 | 73 | #define MAX_CHANNELS_2GHZ 14 |
74 | #define MAX_CHANNELS_5GHZ 23 | ||
75 | #define MAX_CHANNELS_4GHZ 4 | 74 | #define MAX_CHANNELS_4GHZ 4 |
76 | 75 | ||
76 | /* | ||
77 | * This max value here is used only for the struct definition of | ||
78 | * wlcore_scan_channels. This struct is used by both 12xx | ||
79 | * and 18xx (which have different max 5ghz channels value). | ||
80 | * In order to make sure this is large enough, just use the | ||
81 | * max possible 5ghz channels. | ||
82 | */ | ||
83 | #define MAX_CHANNELS_5GHZ 42 | ||
84 | |||
77 | #define SCAN_MAX_CYCLE_INTERVALS 16 | 85 | #define SCAN_MAX_CYCLE_INTERVALS 16 |
78 | #define SCAN_MAX_BANDS 3 | 86 | #define SCAN_MAX_BANDS 3 |
79 | 87 | ||
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h index 9f82ee3a4a3a..36fde4e01969 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore.h +++ b/drivers/net/wireless/ti/wlcore/wlcore.h | |||
@@ -382,6 +382,7 @@ struct wl1271 { | |||
382 | u8 scan_templ_id_5; | 382 | u8 scan_templ_id_5; |
383 | u8 sched_scan_templ_id_2_4; | 383 | u8 sched_scan_templ_id_2_4; |
384 | u8 sched_scan_templ_id_5; | 384 | u8 sched_scan_templ_id_5; |
385 | u8 max_channels_5; | ||
385 | 386 | ||
386 | /* per-chip-family private structure */ | 387 | /* per-chip-family private structure */ |
387 | void *priv; | 388 | void *priv; |