Commit 7ad580c2 authored by Johannes Berg's avatar Johannes Berg

iwlwifi: use mac80211 channel in connection init

mac80211 guarantees that the channel pointer is
always valid, so we can use that instead of our
own channel list.
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent aca86268
...@@ -37,8 +37,6 @@ ...@@ -37,8 +37,6 @@
void iwl_connection_init_rx_config(struct iwl_priv *priv, void iwl_connection_init_rx_config(struct iwl_priv *priv,
struct iwl_rxon_context *ctx) struct iwl_rxon_context *ctx)
{ {
const struct iwl_channel_info *ch_info;
memset(&ctx->staging, 0, sizeof(ctx->staging)); memset(&ctx->staging, 0, sizeof(ctx->staging));
if (!ctx->vif) { if (!ctx->vif) {
...@@ -80,14 +78,8 @@ void iwl_connection_init_rx_config(struct iwl_priv *priv, ...@@ -80,14 +78,8 @@ void iwl_connection_init_rx_config(struct iwl_priv *priv,
ctx->staging.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; ctx->staging.flags |= RXON_FLG_SHORT_PREAMBLE_MSK;
#endif #endif
ch_info = iwl_get_channel_info(priv, priv->band, ctx->staging.channel = cpu_to_le16(priv->hw->conf.channel->hw_value);
le16_to_cpu(ctx->active.channel)); priv->band = priv->hw->conf.channel->band;
if (!ch_info)
ch_info = &priv->channel_info[0];
ctx->staging.channel = cpu_to_le16(ch_info->channel);
priv->band = ch_info->band;
iwl_set_flags_for_band(priv, ctx, priv->band, ctx->vif); iwl_set_flags_for_band(priv, ctx, priv->band, ctx->vif);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment