diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-09-01 05:31:12 -0400 |
---|---|---|
committer | Luciano Coelho <luciano.coelho@nokia.com> | 2010-09-28 05:30:02 -0400 |
commit | 9987a9da3eda093ceeff14ad4926adb130a0d0ea (patch) | |
tree | 108d8164035b6aa7a4d8883b367ce4b093903665 /drivers/net/wireless/wl12xx | |
parent | ed484a16b495ee7e13cb28fd6ff6053d10657633 (diff) |
wl1271: Fix AC/TID default configuration
The WMM queue default configuration was incorrect, and caused uapsd mode
problems (among possible others.)
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_conf.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_init.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 84 |
3 files changed, 39 insertions, 67 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h index 0435ffda8f73..feb493ebe5bd 100644 --- a/drivers/net/wireless/wl12xx/wl1271_conf.h +++ b/drivers/net/wireless/wl12xx/wl1271_conf.h | |||
@@ -595,7 +595,7 @@ struct conf_tx_ac_category { | |||
595 | u16 tx_op_limit; | 595 | u16 tx_op_limit; |
596 | }; | 596 | }; |
597 | 597 | ||
598 | #define CONF_TX_MAX_TID_COUNT 7 | 598 | #define CONF_TX_MAX_TID_COUNT 8 |
599 | 599 | ||
600 | enum { | 600 | enum { |
601 | CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/ | 601 | CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/ |
diff --git a/drivers/net/wireless/wl12xx/wl1271_init.c b/drivers/net/wireless/wl12xx/wl1271_init.c index 5614a352528b..349571fe04b3 100644 --- a/drivers/net/wireless/wl12xx/wl1271_init.c +++ b/drivers/net/wireless/wl12xx/wl1271_init.c | |||
@@ -290,8 +290,16 @@ int wl1271_hw_init(struct wl1271 *wl) | |||
290 | if (ret < 0) | 290 | if (ret < 0) |
291 | goto out_free_memmap; | 291 | goto out_free_memmap; |
292 | 292 | ||
293 | /* Default TID configuration */ | 293 | /* Default TID/AC configuration */ |
294 | BUG_ON(wl->conf.tx.tid_conf_count != wl->conf.tx.ac_conf_count); | ||
294 | for (i = 0; i < wl->conf.tx.tid_conf_count; i++) { | 295 | for (i = 0; i < wl->conf.tx.tid_conf_count; i++) { |
296 | conf_ac = &wl->conf.tx.ac_conf[i]; | ||
297 | ret = wl1271_acx_ac_cfg(wl, conf_ac->ac, conf_ac->cw_min, | ||
298 | conf_ac->cw_max, conf_ac->aifsn, | ||
299 | conf_ac->tx_op_limit); | ||
300 | if (ret < 0) | ||
301 | goto out_free_memmap; | ||
302 | |||
295 | conf_tid = &wl->conf.tx.tid_conf[i]; | 303 | conf_tid = &wl->conf.tx.tid_conf[i]; |
296 | ret = wl1271_acx_tid_cfg(wl, conf_tid->queue_id, | 304 | ret = wl1271_acx_tid_cfg(wl, conf_tid->queue_id, |
297 | conf_tid->channel_type, | 305 | conf_tid->channel_type, |
@@ -304,16 +312,6 @@ int wl1271_hw_init(struct wl1271 *wl) | |||
304 | goto out_free_memmap; | 312 | goto out_free_memmap; |
305 | } | 313 | } |
306 | 314 | ||
307 | /* Default AC configuration */ | ||
308 | for (i = 0; i < wl->conf.tx.ac_conf_count; i++) { | ||
309 | conf_ac = &wl->conf.tx.ac_conf[i]; | ||
310 | ret = wl1271_acx_ac_cfg(wl, conf_ac->ac, conf_ac->cw_min, | ||
311 | conf_ac->cw_max, conf_ac->aifsn, | ||
312 | conf_ac->tx_op_limit); | ||
313 | if (ret < 0) | ||
314 | goto out_free_memmap; | ||
315 | } | ||
316 | |||
317 | /* Configure TX rate classes */ | 315 | /* Configure TX rate classes */ |
318 | ret = wl1271_acx_rate_policies(wl); | 316 | ret = wl1271_acx_rate_policies(wl); |
319 | if (ret < 0) | 317 | if (ret < 0) |
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index f0c253213cd8..4b8f3662101f 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -124,28 +124,28 @@ static struct conf_drv_settings default_conf = { | |||
124 | }, | 124 | }, |
125 | .ac_conf_count = 4, | 125 | .ac_conf_count = 4, |
126 | .ac_conf = { | 126 | .ac_conf = { |
127 | [0] = { | 127 | [CONF_TX_AC_BE] = { |
128 | .ac = CONF_TX_AC_BE, | 128 | .ac = CONF_TX_AC_BE, |
129 | .cw_min = 15, | 129 | .cw_min = 15, |
130 | .cw_max = 63, | 130 | .cw_max = 63, |
131 | .aifsn = 3, | 131 | .aifsn = 3, |
132 | .tx_op_limit = 0, | 132 | .tx_op_limit = 0, |
133 | }, | 133 | }, |
134 | [1] = { | 134 | [CONF_TX_AC_BK] = { |
135 | .ac = CONF_TX_AC_BK, | 135 | .ac = CONF_TX_AC_BK, |
136 | .cw_min = 15, | 136 | .cw_min = 15, |
137 | .cw_max = 63, | 137 | .cw_max = 63, |
138 | .aifsn = 7, | 138 | .aifsn = 7, |
139 | .tx_op_limit = 0, | 139 | .tx_op_limit = 0, |
140 | }, | 140 | }, |
141 | [2] = { | 141 | [CONF_TX_AC_VI] = { |
142 | .ac = CONF_TX_AC_VI, | 142 | .ac = CONF_TX_AC_VI, |
143 | .cw_min = 15, | 143 | .cw_min = 15, |
144 | .cw_max = 63, | 144 | .cw_max = 63, |
145 | .aifsn = CONF_TX_AIFS_PIFS, | 145 | .aifsn = CONF_TX_AIFS_PIFS, |
146 | .tx_op_limit = 3008, | 146 | .tx_op_limit = 3008, |
147 | }, | 147 | }, |
148 | [3] = { | 148 | [CONF_TX_AC_VO] = { |
149 | .ac = CONF_TX_AC_VO, | 149 | .ac = CONF_TX_AC_VO, |
150 | .cw_min = 15, | 150 | .cw_min = 15, |
151 | .cw_max = 63, | 151 | .cw_max = 63, |
@@ -153,64 +153,40 @@ static struct conf_drv_settings default_conf = { | |||
153 | .tx_op_limit = 1504, | 153 | .tx_op_limit = 1504, |
154 | }, | 154 | }, |
155 | }, | 155 | }, |
156 | .tid_conf_count = 7, | 156 | .tid_conf_count = 4, |
157 | .tid_conf = { | 157 | .tid_conf = { |
158 | [0] = { | 158 | [CONF_TX_AC_BE] = { |
159 | .queue_id = 0, | 159 | .queue_id = CONF_TX_AC_BE, |
160 | .channel_type = CONF_CHANNEL_TYPE_DCF, | 160 | .channel_type = CONF_CHANNEL_TYPE_EDCF, |
161 | .tsid = CONF_TX_AC_BE, | ||
162 | .ps_scheme = CONF_PS_SCHEME_LEGACY, | ||
163 | .ack_policy = CONF_ACK_POLICY_LEGACY, | ||
164 | .apsd_conf = {0, 0}, | ||
165 | }, | ||
166 | [1] = { | ||
167 | .queue_id = 1, | ||
168 | .channel_type = CONF_CHANNEL_TYPE_DCF, | ||
169 | .tsid = CONF_TX_AC_BE, | ||
170 | .ps_scheme = CONF_PS_SCHEME_LEGACY, | ||
171 | .ack_policy = CONF_ACK_POLICY_LEGACY, | ||
172 | .apsd_conf = {0, 0}, | ||
173 | }, | ||
174 | [2] = { | ||
175 | .queue_id = 2, | ||
176 | .channel_type = CONF_CHANNEL_TYPE_DCF, | ||
177 | .tsid = CONF_TX_AC_BE, | 161 | .tsid = CONF_TX_AC_BE, |
178 | .ps_scheme = CONF_PS_SCHEME_LEGACY, | 162 | .ps_scheme = CONF_PS_SCHEME_LEGACY, |
179 | .ack_policy = CONF_ACK_POLICY_LEGACY, | 163 | .ack_policy = CONF_ACK_POLICY_LEGACY, |
180 | .apsd_conf = {0, 0}, | 164 | .apsd_conf = {0, 0}, |
181 | }, | 165 | }, |
182 | [3] = { | 166 | [CONF_TX_AC_BK] = { |
183 | .queue_id = 3, | 167 | .queue_id = CONF_TX_AC_BK, |
184 | .channel_type = CONF_CHANNEL_TYPE_DCF, | 168 | .channel_type = CONF_CHANNEL_TYPE_EDCF, |
185 | .tsid = CONF_TX_AC_BE, | 169 | .tsid = CONF_TX_AC_BK, |
186 | .ps_scheme = CONF_PS_SCHEME_LEGACY, | 170 | .ps_scheme = CONF_PS_SCHEME_LEGACY, |
187 | .ack_policy = CONF_ACK_POLICY_LEGACY, | 171 | .ack_policy = CONF_ACK_POLICY_LEGACY, |
188 | .apsd_conf = {0, 0}, | 172 | .apsd_conf = {0, 0}, |
189 | }, | 173 | }, |
190 | [4] = { | 174 | [CONF_TX_AC_VI] = { |
191 | .queue_id = 4, | 175 | .queue_id = CONF_TX_AC_VI, |
192 | .channel_type = CONF_CHANNEL_TYPE_DCF, | 176 | .channel_type = CONF_CHANNEL_TYPE_EDCF, |
193 | .tsid = CONF_TX_AC_BE, | 177 | .tsid = CONF_TX_AC_VI, |
194 | .ps_scheme = CONF_PS_SCHEME_LEGACY, | 178 | .ps_scheme = CONF_PS_SCHEME_LEGACY, |
195 | .ack_policy = CONF_ACK_POLICY_LEGACY, | 179 | .ack_policy = CONF_ACK_POLICY_LEGACY, |
196 | .apsd_conf = {0, 0}, | 180 | .apsd_conf = {0, 0}, |
197 | }, | 181 | }, |
198 | [5] = { | 182 | [CONF_TX_AC_VO] = { |
199 | .queue_id = 5, | 183 | .queue_id = CONF_TX_AC_VO, |
200 | .channel_type = CONF_CHANNEL_TYPE_DCF, | 184 | .channel_type = CONF_CHANNEL_TYPE_EDCF, |
201 | .tsid = CONF_TX_AC_BE, | 185 | .tsid = CONF_TX_AC_VO, |
202 | .ps_scheme = CONF_PS_SCHEME_LEGACY, | 186 | .ps_scheme = CONF_PS_SCHEME_LEGACY, |
203 | .ack_policy = CONF_ACK_POLICY_LEGACY, | 187 | .ack_policy = CONF_ACK_POLICY_LEGACY, |
204 | .apsd_conf = {0, 0}, | 188 | .apsd_conf = {0, 0}, |
205 | }, | 189 | }, |
206 | [6] = { | ||
207 | .queue_id = 6, | ||
208 | .channel_type = CONF_CHANNEL_TYPE_DCF, | ||
209 | .tsid = CONF_TX_AC_BE, | ||
210 | .ps_scheme = CONF_PS_SCHEME_LEGACY, | ||
211 | .ack_policy = CONF_ACK_POLICY_LEGACY, | ||
212 | .apsd_conf = {0, 0}, | ||
213 | } | ||
214 | }, | 190 | }, |
215 | .frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD, | 191 | .frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD, |
216 | .tx_compl_timeout = 700, | 192 | .tx_compl_timeout = 700, |
@@ -406,8 +382,16 @@ static int wl1271_plt_init(struct wl1271 *wl) | |||
406 | if (ret < 0) | 382 | if (ret < 0) |
407 | goto out_free_memmap; | 383 | goto out_free_memmap; |
408 | 384 | ||
409 | /* Default TID configuration */ | 385 | /* Default TID/AC configuration */ |
386 | BUG_ON(wl->conf.tx.tid_conf_count != wl->conf.tx.ac_conf_count); | ||
410 | for (i = 0; i < wl->conf.tx.tid_conf_count; i++) { | 387 | for (i = 0; i < wl->conf.tx.tid_conf_count; i++) { |
388 | conf_ac = &wl->conf.tx.ac_conf[i]; | ||
389 | ret = wl1271_acx_ac_cfg(wl, conf_ac->ac, conf_ac->cw_min, | ||
390 | conf_ac->cw_max, conf_ac->aifsn, | ||
391 | conf_ac->tx_op_limit); | ||
392 | if (ret < 0) | ||
393 | goto out_free_memmap; | ||
394 | |||
411 | conf_tid = &wl->conf.tx.tid_conf[i]; | 395 | conf_tid = &wl->conf.tx.tid_conf[i]; |
412 | ret = wl1271_acx_tid_cfg(wl, conf_tid->queue_id, | 396 | ret = wl1271_acx_tid_cfg(wl, conf_tid->queue_id, |
413 | conf_tid->channel_type, | 397 | conf_tid->channel_type, |
@@ -420,16 +404,6 @@ static int wl1271_plt_init(struct wl1271 *wl) | |||
420 | goto out_free_memmap; | 404 | goto out_free_memmap; |
421 | } | 405 | } |
422 | 406 | ||
423 | /* Default AC configuration */ | ||
424 | for (i = 0; i < wl->conf.tx.ac_conf_count; i++) { | ||
425 | conf_ac = &wl->conf.tx.ac_conf[i]; | ||
426 | ret = wl1271_acx_ac_cfg(wl, conf_ac->ac, conf_ac->cw_min, | ||
427 | conf_ac->cw_max, conf_ac->aifsn, | ||
428 | conf_ac->tx_op_limit); | ||
429 | if (ret < 0) | ||
430 | goto out_free_memmap; | ||
431 | } | ||
432 | |||
433 | /* Enable data path */ | 407 | /* Enable data path */ |
434 | ret = wl1271_cmd_data_path(wl, 1); | 408 | ret = wl1271_cmd_data_path(wl, 1); |
435 | if (ret < 0) | 409 | if (ret < 0) |