cfg80211: remove 80+80 MHz rate reporting
authorJohannes Berg <johannes.berg@intel.com>
Thu, 15 Jan 2015 15:05:21 +0000 (16:05 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 15 Jan 2015 15:05:21 +0000 (16:05 +0100)
These rates are treated the same as 160 MHz in the spec, so
it makes no sense to distinguish them. As no driver uses them
yet, this is also not a problem, just remove them.

In the userspace API the field remains reserved to preserve
API and ABI.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
include/uapi/linux/nl80211.h
net/wireless/nl80211.c
net/wireless/util.c

index 38abc07503fd67a25dc809774cfc67a7be55a844..0322048fddab22656eae908bfa41bea99355eddc 100644 (file)
@@ -875,7 +875,6 @@ int cfg80211_check_station_change(struct wiphy *wiphy,
  * @RATE_INFO_FLAGS_VHT_MCS: mcs field filled with VHT MCS
  * @RATE_INFO_FLAGS_40_MHZ_WIDTH: 40 MHz width transmission
  * @RATE_INFO_FLAGS_80_MHZ_WIDTH: 80 MHz width transmission
- * @RATE_INFO_FLAGS_80P80_MHZ_WIDTH: 80+80 MHz width transmission
  * @RATE_INFO_FLAGS_160_MHZ_WIDTH: 160 MHz width transmission
  * @RATE_INFO_FLAGS_SHORT_GI: 400ns guard interval
  * @RATE_INFO_FLAGS_60G: 60GHz MCS
@@ -885,10 +884,9 @@ enum rate_info_flags {
        RATE_INFO_FLAGS_VHT_MCS                 = BIT(1),
        RATE_INFO_FLAGS_40_MHZ_WIDTH            = BIT(2),
        RATE_INFO_FLAGS_80_MHZ_WIDTH            = BIT(3),
-       RATE_INFO_FLAGS_80P80_MHZ_WIDTH         = BIT(4),
-       RATE_INFO_FLAGS_160_MHZ_WIDTH           = BIT(5),
-       RATE_INFO_FLAGS_SHORT_GI                = BIT(6),
-       RATE_INFO_FLAGS_60G                     = BIT(7),
+       RATE_INFO_FLAGS_160_MHZ_WIDTH           = BIT(4),
+       RATE_INFO_FLAGS_SHORT_GI                = BIT(5),
+       RATE_INFO_FLAGS_60G                     = BIT(6),
 };
 
 /**
index b6c1a00bd8d2e0500601527310a74b8a3556a21b..11cdb85ac6466f004e7f30177f2febfc43b8fe2f 100644 (file)
@@ -2278,7 +2278,8 @@ struct nl80211_sta_flag_update {
  * @NL80211_RATE_INFO_VHT_MCS: MCS index for VHT (u8)
  * @NL80211_RATE_INFO_VHT_NSS: number of streams in VHT (u8)
  * @NL80211_RATE_INFO_80_MHZ_WIDTH: 80 MHz VHT rate
- * @NL80211_RATE_INFO_80P80_MHZ_WIDTH: 80+80 MHz VHT rate
+ * @NL80211_RATE_INFO_80P80_MHZ_WIDTH: unused - 80+80 is treated the
+ *     same as 160 for purposes of the bitrates
  * @NL80211_RATE_INFO_160_MHZ_WIDTH: 160 MHz VHT rate
  * @__NL80211_RATE_INFO_AFTER_LAST: internal use
  */
index 380784378df81e1d33e80d37356ae5ef445f90a7..8998484ea970ba34bf18bde0a36a0dc0e0c6790a 100644 (file)
@@ -3614,9 +3614,6 @@ static bool nl80211_put_sta_rate(struct sk_buff *msg, struct rate_info *info,
                if (info->flags & RATE_INFO_FLAGS_80_MHZ_WIDTH &&
                    nla_put_flag(msg, NL80211_RATE_INFO_80_MHZ_WIDTH))
                        return false;
-               if (info->flags & RATE_INFO_FLAGS_80P80_MHZ_WIDTH &&
-                   nla_put_flag(msg, NL80211_RATE_INFO_80P80_MHZ_WIDTH))
-                       return false;
                if (info->flags & RATE_INFO_FLAGS_160_MHZ_WIDTH &&
                    nla_put_flag(msg, NL80211_RATE_INFO_160_MHZ_WIDTH))
                        return false;
index d0ac795445b7e40dc92ebb1e0bd9095fc4bab048..6942d48f1ac5a11f47f7b7ea7073b0b66d0d34fb 100644 (file)
@@ -1073,8 +1073,7 @@ static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate)
        if (WARN_ON_ONCE(rate->mcs > 9))
                return 0;
 
-       idx = rate->flags & (RATE_INFO_FLAGS_160_MHZ_WIDTH |
-                            RATE_INFO_FLAGS_80P80_MHZ_WIDTH) ? 3 :
+       idx = rate->flags & RATE_INFO_FLAGS_160_MHZ_WIDTH ? 3 :
                  rate->flags & RATE_INFO_FLAGS_80_MHZ_WIDTH ? 2 :
                  rate->flags & RATE_INFO_FLAGS_40_MHZ_WIDTH ? 1 : 0;