diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index f098eff263f..214e4658c49 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -238,15 +238,6 @@ struct iwl_channel_info { | |||
238 | #define IEEE80211_HLEN (IEEE80211_4ADDR_LEN) | 238 | #define IEEE80211_HLEN (IEEE80211_4ADDR_LEN) |
239 | #define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN) | 239 | #define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN) |
240 | 240 | ||
241 | struct iwl_frame { | ||
242 | union { | ||
243 | struct ieee80211_hdr frame; | ||
244 | struct iwl_tx_beacon_cmd beacon; | ||
245 | u8 raw[IEEE80211_FRAME_LEN]; | ||
246 | u8 cmd[360]; | ||
247 | } u; | ||
248 | struct list_head list; | ||
249 | }; | ||
250 | 241 | ||
251 | #define SEQ_TO_SN(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4) | 242 | #define SEQ_TO_SN(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4) |
252 | #define SN_TO_SEQ(ssn) (((ssn) << 4) & IEEE80211_SCTL_SEQ) | 243 | #define SN_TO_SEQ(ssn) (((ssn) << 4) & IEEE80211_SCTL_SEQ) |
@@ -1188,12 +1179,10 @@ struct iwl_priv { | |||
1188 | struct ieee80211_rate *ieee_rates; | 1179 | struct ieee80211_rate *ieee_rates; |
1189 | struct iwl_cfg *cfg; | 1180 | struct iwl_cfg *cfg; |
1190 | 1181 | ||
1191 | /* temporary frame storage list */ | ||
1192 | struct list_head free_frames; | ||
1193 | int frames_count; | ||
1194 | |||
1195 | enum ieee80211_band band; | 1182 | enum ieee80211_band band; |
1196 | 1183 | ||
1184 | void (*pre_rx_handler)(struct iwl_priv *priv, | ||
1185 | struct iwl_rx_mem_buffer *rxb); | ||
1197 | void (*rx_handlers[REPLY_MAX])(struct iwl_priv *priv, | 1186 | void (*rx_handlers[REPLY_MAX])(struct iwl_priv *priv, |
1198 | struct iwl_rx_mem_buffer *rxb); | 1187 | struct iwl_rx_mem_buffer *rxb); |
1199 | 1188 | ||
@@ -1569,21 +1558,24 @@ iwl_rxon_ctx_from_vif(struct ieee80211_vif *vif) | |||
1569 | ctx < &priv->contexts[NUM_IWL_RXON_CTX]; ctx++) \ | 1558 | ctx < &priv->contexts[NUM_IWL_RXON_CTX]; ctx++) \ |
1570 | if (priv->valid_contexts & BIT(ctx->ctxid)) | 1559 | if (priv->valid_contexts & BIT(ctx->ctxid)) |
1571 | 1560 | ||
1572 | static inline int iwl_is_associated(struct iwl_priv *priv, | 1561 | static inline int iwl_is_associated_ctx(struct iwl_rxon_context *ctx) |
1573 | enum iwl_rxon_context_id ctxid) | ||
1574 | { | 1562 | { |
1575 | return (priv->contexts[ctxid].active.filter_flags & | 1563 | return (ctx->active.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0; |
1576 | RXON_FILTER_ASSOC_MSK) ? 1 : 0; | ||
1577 | } | 1564 | } |
1578 | 1565 | ||
1579 | static inline int iwl_is_any_associated(struct iwl_priv *priv) | 1566 | static inline int iwl_is_associated(struct iwl_priv *priv, |
1567 | enum iwl_rxon_context_id ctxid) | ||
1580 | { | 1568 | { |
1581 | return iwl_is_associated(priv, IWL_RXON_CTX_BSS); | 1569 | return iwl_is_associated_ctx(&priv->contexts[ctxid]); |
1582 | } | 1570 | } |
1583 | 1571 | ||
1584 | static inline int iwl_is_associated_ctx(struct iwl_rxon_context *ctx) | 1572 | static inline int iwl_is_any_associated(struct iwl_priv *priv) |
1585 | { | 1573 | { |
1586 | return (ctx->active.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0; | 1574 | struct iwl_rxon_context *ctx; |
1575 | for_each_context(priv, ctx) | ||
1576 | if (iwl_is_associated_ctx(ctx)) | ||
1577 | return true; | ||
1578 | return false; | ||
1587 | } | 1579 | } |
1588 | 1580 | ||
1589 | static inline int is_channel_valid(const struct iwl_channel_info *ch_info) | 1581 | static inline int is_channel_valid(const struct iwl_channel_info *ch_info) |