瀏覽代碼

cfg80211: remove unused wiphy argument from cfg80211_wext_freq()

cfg80211_wext_freq() is declared in wext-compat.h, but its
parameter struct wiphy's declaration is not included there.
As the parameter isn't used, just remove it.

Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
[remove parameter instead of changing to netdev]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Zhao, Gang 11 年之前
父節點
當前提交
96998e3a2f
共有 5 個文件被更改,包括 12 次插入8 次删除
  1. 1 1
      net/wireless/ibss.c
  2. 5 1
      net/wireless/scan.c
  3. 4 4
      net/wireless/wext-compat.c
  4. 1 1
      net/wireless/wext-compat.h
  5. 1 1
      net/wireless/wext-sme.c

+ 1 - 1
net/wireless/ibss.c

@@ -322,7 +322,7 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
 	if (!rdev->ops->join_ibss)
 	if (!rdev->ops->join_ibss)
 		return -EOPNOTSUPP;
 		return -EOPNOTSUPP;
 
 
-	freq = cfg80211_wext_freq(wdev->wiphy, wextfreq);
+	freq = cfg80211_wext_freq(wextfreq);
 	if (freq < 0)
 	if (freq < 0)
 		return freq;
 		return freq;
 
 

+ 5 - 1
net/wireless/scan.c

@@ -1147,7 +1147,11 @@ int cfg80211_wext_siwscan(struct net_device *dev,
 				int k;
 				int k;
 				int wiphy_freq = wiphy->bands[band]->channels[j].center_freq;
 				int wiphy_freq = wiphy->bands[band]->channels[j].center_freq;
 				for (k = 0; k < wreq->num_channels; k++) {
 				for (k = 0; k < wreq->num_channels; k++) {
-					int wext_freq = cfg80211_wext_freq(wiphy, &wreq->channel_list[k]);
+					struct iw_freq *freq =
+						&wreq->channel_list[k];
+					int wext_freq =
+						cfg80211_wext_freq(freq);
+
 					if (wext_freq == wiphy_freq)
 					if (wext_freq == wiphy_freq)
 						goto wext_freq_found;
 						goto wext_freq_found;
 				}
 				}

+ 4 - 4
net/wireless/wext-compat.c

@@ -253,12 +253,12 @@ EXPORT_SYMBOL_GPL(cfg80211_wext_giwrange);
 
 
 /**
 /**
  * cfg80211_wext_freq - get wext frequency for non-"auto"
  * cfg80211_wext_freq - get wext frequency for non-"auto"
- * @wiphy: the wiphy
+ * @dev: the net device
  * @freq: the wext freq encoding
  * @freq: the wext freq encoding
  *
  *
  * Returns a frequency, or a negative error code, or 0 for auto.
  * Returns a frequency, or a negative error code, or 0 for auto.
  */
  */
-int cfg80211_wext_freq(struct wiphy *wiphy, struct iw_freq *freq)
+int cfg80211_wext_freq(struct iw_freq *freq)
 {
 {
 	/*
 	/*
 	 * Parse frequency - return 0 for auto and
 	 * Parse frequency - return 0 for auto and
@@ -787,7 +787,7 @@ static int cfg80211_wext_siwfreq(struct net_device *dev,
 	case NL80211_IFTYPE_ADHOC:
 	case NL80211_IFTYPE_ADHOC:
 		return cfg80211_ibss_wext_siwfreq(dev, info, wextfreq, extra);
 		return cfg80211_ibss_wext_siwfreq(dev, info, wextfreq, extra);
 	case NL80211_IFTYPE_MONITOR:
 	case NL80211_IFTYPE_MONITOR:
-		freq = cfg80211_wext_freq(wdev->wiphy, wextfreq);
+		freq = cfg80211_wext_freq(wextfreq);
 		if (freq < 0)
 		if (freq < 0)
 			return freq;
 			return freq;
 		if (freq == 0)
 		if (freq == 0)
@@ -798,7 +798,7 @@ static int cfg80211_wext_siwfreq(struct net_device *dev,
 			return -EINVAL;
 			return -EINVAL;
 		return cfg80211_set_monitor_channel(rdev, &chandef);
 		return cfg80211_set_monitor_channel(rdev, &chandef);
 	case NL80211_IFTYPE_MESH_POINT:
 	case NL80211_IFTYPE_MESH_POINT:
-		freq = cfg80211_wext_freq(wdev->wiphy, wextfreq);
+		freq = cfg80211_wext_freq(wextfreq);
 		if (freq < 0)
 		if (freq < 0)
 			return freq;
 			return freq;
 		if (freq == 0)
 		if (freq == 0)

+ 1 - 1
net/wireless/wext-compat.h

@@ -50,7 +50,7 @@ int cfg80211_wext_siwgenie(struct net_device *dev,
 			   struct iw_point *data, char *extra);
 			   struct iw_point *data, char *extra);
 
 
 
 
-int cfg80211_wext_freq(struct wiphy *wiphy, struct iw_freq *freq);
+int cfg80211_wext_freq(struct iw_freq *freq);
 
 
 
 
 extern const struct iw_handler_def cfg80211_wext_handler;
 extern const struct iw_handler_def cfg80211_wext_handler;

+ 1 - 1
net/wireless/wext-sme.c

@@ -75,7 +75,7 @@ int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
 	if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION))
 	if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION))
 		return -EINVAL;
 		return -EINVAL;
 
 
-	freq = cfg80211_wext_freq(wdev->wiphy, wextfreq);
+	freq = cfg80211_wext_freq(wextfreq);
 	if (freq < 0)
 	if (freq < 0)
 		return freq;
 		return freq;