Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90314
b: refs/heads/master
c: e048c6e
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Mar 25, 2008
1 parent 442647f commit 0d26d80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 26 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: 906c730a2db950b7bce4ef17d65399acd791c360
refs/heads/master: e048c6e4fdac9be0dbcb7e0c5d518737c867ef09
29 changes: 4 additions & 25 deletions trunk/net/mac80211/ieee80211_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,35 +279,14 @@ static int ieee80211_ioctl_giwmode(struct net_device *dev,

int ieee80211_set_freq(struct ieee80211_local *local, int freqMHz)
{
int set = 0;
int ret = -EINVAL;
enum ieee80211_band band;
struct ieee80211_supported_band *sband;
int i;

for (band = 0; band < IEEE80211_NUM_BANDS; band ++) {
sband = local->hw.wiphy->bands[band];
struct ieee80211_channel *chan;

if (!sband)
continue;
chan = ieee80211_get_channel(local->hw.wiphy, freqMHz);

for (i = 0; i < sband->n_channels; i++) {
struct ieee80211_channel *chan = &sband->channels[i];

if (chan->flags & IEEE80211_CHAN_DISABLED)
continue;

if (chan->center_freq == freqMHz) {
set = 1;
local->oper_channel = chan;
break;
}
}
if (set)
break;
}
if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
local->oper_channel = chan;

if (set) {
if (local->sta_sw_scanning)
ret = 0;
else
Expand Down

0 comments on commit 0d26d80

Please sign in to comment.