diff options
author | Eliad Peller <eliad@wizery.com> | 2011-10-03 06:06:36 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-10-07 01:31:43 -0400 |
commit | 4b29886feb072427df80ca6395b2b11a09245eaf (patch) | |
tree | 7c45f950da53c8090faffb4ddbe74d0d2be3e3a8 /drivers | |
parent | d6222fb0d669307a49e2a96aad86c156a9bb9551 (diff) |
wl12xx: configure rate policy for p2p operations
p2p packets should go out only with OFDM rates.
Configure a new rate policy that will (later) be used
during p2p_find (when the p2p_cli / p2p_go interfaces
are in use, we won't have to use this policy, as
the configured rates should already be OFDM-only).
Additionally, update CONF_TX_MAX_RATE_CLASSES to reflect
the current value from the fw api.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/acx.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/acx.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/conf.h | 6 |
3 files changed, 22 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c index 399849eeb247..ca044a743191 100644 --- a/drivers/net/wireless/wl12xx/acx.c +++ b/drivers/net/wireless/wl12xx/acx.c | |||
@@ -777,7 +777,23 @@ int wl1271_acx_sta_rate_policies(struct wl1271 *wl) | |||
777 | acx->rate_policy.long_retry_limit = c->long_retry_limit; | 777 | acx->rate_policy.long_retry_limit = c->long_retry_limit; |
778 | acx->rate_policy.aflags = c->aflags; | 778 | acx->rate_policy.aflags = c->aflags; |
779 | 779 | ||
780 | ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx)); | ||
781 | if (ret < 0) { | ||
782 | wl1271_warning("Setting of rate policies failed: %d", ret); | ||
783 | goto out; | ||
784 | } | ||
780 | 785 | ||
786 | /* | ||
787 | * configure one rate class for basic p2p operations. | ||
788 | * (p2p packets should always go out with OFDM rates, even | ||
789 | * if we are currently connected to 11b AP) | ||
790 | */ | ||
791 | acx->rate_policy_idx = cpu_to_le32(ACX_TX_BASIC_RATE_P2P); | ||
792 | acx->rate_policy.enabled_rates = | ||
793 | cpu_to_le32(CONF_TX_RATE_MASK_BASIC_P2P); | ||
794 | acx->rate_policy.short_retry_limit = c->short_retry_limit; | ||
795 | acx->rate_policy.long_retry_limit = c->long_retry_limit; | ||
796 | acx->rate_policy.aflags = c->aflags; | ||
781 | 797 | ||
782 | ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx)); | 798 | ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx)); |
783 | if (ret < 0) { | 799 | if (ret < 0) { |
diff --git a/drivers/net/wireless/wl12xx/acx.h b/drivers/net/wireless/wl12xx/acx.h index 556ee4e282d5..e3f93b4b3429 100644 --- a/drivers/net/wireless/wl12xx/acx.h +++ b/drivers/net/wireless/wl12xx/acx.h | |||
@@ -656,6 +656,7 @@ struct acx_rate_class { | |||
656 | 656 | ||
657 | #define ACX_TX_BASIC_RATE 0 | 657 | #define ACX_TX_BASIC_RATE 0 |
658 | #define ACX_TX_AP_FULL_RATE 1 | 658 | #define ACX_TX_AP_FULL_RATE 1 |
659 | #define ACX_TX_BASIC_RATE_P2P 2 | ||
659 | #define ACX_TX_AP_MODE_MGMT_RATE 4 | 660 | #define ACX_TX_AP_MODE_MGMT_RATE 4 |
660 | #define ACX_TX_AP_MODE_BCST_RATE 5 | 661 | #define ACX_TX_AP_MODE_BCST_RATE 5 |
661 | struct acx_rate_policy { | 662 | struct acx_rate_policy { |
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h index 6a6805c3cc74..04bb8fbf93f9 100644 --- a/drivers/net/wireless/wl12xx/conf.h +++ b/drivers/net/wireless/wl12xx/conf.h | |||
@@ -416,13 +416,17 @@ struct conf_rx_settings { | |||
416 | u8 queue_type; | 416 | u8 queue_type; |
417 | }; | 417 | }; |
418 | 418 | ||
419 | #define CONF_TX_MAX_RATE_CLASSES 8 | 419 | #define CONF_TX_MAX_RATE_CLASSES 10 |
420 | 420 | ||
421 | #define CONF_TX_RATE_MASK_UNSPECIFIED 0 | 421 | #define CONF_TX_RATE_MASK_UNSPECIFIED 0 |
422 | #define CONF_TX_RATE_MASK_BASIC (CONF_HW_BIT_RATE_1MBPS | \ | 422 | #define CONF_TX_RATE_MASK_BASIC (CONF_HW_BIT_RATE_1MBPS | \ |
423 | CONF_HW_BIT_RATE_2MBPS) | 423 | CONF_HW_BIT_RATE_2MBPS) |
424 | #define CONF_TX_RATE_RETRY_LIMIT 10 | 424 | #define CONF_TX_RATE_RETRY_LIMIT 10 |
425 | 425 | ||
426 | /* basic rates for p2p operations (probe req/resp, etc.) */ | ||
427 | #define CONF_TX_RATE_MASK_BASIC_P2P (CONF_HW_BIT_RATE_6MBPS | \ | ||
428 | CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS) | ||
429 | |||
426 | /* | 430 | /* |
427 | * Rates supported for data packets when operating as AP. Note the absence | 431 | * Rates supported for data packets when operating as AP. Note the absence |
428 | * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop | 432 | * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop |