]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
iwlagn: move iwl_beacon_time_mask_XXX near to usage
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 10 Oct 2011 14:27:16 +0000 (07:27 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 14 Oct 2011 18:48:13 +0000 (14:48 -0400)
Since iwl_beacon_time_mask_[high,low] are used in iwl-core.c only,
move them to there.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@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-helpers.h

index ad66150a46cdf62df300dc4427bb70ccd30a0f1c..6ecdf82ff4cdc50961ae63473e322cd980d78f3f 100644 (file)
@@ -322,7 +322,7 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
        u16 beacon_int;
        struct ieee80211_vif *vif = ctx->vif;
 
-       conf = ieee80211_get_hw_conf(priv->hw);
+       conf = &priv->hw->conf;
 
        lockdep_assert_held(&priv->shrd->mutex);
 
@@ -1829,6 +1829,28 @@ void iwl_setup_watchdog(struct iwl_priv *priv)
                del_timer(&priv->watchdog);
 }
 
+/**
+ * iwl_beacon_time_mask_low - mask of lower 32 bit of beacon time
+ * @priv -- pointer to iwl_priv data structure
+ * @tsf_bits -- number of bits need to shift for masking)
+ */
+static inline u32 iwl_beacon_time_mask_low(struct iwl_priv *priv,
+                                          u16 tsf_bits)
+{
+       return (1 << tsf_bits) - 1;
+}
+
+/**
+ * iwl_beacon_time_mask_high - mask of higher 32 bit of beacon time
+ * @priv -- pointer to iwl_priv data structure
+ * @tsf_bits -- number of bits need to shift for masking)
+ */
+static inline u32 iwl_beacon_time_mask_high(struct iwl_priv *priv,
+                                           u16 tsf_bits)
+{
+       return ((1 << (32 - tsf_bits)) - 1) << tsf_bits;
+}
+
 /*
  * extended beacon time format
  * time in usec will be changed into a 32-bit value in extended:internal format
index 968fc66e3506ebcf77487ed68afbfb6da314b700..b7cf992fcc62106a7ef1d8b1f4efeb655ade3489 100644 (file)
 
 #include "iwl-io.h"
 
-static inline struct ieee80211_conf *ieee80211_get_hw_conf(
-       struct ieee80211_hw *hw)
-{
-       return &hw->conf;
-}
-
 static inline void iwl_enable_rfkill_int(struct iwl_priv *priv)
 {
        IWL_DEBUG_ISR(priv, "Enabling rfkill interrupt\n");
        iwl_write32(bus(priv), CSR_INT_MASK, CSR_INT_BIT_RF_KILL);
 }
 
-/**
- * iwl_beacon_time_mask_low - mask of lower 32 bit of beacon time
- * @priv -- pointer to iwl_priv data structure
- * @tsf_bits -- number of bits need to shift for masking)
- */
-static inline u32 iwl_beacon_time_mask_low(struct iwl_priv *priv,
-                                          u16 tsf_bits)
-{
-       return (1 << tsf_bits) - 1;
-}
-
-/**
- * iwl_beacon_time_mask_high - mask of higher 32 bit of beacon time
- * @priv -- pointer to iwl_priv data structure
- * @tsf_bits -- number of bits need to shift for masking)
- */
-static inline u32 iwl_beacon_time_mask_high(struct iwl_priv *priv,
-                                           u16 tsf_bits)
-{
-       return ((1 << (32 - tsf_bits)) - 1) << tsf_bits;
-}
-
 #endif                         /* __iwl_helpers_h__ */