aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 56338693d38..ec250b21352 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -28,7 +28,6 @@
28 28
29#include <linux/kernel.h> 29#include <linux/kernel.h>
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/etherdevice.h>
32#include <linux/sched.h> 31#include <linux/sched.h>
33#include <linux/slab.h> 32#include <linux/slab.h>
34#include <net/mac80211.h> 33#include <net/mac80211.h>
@@ -88,69 +87,6 @@ bool iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
88 ctx->ht.extension_chan_offset); 87 ctx->ht.extension_chan_offset);
89} 88}
90 89
91/**
92 * iwl_full_rxon_required - check if full RXON (vs RXON_ASSOC) cmd is needed
93 * @priv: staging_rxon is compared to active_rxon
94 *
95 * If the RXON structure is changing enough to require a new tune,
96 * or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that
97 * a new tune (full RXON command, rather than RXON_ASSOC cmd) is required.
98 */
99int iwl_full_rxon_required(struct iwl_priv *priv,
100 struct iwl_rxon_context *ctx)
101{
102 const struct iwl_rxon_cmd *staging = &ctx->staging;
103 const struct iwl_rxon_cmd *active = &ctx->active;
104
105#define CHK(cond) \
106 if ((cond)) { \
107 IWL_DEBUG_INFO(priv, "need full RXON - " #cond "\n"); \
108 return 1; \
109 }
110
111#define CHK_NEQ(c1, c2) \
112 if ((c1) != (c2)) { \
113 IWL_DEBUG_INFO(priv, "need full RXON - " \
114 #c1 " != " #c2 " - %d != %d\n", \
115 (c1), (c2)); \
116 return 1; \
117 }
118
119 /* These items are only settable from the full RXON command */
120 CHK(!iwl_is_associated_ctx(ctx));
121 CHK(compare_ether_addr(staging->bssid_addr, active->bssid_addr));
122 CHK(compare_ether_addr(staging->node_addr, active->node_addr));
123 CHK(compare_ether_addr(staging->wlap_bssid_addr,
124 active->wlap_bssid_addr));
125 CHK_NEQ(staging->dev_type, active->dev_type);
126 CHK_NEQ(staging->channel, active->channel);
127 CHK_NEQ(staging->air_propagation, active->air_propagation);
128 CHK_NEQ(staging->ofdm_ht_single_stream_basic_rates,
129 active->ofdm_ht_single_stream_basic_rates);
130 CHK_NEQ(staging->ofdm_ht_dual_stream_basic_rates,
131 active->ofdm_ht_dual_stream_basic_rates);
132 CHK_NEQ(staging->ofdm_ht_triple_stream_basic_rates,
133 active->ofdm_ht_triple_stream_basic_rates);
134 CHK_NEQ(staging->assoc_id, active->assoc_id);
135
136 /* flags, filter_flags, ofdm_basic_rates, and cck_basic_rates can
137 * be updated with the RXON_ASSOC command -- however only some
138 * flag transitions are allowed using RXON_ASSOC */
139
140 /* Check if we are not switching bands */
141 CHK_NEQ(staging->flags & RXON_FLG_BAND_24G_MSK,
142 active->flags & RXON_FLG_BAND_24G_MSK);
143
144 /* Check if we are switching association toggle */
145 CHK_NEQ(staging->filter_flags & RXON_FILTER_ASSOC_MSK,
146 active->filter_flags & RXON_FILTER_ASSOC_MSK);
147
148#undef CHK
149#undef CHK_NEQ
150
151 return 0;
152}
153
154static void _iwl_set_rxon_ht(struct iwl_priv *priv, 90static void _iwl_set_rxon_ht(struct iwl_priv *priv,
155 struct iwl_ht_config *ht_conf, 91 struct iwl_ht_config *ht_conf,
156 struct iwl_rxon_context *ctx) 92 struct iwl_rxon_context *ctx)