aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/acx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/acx.c')
-rw-r--r--drivers/net/wireless/wl12xx/acx.c60
1 files changed, 58 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c
index d6885d7c4256..646d278bd944 100644
--- a/drivers/net/wireless/wl12xx/acx.c
+++ b/drivers/net/wireless/wl12xx/acx.c
@@ -751,9 +751,9 @@ int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats)
751 return 0; 751 return 0;
752} 752}
753 753
754int wl1271_acx_rate_policies(struct wl1271 *wl) 754int wl1271_acx_sta_rate_policies(struct wl1271 *wl)
755{ 755{
756 struct acx_rate_policy *acx; 756 struct acx_sta_rate_policy *acx;
757 struct conf_tx_rate_class *c = &wl->conf.tx.sta_rc_conf; 757 struct conf_tx_rate_class *c = &wl->conf.tx.sta_rc_conf;
758 int idx = 0; 758 int idx = 0;
759 int ret = 0; 759 int ret = 0;
@@ -794,6 +794,38 @@ out:
794 return ret; 794 return ret;
795} 795}
796 796
797int wl1271_acx_ap_rate_policy(struct wl1271 *wl, struct conf_tx_rate_class *c,
798 u8 idx)
799{
800 struct acx_ap_rate_policy *acx;
801 int ret = 0;
802
803 wl1271_debug(DEBUG_ACX, "acx ap rate policy");
804
805 acx = kzalloc(sizeof(*acx), GFP_KERNEL);
806 if (!acx) {
807 ret = -ENOMEM;
808 goto out;
809 }
810
811 acx->rate_policy.enabled_rates = cpu_to_le32(c->enabled_rates);
812 acx->rate_policy.short_retry_limit = c->short_retry_limit;
813 acx->rate_policy.long_retry_limit = c->long_retry_limit;
814 acx->rate_policy.aflags = c->aflags;
815
816 acx->rate_policy_idx = idx;
817
818 ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx));
819 if (ret < 0) {
820 wl1271_warning("Setting of ap rate policy failed: %d", ret);
821 goto out;
822 }
823
824out:
825 kfree(acx);
826 return ret;
827}
828
797int wl1271_acx_ac_cfg(struct wl1271 *wl, u8 ac, u8 cw_min, u16 cw_max, 829int wl1271_acx_ac_cfg(struct wl1271 *wl, u8 ac, u8 cw_min, u16 cw_max,
798 u8 aifsn, u16 txop) 830 u8 aifsn, u16 txop)
799{ 831{
@@ -1335,3 +1367,27 @@ out:
1335 kfree(tsf_info); 1367 kfree(tsf_info);
1336 return ret; 1368 return ret;
1337} 1369}
1370
1371int wl1271_acx_max_tx_retry(struct wl1271 *wl)
1372{
1373 struct wl1271_acx_max_tx_retry *acx = NULL;
1374 int ret;
1375
1376 wl1271_debug(DEBUG_ACX, "acx max tx retry");
1377
1378 acx = kzalloc(sizeof(*acx), GFP_KERNEL);
1379 if (!acx)
1380 return -ENOMEM;
1381
1382 acx->max_tx_retry = cpu_to_le16(wl->conf.tx.ap_max_tx_retries);
1383
1384 ret = wl1271_cmd_configure(wl, ACX_MAX_TX_FAILURE, acx, sizeof(*acx));
1385 if (ret < 0) {
1386 wl1271_warning("acx max tx retry failed: %d", ret);
1387 goto out;
1388 }
1389
1390out:
1391 kfree(acx);
1392 return ret;
1393}