diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-09 13:57:02 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-09 15:18:57 -0400 |
commit | 94597ab23ea10b3bdcba534be00a9f7b35791c07 (patch) | |
tree | f896a856c542b5f4f5623670bcf112a3b83f65a9 /drivers/net/wireless/iwlwifi/iwl-3945.c | |
parent | fe100acddf438591ecf3582cb57241e560da70b7 (diff) |
iwlagn: fix rts cts protection
Currently the driver will try to protect all frames,
which leads to a lot of odd things like sending an
RTS with a zeroed RA before multicast frames, which
is clearly bogus.
In order to fix all of this, we need to take a step
back and see what we need to achieve:
* we need RTS/CTS protection if requested by
the AP for the BSS, mac80211 tells us this
* in that case, CTS-to-self should only be
enabled when mac80211 tells us
* additionally, as a hardware workaround, on
some devices we have to protect aggregated
frames with RTS
To achieve the first two items, set up the RXON
accordingly and set the protection required flag
in the transmit command when mac80211 requests
protection for the frame.
To achieve the last item, set the rate-control
RTS-requested flag for all stations that we have
aggregation sessions with, and set the protection
required flag when sending aggregated frames (on
those devices where this is required).
Since otherwise bugs can occur, do not allow the
user to override the RTS-for-aggregation setting
from sysfs any more.
Finally, also clean up the way all these flags get
set in the driver and move everything into the
device-specific functions.
Cc: stable@kernel.org [2.6.35]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index a07310fefcf2..6950a783913b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -769,22 +769,6 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv, | |||
769 | rts_retry_limit = data_retry_limit; | 769 | rts_retry_limit = data_retry_limit; |
770 | tx_cmd->rts_retry_limit = rts_retry_limit; | 770 | tx_cmd->rts_retry_limit = rts_retry_limit; |
771 | 771 | ||
772 | if (ieee80211_is_mgmt(fc)) { | ||
773 | switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) { | ||
774 | case cpu_to_le16(IEEE80211_STYPE_AUTH): | ||
775 | case cpu_to_le16(IEEE80211_STYPE_DEAUTH): | ||
776 | case cpu_to_le16(IEEE80211_STYPE_ASSOC_REQ): | ||
777 | case cpu_to_le16(IEEE80211_STYPE_REASSOC_REQ): | ||
778 | if (tx_flags & TX_CMD_FLG_RTS_MSK) { | ||
779 | tx_flags &= ~TX_CMD_FLG_RTS_MSK; | ||
780 | tx_flags |= TX_CMD_FLG_CTS_MSK; | ||
781 | } | ||
782 | break; | ||
783 | default: | ||
784 | break; | ||
785 | } | ||
786 | } | ||
787 | |||
788 | tx_cmd->rate = rate; | 772 | tx_cmd->rate = rate; |
789 | tx_cmd->tx_flags = tx_flags; | 773 | tx_cmd->tx_flags = tx_flags; |
790 | 774 | ||
@@ -2717,7 +2701,7 @@ static struct iwl_lib_ops iwl3945_lib = { | |||
2717 | static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = { | 2701 | static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = { |
2718 | .get_hcmd_size = iwl3945_get_hcmd_size, | 2702 | .get_hcmd_size = iwl3945_get_hcmd_size, |
2719 | .build_addsta_hcmd = iwl3945_build_addsta_hcmd, | 2703 | .build_addsta_hcmd = iwl3945_build_addsta_hcmd, |
2720 | .rts_tx_cmd_flag = iwlcore_rts_tx_cmd_flag, | 2704 | .tx_cmd_protection = iwlcore_tx_cmd_protection, |
2721 | .request_scan = iwl3945_request_scan, | 2705 | .request_scan = iwl3945_request_scan, |
2722 | }; | 2706 | }; |
2723 | 2707 | ||