cfg80211: Remove unused VHT chan code
Cleanup of unused VHT channel config related code. Signed-off-by: Mahesh Palivela <maheshp@posedge.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>hifive-unleashed-5.1
parent
59cf1d65f7
commit
dbeca2ea46
|
@ -1371,9 +1371,7 @@ static int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
|
||||||
struct genl_info *info,
|
struct genl_info *info,
|
||||||
struct cfg80211_chan_def *chandef)
|
struct cfg80211_chan_def *chandef)
|
||||||
{
|
{
|
||||||
struct ieee80211_sta_ht_cap *ht_cap;
|
u32 control_freq;
|
||||||
struct ieee80211_sta_vht_cap *vht_cap;
|
|
||||||
u32 control_freq, width;
|
|
||||||
|
|
||||||
if (!info->attrs[NL80211_ATTR_WIPHY_FREQ])
|
if (!info->attrs[NL80211_ATTR_WIPHY_FREQ])
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -1419,33 +1417,9 @@ static int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
|
||||||
info->attrs[NL80211_ATTR_CENTER_FREQ2]);
|
info->attrs[NL80211_ATTR_CENTER_FREQ2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
ht_cap = &rdev->wiphy.bands[chandef->chan->band]->ht_cap;
|
|
||||||
vht_cap = &rdev->wiphy.bands[chandef->chan->band]->vht_cap;
|
|
||||||
|
|
||||||
if (!cfg80211_chandef_valid(chandef))
|
if (!cfg80211_chandef_valid(chandef))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
switch (chandef->width) {
|
|
||||||
case NL80211_CHAN_WIDTH_20:
|
|
||||||
case NL80211_CHAN_WIDTH_20_NOHT:
|
|
||||||
width = 20;
|
|
||||||
break;
|
|
||||||
case NL80211_CHAN_WIDTH_40:
|
|
||||||
width = 40;
|
|
||||||
break;
|
|
||||||
case NL80211_CHAN_WIDTH_80:
|
|
||||||
width = 80;
|
|
||||||
break;
|
|
||||||
case NL80211_CHAN_WIDTH_80P80:
|
|
||||||
width = 80;
|
|
||||||
break;
|
|
||||||
case NL80211_CHAN_WIDTH_160:
|
|
||||||
width = 160;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cfg80211_chandef_usable(&rdev->wiphy, chandef,
|
if (!cfg80211_chandef_usable(&rdev->wiphy, chandef,
|
||||||
IEEE80211_CHAN_DISABLED))
|
IEEE80211_CHAN_DISABLED))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in New Issue