Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111698
b: refs/heads/master
c: e16751c
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Sep 15, 2008
1 parent bce9027 commit 67b01d7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 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: 9c6bd79011b14a8bfe58aad0acfb51e4dca05eed
refs/heads/master: e16751c3178add97c4f83dcf92e59b536537b22f
2 changes: 1 addition & 1 deletion trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,6 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,

/* wireless extensions */
extern const struct iw_handler_def ieee80211_iw_handler_def;
int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freq);

/* STA/IBSS code */
void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata);
Expand Down Expand Up @@ -1008,6 +1007,7 @@ void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
int encrypt);
void ieee802_11_parse_elems(u8 *start, size_t len,
struct ieee802_11_elems *elems);
int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freq);

#ifdef CONFIG_MAC80211_NOINLINE
#define debug_noinline noinline
Expand Down
28 changes: 28 additions & 0 deletions trunk/net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,3 +612,31 @@ void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,

dev_queue_xmit(skb);
}

int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freqMHz)
{
int ret = -EINVAL;
struct ieee80211_channel *chan;
struct ieee80211_local *local = sdata->local;

chan = ieee80211_get_channel(local->hw.wiphy, freqMHz);

if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS &&
chan->flags & IEEE80211_CHAN_NO_IBSS) {
printk(KERN_DEBUG "%s: IBSS not allowed on frequency "
"%d MHz\n", sdata->dev->name, chan->center_freq);
return ret;
}
local->oper_channel = chan;

if (local->sta_sw_scanning || local->sta_hw_scanning)
ret = 0;
else
ret = ieee80211_hw_config(local);

rate_control_clear(local);
}

return ret;
}
28 changes: 0 additions & 28 deletions trunk/net/mac80211/wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,34 +330,6 @@ static int ieee80211_ioctl_giwmode(struct net_device *dev,
return 0;
}

int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freqMHz)
{
int ret = -EINVAL;
struct ieee80211_channel *chan;
struct ieee80211_local *local = sdata->local;

chan = ieee80211_get_channel(local->hw.wiphy, freqMHz);

if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS &&
chan->flags & IEEE80211_CHAN_NO_IBSS) {
printk(KERN_DEBUG "%s: IBSS not allowed on frequency "
"%d MHz\n", sdata->dev->name, chan->center_freq);
return ret;
}
local->oper_channel = chan;

if (local->sta_sw_scanning || local->sta_hw_scanning)
ret = 0;
else
ret = ieee80211_hw_config(local);

rate_control_clear(local);
}

return ret;
}

static int ieee80211_ioctl_siwfreq(struct net_device *dev,
struct iw_request_info *info,
struct iw_freq *freq, char *extra)
Expand Down

0 comments on commit 67b01d7

Please sign in to comment.