mac80211: zero center freq segment 2 in VHT oper IE
authorChun-Yeow Yeoh <yeohchunyeow@gmail.com>
Fri, 4 Sep 2015 02:58:05 +0000 (10:58 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 22 Sep 2015 13:21:24 +0000 (15:21 +0200)
Clear the Channel Center Frequency Segment 2 in VHT operation
IEs to avoid sending non-zero values if the SKB wasn't zeroed
before adding the VHT operation IE.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
[change commit message a bit - not necessarily just mesh related]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/util.c

index 1104421bc525598aae491c587f29eb4b385fc220..f167056753395b042d74451464091a96e1923ef2 100644 (file)
@@ -2324,6 +2324,8 @@ u8 *ieee80211_ie_build_vht_oper(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap,
        if (chandef->center_freq2)
                vht_oper->center_freq_seg2_idx =
                        ieee80211_frequency_to_channel(chandef->center_freq2);
+       else
+               vht_oper->center_freq_seg2_idx = 0x00;
 
        switch (chandef->width) {
        case NL80211_CHAN_WIDTH_160: