mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 23:51:39 +00:00
iwlwifi: move valid_contexts to priv
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>
This commit is contained in:
parent
9eae88fa9a
commit
a18f61bc9d
@ -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 |
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user