diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2010-02-18 06:25:40 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-02-19 15:52:43 -0500 |
commit | f2054df5170734eacd1db82138c70746ec8387de (patch) | |
tree | 9f7e42ea3a48b1ee2a6df02cefba46ba5630357a /drivers | |
parent | 243eeb51eaa0a33caeff3e2275b2460eea5579ec (diff) |
wl1271: modify wl1271_acx_tid_cfg() to use function parameters
For WMM we need to configure each tid separately so modify
wl1271_acx_tid_cfg() to take the configuration from function parameters
instead.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_acx.c | 31 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_acx.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_init.c | 16 |
3 files changed, 31 insertions, 20 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.c b/drivers/net/wireless/wl12xx/wl1271_acx.c index 4b052eedbd4b..60f10dce4800 100644 --- a/drivers/net/wireless/wl12xx/wl1271_acx.c +++ b/drivers/net/wireless/wl12xx/wl1271_acx.c | |||
@@ -863,10 +863,12 @@ out: | |||
863 | return ret; | 863 | return ret; |
864 | } | 864 | } |
865 | 865 | ||
866 | int wl1271_acx_tid_cfg(struct wl1271 *wl) | 866 | int wl1271_acx_tid_cfg(struct wl1271 *wl, u8 queue_id, u8 channel_type, |
867 | u8 tsid, u8 ps_scheme, u8 ack_policy, | ||
868 | u32 apsd_conf0, u32 apsd_conf1) | ||
867 | { | 869 | { |
868 | struct acx_tid_config *acx; | 870 | struct acx_tid_config *acx; |
869 | int i, ret = 0; | 871 | int ret = 0; |
870 | 872 | ||
871 | wl1271_debug(DEBUG_ACX, "acx tid config"); | 873 | wl1271_debug(DEBUG_ACX, "acx tid config"); |
872 | 874 | ||
@@ -877,21 +879,18 @@ int wl1271_acx_tid_cfg(struct wl1271 *wl) | |||
877 | goto out; | 879 | goto out; |
878 | } | 880 | } |
879 | 881 | ||
880 | for (i = 0; i < wl->conf.tx.tid_conf_count; i++) { | 882 | acx->queue_id = queue_id; |
881 | struct conf_tx_tid *c = &(wl->conf.tx.tid_conf[i]); | 883 | acx->channel_type = channel_type; |
882 | acx->queue_id = c->queue_id; | 884 | acx->tsid = tsid; |
883 | acx->channel_type = c->channel_type; | 885 | acx->ps_scheme = ps_scheme; |
884 | acx->tsid = c->tsid; | 886 | acx->ack_policy = ack_policy; |
885 | acx->ps_scheme = c->ps_scheme; | 887 | acx->apsd_conf[0] = cpu_to_le32(apsd_conf0); |
886 | acx->ack_policy = c->ack_policy; | 888 | acx->apsd_conf[1] = cpu_to_le32(apsd_conf1); |
887 | acx->apsd_conf[0] = cpu_to_le32(c->apsd_conf[0]); | ||
888 | acx->apsd_conf[1] = cpu_to_le32(c->apsd_conf[1]); | ||
889 | 889 | ||
890 | ret = wl1271_cmd_configure(wl, ACX_TID_CFG, acx, sizeof(*acx)); | 890 | ret = wl1271_cmd_configure(wl, ACX_TID_CFG, acx, sizeof(*acx)); |
891 | if (ret < 0) { | 891 | if (ret < 0) { |
892 | wl1271_warning("Setting of tid config failed: %d", ret); | 892 | wl1271_warning("Setting of tid config failed: %d", ret); |
893 | goto out; | 893 | goto out; |
894 | } | ||
895 | } | 894 | } |
896 | 895 | ||
897 | out: | 896 | out: |
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.h b/drivers/net/wireless/wl12xx/wl1271_acx.h index e5f5cbd7f0ea..ac94a13ea747 100644 --- a/drivers/net/wireless/wl12xx/wl1271_acx.h +++ b/drivers/net/wireless/wl12xx/wl1271_acx.h | |||
@@ -1072,7 +1072,9 @@ int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats); | |||
1072 | int wl1271_acx_rate_policies(struct wl1271 *wl); | 1072 | int wl1271_acx_rate_policies(struct wl1271 *wl); |
1073 | int wl1271_acx_ac_cfg(struct wl1271 *wl, u8 ac, u8 cw_min, u16 cw_max, | 1073 | int wl1271_acx_ac_cfg(struct wl1271 *wl, u8 ac, u8 cw_min, u16 cw_max, |
1074 | u8 aifsn, u16 txop); | 1074 | u8 aifsn, u16 txop); |
1075 | int wl1271_acx_tid_cfg(struct wl1271 *wl); | 1075 | int wl1271_acx_tid_cfg(struct wl1271 *wl, u8 queue_id, u8 channel_type, |
1076 | u8 tsid, u8 ps_scheme, u8 ack_policy, | ||
1077 | u32 apsd_conf0, u32 apsd_conf1); | ||
1076 | int wl1271_acx_frag_threshold(struct wl1271 *wl); | 1078 | int wl1271_acx_frag_threshold(struct wl1271 *wl); |
1077 | int wl1271_acx_tx_config_options(struct wl1271 *wl); | 1079 | int wl1271_acx_tx_config_options(struct wl1271 *wl); |
1078 | int wl1271_acx_mem_cfg(struct wl1271 *wl); | 1080 | int wl1271_acx_mem_cfg(struct wl1271 *wl); |
diff --git a/drivers/net/wireless/wl12xx/wl1271_init.c b/drivers/net/wireless/wl12xx/wl1271_init.c index 2b56a9ecd7f2..78403daab949 100644 --- a/drivers/net/wireless/wl12xx/wl1271_init.c +++ b/drivers/net/wireless/wl12xx/wl1271_init.c | |||
@@ -196,6 +196,7 @@ static int wl1271_init_beacon_broadcast(struct wl1271 *wl) | |||
196 | int wl1271_hw_init(struct wl1271 *wl) | 196 | int wl1271_hw_init(struct wl1271 *wl) |
197 | { | 197 | { |
198 | struct conf_tx_ac_category *conf_ac; | 198 | struct conf_tx_ac_category *conf_ac; |
199 | struct conf_tx_tid *conf_tid; | ||
199 | int ret, i; | 200 | int ret, i; |
200 | 201 | ||
201 | ret = wl1271_cmd_general_parms(wl); | 202 | ret = wl1271_cmd_general_parms(wl); |
@@ -275,9 +276,18 @@ int wl1271_hw_init(struct wl1271 *wl) | |||
275 | goto out_free_memmap; | 276 | goto out_free_memmap; |
276 | 277 | ||
277 | /* Default TID configuration */ | 278 | /* Default TID configuration */ |
278 | ret = wl1271_acx_tid_cfg(wl); | 279 | for (i = 0; i < wl->conf.tx.tid_conf_count; i++) { |
279 | if (ret < 0) | 280 | conf_tid = &wl->conf.tx.tid_conf[i]; |
280 | goto out_free_memmap; | 281 | ret = wl1271_acx_tid_cfg(wl, conf_tid->queue_id, |
282 | conf_tid->channel_type, | ||
283 | conf_tid->tsid, | ||
284 | conf_tid->ps_scheme, | ||
285 | conf_tid->ack_policy, | ||
286 | conf_tid->apsd_conf[0], | ||
287 | conf_tid->apsd_conf[1]); | ||
288 | if (ret < 0) | ||
289 | goto out_free_memmap; | ||
290 | } | ||
281 | 291 | ||
282 | /* Default AC configuration */ | 292 | /* Default AC configuration */ |
283 | for (i = 0; i < wl->conf.tx.ac_conf_count; i++) { | 293 | for (i = 0; i < wl->conf.tx.ac_conf_count; i++) { |