iwlwifi: move iwl_get_single_channel_number and mark it static
authorMeenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Thu, 15 Mar 2012 20:27:03 +0000 (13:27 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 9 Apr 2012 20:37:45 +0000 (16:37 -0400)
iwl_get_single_channel_number is used only in
iwl-scan.c, move it there and mark it static.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-scan.c

index ec250b213528056976c31ca2e290b86c2a62f599..ed201e7b2844dfae9ef64c9393f5300c87ae6670 100644 (file)
@@ -162,46 +162,6 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf)
                _iwl_set_rxon_ht(priv, ht_conf, ctx);
 }
 
-/* Return valid, unused, channel for a passive scan to reset the RF */
-u8 iwl_get_single_channel_number(struct iwl_priv *priv,
-                                enum ieee80211_band band)
-{
-       const struct iwl_channel_info *ch_info;
-       int i;
-       u8 channel = 0;
-       u8 min, max;
-       struct iwl_rxon_context *ctx;
-
-       if (band == IEEE80211_BAND_5GHZ) {
-               min = 14;
-               max = priv->channel_count;
-       } else {
-               min = 0;
-               max = 14;
-       }
-
-       for (i = min; i < max; i++) {
-               bool busy = false;
-
-               for_each_context(priv, ctx) {
-                       busy = priv->channel_info[i].channel ==
-                               le16_to_cpu(ctx->staging.channel);
-                       if (busy)
-                               break;
-               }
-
-               if (busy)
-                       continue;
-
-               channel = priv->channel_info[i].channel;
-               ch_info = iwl_get_channel_info(priv, band, channel);
-               if (is_channel_valid(ch_info))
-                       break;
-       }
-
-       return channel;
-}
-
 /**
  * iwl_set_rxon_channel - Set the band and channel values in staging RXON
  * @ch: requested channel as a pointer to struct ieee80211_channel
index 2488fc1c5cb6e29d06031d5b2f46944c9689f949..7aa3060fc6b5988bf11d569eed793f4384a004ef 100644 (file)
@@ -99,8 +99,6 @@ void iwl_set_flags_for_band(struct iwl_priv *priv,
                            struct iwl_rxon_context *ctx,
                            enum ieee80211_band band,
                            struct ieee80211_vif *vif);
-u8 iwl_get_single_channel_number(struct iwl_priv *priv,
-                                 enum ieee80211_band band);
 void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf);
 bool iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
                            struct iwl_rxon_context *ctx,
index 4338d4942ed217811c64c254b9ef1e00d4b00b8f..f3e5c2aba266400b07a6556eb709b1fc498d1af9 100644 (file)
@@ -451,6 +451,46 @@ static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv,
        return iwl_limit_dwell(priv, passive);
 }
 
+/* Return valid, unused, channel for a passive scan to reset the RF */
+static u8 iwl_get_single_channel_number(struct iwl_priv *priv,
+                                enum ieee80211_band band)
+{
+       const struct iwl_channel_info *ch_info;
+       int i;
+       u8 channel = 0;
+       u8 min, max;
+       struct iwl_rxon_context *ctx;
+
+       if (band == IEEE80211_BAND_5GHZ) {
+               min = 14;
+               max = priv->channel_count;
+       } else {
+               min = 0;
+               max = 14;
+       }
+
+       for (i = min; i < max; i++) {
+               bool busy = false;
+
+               for_each_context(priv, ctx) {
+                       busy = priv->channel_info[i].channel ==
+                               le16_to_cpu(ctx->staging.channel);
+                       if (busy)
+                               break;
+               }
+
+               if (busy)
+                       continue;
+
+               channel = priv->channel_info[i].channel;
+               ch_info = iwl_get_channel_info(priv, band, channel);
+               if (is_channel_valid(ch_info))
+                       break;
+       }
+
+       return channel;
+}
+
 static int iwl_get_single_channel_for_scan(struct iwl_priv *priv,
                                           struct ieee80211_vif *vif,
                                           enum ieee80211_band band,