diff options
author | Janusz Dziedzic <janusz.dziedzic@tieto.com> | 2013-12-03 03:50:44 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-03 09:19:54 -0500 |
commit | 7869303b17a3cc78c9e9f26544be98b5734ac97c (patch) | |
tree | 160218d90841ee5d7ede3328be1e0b79c45ba2c3 /net/wireless/nl80211.c | |
parent | de61b610def5249a1295b1eac92f3ce2bfa76b9d (diff) |
nl80211: don't clear bitrate_mask twice
Don't clear cfg80211_bitrate_mask twice in
nl80211_set_tx_bitrate_mask() function.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 9cd8c6113e94..bdcf256e3628 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -7349,15 +7349,14 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb, | |||
7349 | /* Default to all rates enabled */ | 7349 | /* Default to all rates enabled */ |
7350 | for (i = 0; i < IEEE80211_NUM_BANDS; i++) { | 7350 | for (i = 0; i < IEEE80211_NUM_BANDS; i++) { |
7351 | sband = rdev->wiphy.bands[i]; | 7351 | sband = rdev->wiphy.bands[i]; |
7352 | mask.control[i].legacy = | 7352 | |
7353 | sband ? (1 << sband->n_bitrates) - 1 : 0; | 7353 | if (!sband) |
7354 | if (sband) | 7354 | continue; |
7355 | memcpy(mask.control[i].mcs, | 7355 | |
7356 | sband->ht_cap.mcs.rx_mask, | 7356 | mask.control[i].legacy = (1 << sband->n_bitrates) - 1; |
7357 | sizeof(mask.control[i].mcs)); | 7357 | memcpy(mask.control[i].mcs, |
7358 | else | 7358 | sband->ht_cap.mcs.rx_mask, |
7359 | memset(mask.control[i].mcs, 0, | 7359 | sizeof(mask.control[i].mcs)); |
7360 | sizeof(mask.control[i].mcs)); | ||
7361 | } | 7360 | } |
7362 | 7361 | ||
7363 | /* | 7362 | /* |