diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2012-06-29 06:47:06 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-29 07:39:18 -0400 |
commit | 2e165b818456ecc1024dd0387eeac64745526377 (patch) | |
tree | 6cf33c9bf61f9fbf3849f9d98cffc72bc7f8c37d | |
parent | a69b40a95b121c4bfc52a20cccd28708ae550af1 (diff) |
cfg80211/mac80211: remove .get_channel
We do not need it anymore since cfg80211 tracks
monitor channel and monitor channel type.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | include/net/cfg80211.h | 6 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 11 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 15 | ||||
-rw-r--r-- | net/wireless/wext-compat.c | 9 |
4 files changed, 7 insertions, 34 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index f0d213dd8fe7..fa269347355b 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1501,9 +1501,6 @@ struct cfg80211_gtk_rekey_data { | |||
1501 | * be stored for when a monitor interface becomes active. | 1501 | * be stored for when a monitor interface becomes active. |
1502 | * @set_monitor_enabled: Notify driver that there are only monitor | 1502 | * @set_monitor_enabled: Notify driver that there are only monitor |
1503 | * interfaces running. | 1503 | * interfaces running. |
1504 | * @get_channel: Get the current operating channel, should return %NULL if | ||
1505 | * there's no single defined operating channel if for example the | ||
1506 | * device implements channel hopping for multi-channel virtual interfaces. | ||
1507 | * | 1504 | * |
1508 | * @scan: Request to do a scan. If returning zero, the scan request is given | 1505 | * @scan: Request to do a scan. If returning zero, the scan request is given |
1509 | * the driver, and will be valid until passed to cfg80211_scan_done(). | 1506 | * the driver, and will be valid until passed to cfg80211_scan_done(). |
@@ -1810,9 +1807,6 @@ struct cfg80211_ops { | |||
1810 | struct net_device *dev, | 1807 | struct net_device *dev, |
1811 | u16 noack_map); | 1808 | u16 noack_map); |
1812 | 1809 | ||
1813 | struct ieee80211_channel *(*get_channel)(struct wiphy *wiphy, | ||
1814 | enum nl80211_channel_type *type); | ||
1815 | |||
1816 | int (*get_et_sset_count)(struct wiphy *wiphy, | 1810 | int (*get_et_sset_count)(struct wiphy *wiphy, |
1817 | struct net_device *dev, int sset); | 1811 | struct net_device *dev, int sset); |
1818 | void (*get_et_stats)(struct wiphy *wiphy, struct net_device *dev, | 1812 | void (*get_et_stats)(struct wiphy *wiphy, struct net_device *dev, |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index ea4b1ea9105a..ccbe2413142a 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -2980,16 +2980,6 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev, | |||
2980 | return 0; | 2980 | return 0; |
2981 | } | 2981 | } |
2982 | 2982 | ||
2983 | static struct ieee80211_channel * | ||
2984 | ieee80211_wiphy_get_channel(struct wiphy *wiphy, | ||
2985 | enum nl80211_channel_type *type) | ||
2986 | { | ||
2987 | struct ieee80211_local *local = wiphy_priv(wiphy); | ||
2988 | |||
2989 | *type = local->_oper_channel_type; | ||
2990 | return local->oper_channel; | ||
2991 | } | ||
2992 | |||
2993 | static void ieee80211_set_monitor_enabled(struct wiphy *wiphy, bool enabled) | 2983 | static void ieee80211_set_monitor_enabled(struct wiphy *wiphy, bool enabled) |
2994 | { | 2984 | { |
2995 | struct ieee80211_local *local = wiphy_priv(wiphy); | 2985 | struct ieee80211_local *local = wiphy_priv(wiphy); |
@@ -3073,7 +3063,6 @@ struct cfg80211_ops mac80211_config_ops = { | |||
3073 | .tdls_oper = ieee80211_tdls_oper, | 3063 | .tdls_oper = ieee80211_tdls_oper, |
3074 | .tdls_mgmt = ieee80211_tdls_mgmt, | 3064 | .tdls_mgmt = ieee80211_tdls_mgmt, |
3075 | .probe_client = ieee80211_probe_client, | 3065 | .probe_client = ieee80211_probe_client, |
3076 | .get_channel = ieee80211_wiphy_get_channel, | ||
3077 | .set_noack_map = ieee80211_set_noack_map, | 3066 | .set_noack_map = ieee80211_set_noack_map, |
3078 | .set_monitor_enabled = ieee80211_set_monitor_enabled, | 3067 | .set_monitor_enabled = ieee80211_set_monitor_enabled, |
3079 | #ifdef CONFIG_PM | 3068 | #ifdef CONFIG_PM |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 12096b4ebf62..5d29ed1f7c62 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1689,16 +1689,11 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 pid, u32 seq, int flags, | |||
1689 | (cfg80211_rdev_list_generation << 2))) | 1689 | (cfg80211_rdev_list_generation << 2))) |
1690 | goto nla_put_failure; | 1690 | goto nla_put_failure; |
1691 | 1691 | ||
1692 | if (rdev->ops->get_channel) { | 1692 | if (rdev->monitor_channel) { |
1693 | struct ieee80211_channel *chan; | 1693 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, |
1694 | enum nl80211_channel_type channel_type; | 1694 | rdev->monitor_channel->center_freq) || |
1695 | 1695 | nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, | |
1696 | chan = rdev->ops->get_channel(&rdev->wiphy, &channel_type); | 1696 | rdev->monitor_channel_type)) |
1697 | if (chan && | ||
1698 | (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, | ||
1699 | chan->center_freq) || | ||
1700 | nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, | ||
1701 | channel_type))) | ||
1702 | goto nla_put_failure; | 1697 | goto nla_put_failure; |
1703 | } | 1698 | } |
1704 | 1699 | ||
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index bc879833b21f..7df42f541873 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
@@ -827,8 +827,6 @@ static int cfg80211_wext_giwfreq(struct net_device *dev, | |||
827 | { | 827 | { |
828 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 828 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
829 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 829 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
830 | struct ieee80211_channel *chan; | ||
831 | enum nl80211_channel_type channel_type; | ||
832 | 830 | ||
833 | switch (wdev->iftype) { | 831 | switch (wdev->iftype) { |
834 | case NL80211_IFTYPE_STATION: | 832 | case NL80211_IFTYPE_STATION: |
@@ -836,13 +834,10 @@ static int cfg80211_wext_giwfreq(struct net_device *dev, | |||
836 | case NL80211_IFTYPE_ADHOC: | 834 | case NL80211_IFTYPE_ADHOC: |
837 | return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra); | 835 | return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra); |
838 | case NL80211_IFTYPE_MONITOR: | 836 | case NL80211_IFTYPE_MONITOR: |
839 | if (!rdev->ops->get_channel) | 837 | if (!rdev->monitor_channel) |
840 | return -EINVAL; | 838 | return -EINVAL; |
841 | 839 | ||
842 | chan = rdev->ops->get_channel(wdev->wiphy, &channel_type); | 840 | freq->m = rdev->monitor_channel->center_freq; |
843 | if (!chan) | ||
844 | return -EINVAL; | ||
845 | freq->m = chan->center_freq; | ||
846 | freq->e = 6; | 841 | freq->e = 6; |
847 | return 0; | 842 | return 0; |
848 | default: | 843 | default: |