diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-04-16 07:38:42 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-04-16 17:42:29 -0400 |
commit | 2ffbe6d333664a089f17b13aa79eefe38f794bb7 (patch) | |
tree | 29927d762aff0f9d8a8eea57784fb0067fb58ca7 /include/net | |
parent | dad6330d034a24a22008ee28b8ec447cbb0961c9 (diff) |
mac80211: fix and optimize MCS mask handling
Currently the code always copies the configured MCS mask (even if it is
set to default), but only uses it if legacy rates were also masked out.
Fix this by adding a flag that tracks whether the configured MCS mask is
set to default or not.
Optimize the code further by storing a pointer to the configured rate
mask in txrc instead of using memcpy.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/mac80211.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index bc5d8184c489..05dbb9788504 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -4107,7 +4107,7 @@ void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn); | |||
4107 | * (deprecated; this will be removed once drivers get updated to use | 4107 | * (deprecated; this will be removed once drivers get updated to use |
4108 | * rate_idx_mask) | 4108 | * rate_idx_mask) |
4109 | * @rate_idx_mask: user-requested (legacy) rate mask | 4109 | * @rate_idx_mask: user-requested (legacy) rate mask |
4110 | * @rate_idx_mcs_mask: user-requested MCS rate mask | 4110 | * @rate_idx_mcs_mask: user-requested MCS rate mask (NULL if not in use) |
4111 | * @bss: whether this frame is sent out in AP or IBSS mode | 4111 | * @bss: whether this frame is sent out in AP or IBSS mode |
4112 | */ | 4112 | */ |
4113 | struct ieee80211_tx_rate_control { | 4113 | struct ieee80211_tx_rate_control { |
@@ -4119,7 +4119,7 @@ struct ieee80211_tx_rate_control { | |||
4119 | bool rts, short_preamble; | 4119 | bool rts, short_preamble; |
4120 | u8 max_rate_idx; | 4120 | u8 max_rate_idx; |
4121 | u32 rate_idx_mask; | 4121 | u32 rate_idx_mask; |
4122 | u8 rate_idx_mcs_mask[IEEE80211_HT_MCS_MASK_LEN]; | 4122 | u8 *rate_idx_mcs_mask; |
4123 | bool bss; | 4123 | bool bss; |
4124 | }; | 4124 | }; |
4125 | 4125 | ||