aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl1251/acx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl1251/acx.c')
-rw-r--r--drivers/net/wireless/wl1251/acx.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl1251/acx.c b/drivers/net/wireless/wl1251/acx.c
index 64a0214cfb29..ef8370edace7 100644
--- a/drivers/net/wireless/wl1251/acx.c
+++ b/drivers/net/wireless/wl1251/acx.c
@@ -776,6 +776,31 @@ out:
776 return ret; 776 return ret;
777} 777}
778 778
779int wl1251_acx_low_rssi(struct wl1251 *wl, s8 threshold, u8 weight,
780 u8 depth, enum wl1251_acx_low_rssi_type type)
781{
782 struct acx_low_rssi *rssi;
783 int ret;
784
785 wl1251_debug(DEBUG_ACX, "acx low rssi");
786
787 rssi = kzalloc(sizeof(*rssi), GFP_KERNEL);
788 if (!rssi)
789 return -ENOMEM;
790
791 rssi->threshold = threshold;
792 rssi->weight = weight;
793 rssi->depth = depth;
794 rssi->type = type;
795
796 ret = wl1251_cmd_configure(wl, ACX_LOW_RSSI, rssi, sizeof(*rssi));
797 if (ret < 0)
798 wl1251_warning("failed to set low rssi threshold: %d", ret);
799
800 kfree(rssi);
801 return ret;
802}
803
779int wl1251_acx_set_preamble(struct wl1251 *wl, enum acx_preamble_type preamble) 804int wl1251_acx_set_preamble(struct wl1251 *wl, enum acx_preamble_type preamble)
780{ 805{
781 struct acx_preamble *acx; 806 struct acx_preamble *acx;
@@ -978,6 +1003,34 @@ out:
978 return ret; 1003 return ret;
979} 1004}
980 1005
1006int wl1251_acx_bet_enable(struct wl1251 *wl, enum wl1251_acx_bet_mode mode,
1007 u8 max_consecutive)
1008{
1009 struct wl1251_acx_bet_enable *acx;
1010 int ret;
1011
1012 wl1251_debug(DEBUG_ACX, "acx bet enable");
1013
1014 acx = kzalloc(sizeof(*acx), GFP_KERNEL);
1015 if (!acx) {
1016 ret = -ENOMEM;
1017 goto out;
1018 }
1019
1020 acx->enable = mode;
1021 acx->max_consecutive = max_consecutive;
1022
1023 ret = wl1251_cmd_configure(wl, ACX_BET_ENABLE, acx, sizeof(*acx));
1024 if (ret < 0) {
1025 wl1251_warning("wl1251 acx bet enable failed: %d", ret);
1026 goto out;
1027 }
1028
1029out:
1030 kfree(acx);
1031 return ret;
1032}
1033
981int wl1251_acx_ac_cfg(struct wl1251 *wl, u8 ac, u8 cw_min, u16 cw_max, 1034int wl1251_acx_ac_cfg(struct wl1251 *wl, u8 ac, u8 cw_min, u16 cw_max,
982 u8 aifs, u16 txop) 1035 u8 aifs, u16 txop)
983{ 1036{