diff options
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/util.c | 28 | ||||
-rw-r--r-- | net/mac80211/wext.c | 28 |
3 files changed, 29 insertions, 29 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 442a43a34005..199d64143b41 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -893,7 +893,6 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | |||
893 | 893 | ||
894 | /* wireless extensions */ | 894 | /* wireless extensions */ |
895 | extern const struct iw_handler_def ieee80211_iw_handler_def; | 895 | extern const struct iw_handler_def ieee80211_iw_handler_def; |
896 | int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freq); | ||
897 | 896 | ||
898 | /* STA/IBSS code */ | 897 | /* STA/IBSS code */ |
899 | void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata); | 898 | void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata); |
@@ -1008,6 +1007,7 @@ void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, | |||
1008 | int encrypt); | 1007 | int encrypt); |
1009 | void ieee802_11_parse_elems(u8 *start, size_t len, | 1008 | void ieee802_11_parse_elems(u8 *start, size_t len, |
1010 | struct ieee802_11_elems *elems); | 1009 | struct ieee802_11_elems *elems); |
1010 | int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freq); | ||
1011 | 1011 | ||
1012 | #ifdef CONFIG_MAC80211_NOINLINE | 1012 | #ifdef CONFIG_MAC80211_NOINLINE |
1013 | #define debug_noinline noinline | 1013 | #define debug_noinline noinline |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index c3a22ab2ad2e..cf0b820a0eaa 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -612,3 +612,31 @@ void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, | |||
612 | 612 | ||
613 | dev_queue_xmit(skb); | 613 | dev_queue_xmit(skb); |
614 | } | 614 | } |
615 | |||
616 | int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freqMHz) | ||
617 | { | ||
618 | int ret = -EINVAL; | ||
619 | struct ieee80211_channel *chan; | ||
620 | struct ieee80211_local *local = sdata->local; | ||
621 | |||
622 | chan = ieee80211_get_channel(local->hw.wiphy, freqMHz); | ||
623 | |||
624 | if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) { | ||
625 | if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS && | ||
626 | chan->flags & IEEE80211_CHAN_NO_IBSS) { | ||
627 | printk(KERN_DEBUG "%s: IBSS not allowed on frequency " | ||
628 | "%d MHz\n", sdata->dev->name, chan->center_freq); | ||
629 | return ret; | ||
630 | } | ||
631 | local->oper_channel = chan; | ||
632 | |||
633 | if (local->sta_sw_scanning || local->sta_hw_scanning) | ||
634 | ret = 0; | ||
635 | else | ||
636 | ret = ieee80211_hw_config(local); | ||
637 | |||
638 | rate_control_clear(local); | ||
639 | } | ||
640 | |||
641 | return ret; | ||
642 | } | ||
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index beae664ab480..97d132811c81 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -330,34 +330,6 @@ static int ieee80211_ioctl_giwmode(struct net_device *dev, | |||
330 | return 0; | 330 | return 0; |
331 | } | 331 | } |
332 | 332 | ||
333 | int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freqMHz) | ||
334 | { | ||
335 | int ret = -EINVAL; | ||
336 | struct ieee80211_channel *chan; | ||
337 | struct ieee80211_local *local = sdata->local; | ||
338 | |||
339 | chan = ieee80211_get_channel(local->hw.wiphy, freqMHz); | ||
340 | |||
341 | if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) { | ||
342 | if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS && | ||
343 | chan->flags & IEEE80211_CHAN_NO_IBSS) { | ||
344 | printk(KERN_DEBUG "%s: IBSS not allowed on frequency " | ||
345 | "%d MHz\n", sdata->dev->name, chan->center_freq); | ||
346 | return ret; | ||
347 | } | ||
348 | local->oper_channel = chan; | ||
349 | |||
350 | if (local->sta_sw_scanning || local->sta_hw_scanning) | ||
351 | ret = 0; | ||
352 | else | ||
353 | ret = ieee80211_hw_config(local); | ||
354 | |||
355 | rate_control_clear(local); | ||
356 | } | ||
357 | |||
358 | return ret; | ||
359 | } | ||
360 | |||
361 | static int ieee80211_ioctl_siwfreq(struct net_device *dev, | 333 | static int ieee80211_ioctl_siwfreq(struct net_device *dev, |
362 | struct iw_request_info *info, | 334 | struct iw_request_info *info, |
363 | struct iw_freq *freq, char *extra) | 335 | struct iw_freq *freq, char *extra) |