Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289950
b: refs/heads/master
c: e9980e6
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jan 24, 2012
1 parent 6289505 commit 89e2f19
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 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: 75ac9a28a0c6b818ba1aba874b6b3ae17241552c
refs/heads/master: e9980e6d20a5c4d3f52359142ab3569171759a5b
28 changes: 17 additions & 11 deletions trunk/net/mac80211/chan.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,29 @@ __ieee80211_get_channel_mode(struct ieee80211_local *local,
if (!ieee80211_sdata_running(sdata))
continue;

if (sdata->vif.type == NL80211_IFTYPE_MONITOR)
switch (sdata->vif.type) {
case NL80211_IFTYPE_MONITOR:
continue;

if (sdata->vif.type == NL80211_IFTYPE_STATION &&
!sdata->u.mgd.associated)
continue;

if (sdata->vif.type == NL80211_IFTYPE_ADHOC) {
case NL80211_IFTYPE_STATION:
if (!sdata->u.mgd.associated)
continue;
break;
case NL80211_IFTYPE_ADHOC:
if (!sdata->u.ibss.ssid_len)
continue;
if (!sdata->u.ibss.fixed_channel)
return CHAN_MODE_HOPPING;
}

if (sdata->vif.type == NL80211_IFTYPE_AP &&
!sdata->u.ap.beacon)
break;
case NL80211_IFTYPE_AP_VLAN:
/* will also have _AP interface */
continue;
case NL80211_IFTYPE_AP:
if (!sdata->u.ap.beacon)
continue;
break;
default:
break;
}

return CHAN_MODE_FIXED;
}
Expand Down

0 comments on commit 89e2f19

Please sign in to comment.