Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341975
b: refs/heads/master
c: dbeca2e
h: refs/heads/master
i:
  341973: 6311f63
  341971: e078789
  341967: c729527
v: v3
  • Loading branch information
Mahesh Palivela authored and Johannes Berg committed Nov 29, 2012
1 parent ee0eab5 commit a42add4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 59cf1d65f7d69739a29a16fe678ebc4e1215e9c0
refs/heads/master: dbeca2ea4642d9de0a59ac141b2825ea6804f408
28 changes: 1 addition & 27 deletions trunk/net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1371,9 +1371,7 @@ static int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
struct genl_info *info,
struct cfg80211_chan_def *chandef)
{
struct ieee80211_sta_ht_cap *ht_cap;
struct ieee80211_sta_vht_cap *vht_cap;
u32 control_freq, width;
u32 control_freq;

if (!info->attrs[NL80211_ATTR_WIPHY_FREQ])
return -EINVAL;
Expand Down Expand Up @@ -1419,33 +1417,9 @@ static int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
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))
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,
IEEE80211_CHAN_DISABLED))
return -EINVAL;
Expand Down

0 comments on commit a42add4

Please sign in to comment.