]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
iwlwifi: move valid_contexts to priv
authorJohannes Berg <johannes.berg@intel.com>
Thu, 15 Mar 2012 20:26:53 +0000 (13:26 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 9 Apr 2012 20:37:23 +0000 (16:37 -0400)
No other component is accessing it any more,
so it can move to the correct place in priv.

Signed-off-by: Johannes Berg <johannes.berg@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-agn-lib.c
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-dev.h
drivers/net/wireless/iwlwifi/iwl-mac80211.c
drivers/net/wireless/iwlwifi/iwl-shared.h

index 92463af5bed914cf7dbd5c705fb9290886d08784..bbb67b0604fb58908f5c8409e8e799bbd276c7eb 100644 (file)
@@ -228,7 +228,7 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
                                 IWL_SCD_BE_MSK | IWL_SCD_BK_MSK |
                                 IWL_SCD_MGMT_MSK;
        if ((flush_control & BIT(IWL_RXON_CTX_PAN)) &&
-           (priv->shrd->valid_contexts != BIT(IWL_RXON_CTX_BSS)))
+           (priv->valid_contexts != BIT(IWL_RXON_CTX_BSS)))
                flush_cmd.fifo_control |= IWL_PAN_SCD_VO_MSK |
                                IWL_PAN_SCD_VI_MSK | IWL_PAN_SCD_BE_MSK |
                                IWL_PAN_SCD_BK_MSK | IWL_PAN_SCD_MGMT_MSK |
index 7e8935ff47fa6890d67ed729552bc57c4cfd62e4..4839ad348948532047a3c7dc2156cc3ddeb41536 100644 (file)
@@ -312,7 +312,7 @@ int iwlagn_set_pan_params(struct iwl_priv *priv)
        int slot0 = 300, slot1 = 0;
        int ret;
 
-       if (priv->shrd->valid_contexts == BIT(IWL_RXON_CTX_BSS))
+       if (priv->valid_contexts == BIT(IWL_RXON_CTX_BSS))
                return 0;
 
        BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2);
index c9079af61b1a23de1b1efea22a52f2c7502c64e0..fa18968c504b2f018cde9797606a0127501eb606 100644 (file)
@@ -583,9 +583,9 @@ static void iwl_init_context(struct iwl_priv *priv, u32 ucode_flags)
         * The default context is always valid,
         * the PAN context depends on uCode.
         */
-       priv->shrd->valid_contexts = BIT(IWL_RXON_CTX_BSS);
+       priv->valid_contexts = BIT(IWL_RXON_CTX_BSS);
        if (ucode_flags & IWL_UCODE_TLV_FLAGS_PAN)
-               priv->shrd->valid_contexts |= BIT(IWL_RXON_CTX_PAN);
+               priv->valid_contexts |= BIT(IWL_RXON_CTX_PAN);
 
        for (i = 0; i < NUM_IWL_RXON_CTX; i++)
                priv->contexts[i].ctxid = i;
index 297508df36bde1d435ac496b7792e2779391ec3a..6178b9912f4fe74bfecb2bc51f92c8f8114a165c 100644 (file)
@@ -739,6 +739,7 @@ struct iwl_priv {
        struct workqueue_struct *workqueue;
 
        enum ieee80211_band band;
+       u8 valid_contexts;
 
        void (*pre_rx_handler)(struct iwl_priv *priv,
                               struct iwl_rx_cmd_buffer *rxb);
@@ -1006,7 +1007,7 @@ iwl_rxon_ctx_from_vif(struct ieee80211_vif *vif)
 #define for_each_context(priv, ctx)                            \
        for (ctx = &priv->contexts[IWL_RXON_CTX_BSS];           \
             ctx < &priv->contexts[NUM_IWL_RXON_CTX]; ctx++)    \
-               if (priv->shrd->valid_contexts & BIT(ctx->ctxid))
+               if (priv->valid_contexts & BIT(ctx->ctxid))
 
 static inline int iwl_is_associated_ctx(struct iwl_rxon_context *ctx)
 {
index 1bd021a24a8abdc5419f6f8d3a409198cef62c13..b0c40c8a7fdb2d8c7f30963d0631e2b4e6526afb 100644 (file)
@@ -1006,7 +1006,7 @@ static int iwlagn_mac_remain_on_channel(struct ieee80211_hw *hw,
        struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_PAN];
        int err = 0;
 
-       if (!(priv->shrd->valid_contexts & BIT(IWL_RXON_CTX_PAN)))
+       if (!(priv->valid_contexts & BIT(IWL_RXON_CTX_PAN)))
                return -EOPNOTSUPP;
 
        if (!(ctx->interface_modes & BIT(NL80211_IFTYPE_P2P_CLIENT)))
@@ -1094,7 +1094,7 @@ static int iwlagn_mac_cancel_remain_on_channel(struct ieee80211_hw *hw)
 {
        struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
 
-       if (!(priv->shrd->valid_contexts & BIT(IWL_RXON_CTX_PAN)))
+       if (!(priv->valid_contexts & BIT(IWL_RXON_CTX_PAN)))
                return -EOPNOTSUPP;
 
        IWL_DEBUG_MAC80211(priv, "enter\n");
index e4f619c6ec9fc757ad7ef8682e1f1fa2ecbce171..c19c0964e5feacf6f1462f28c84cb2d475148b1e 100644 (file)
@@ -338,7 +338,6 @@ struct iwl_cfg {
  *
  * @status: STATUS_*
  * @wowlan: are we running wowlan uCode
- * @valid_contexts: microcode/device supports multiple contexts
  * @bus: pointer to the bus layer data
  * @cfg: see struct iwl_cfg
  * @priv: pointer to the upper layer data
@@ -352,7 +351,6 @@ struct iwl_cfg {
  */
 struct iwl_shared {
        unsigned long status;
-       u8 valid_contexts;
 
        const struct iwl_cfg *cfg;
        struct iwl_trans *trans;