aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/dvm/devices.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-25 13:29:27 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-04-16 09:29:44 -0400
commit85220d71bf3ca1ba9129e0744247ae5f61bec559 (patch)
tree5bdabc71bc5da27ee71fb1272b86809ac2f95b0d /drivers/net/wireless/iwlwifi/dvm/devices.c
parentb4f286a1c0ad0b84c2d502b354d4d98d5a86c64b (diff)
mac80211: support secondary channel offset in CSA
Add support for the secondary channel offset IE in channel switch announcements. This is necessary for proper handling of CSA on HT access points. For this to work it is also necessary to convert everything here to use chandef structs instead of just channels. The driver updates aren't really correct though. In particular, the TI wl18xx driver update can't possibly be right since it just ignores the new channel width for lack of firmware API. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm/devices.c')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/devices.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/devices.c b/drivers/net/wireless/iwlwifi/dvm/devices.c
index 15cca2ef9294..c48907c8ab43 100644
--- a/drivers/net/wireless/iwlwifi/dvm/devices.c
+++ b/drivers/net/wireless/iwlwifi/dvm/devices.c
@@ -379,7 +379,7 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
379 }; 379 };
380 380
381 cmd.band = priv->band == IEEE80211_BAND_2GHZ; 381 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
382 ch = ch_switch->channel->hw_value; 382 ch = ch_switch->chandef.chan->hw_value;
383 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n", 383 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
384 ctx->active.channel, ch); 384 ctx->active.channel, ch);
385 cmd.channel = cpu_to_le16(ch); 385 cmd.channel = cpu_to_le16(ch);
@@ -414,7 +414,8 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
414 } 414 }
415 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n", 415 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
416 cmd.switch_time); 416 cmd.switch_time);
417 cmd.expect_beacon = ch_switch->channel->flags & IEEE80211_CHAN_RADAR; 417 cmd.expect_beacon =
418 ch_switch->chandef.chan->flags & IEEE80211_CHAN_RADAR;
418 419
419 return iwl_dvm_send_cmd(priv, &hcmd); 420 return iwl_dvm_send_cmd(priv, &hcmd);
420} 421}
@@ -540,7 +541,7 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
540 hcmd.data[0] = cmd; 541 hcmd.data[0] = cmd;
541 542
542 cmd->band = priv->band == IEEE80211_BAND_2GHZ; 543 cmd->band = priv->band == IEEE80211_BAND_2GHZ;
543 ch = ch_switch->channel->hw_value; 544 ch = ch_switch->chandef.chan->hw_value;
544 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", 545 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
545 ctx->active.channel, ch); 546 ctx->active.channel, ch);
546 cmd->channel = cpu_to_le16(ch); 547 cmd->channel = cpu_to_le16(ch);
@@ -575,7 +576,8 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
575 } 576 }
576 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n", 577 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
577 cmd->switch_time); 578 cmd->switch_time);
578 cmd->expect_beacon = ch_switch->channel->flags & IEEE80211_CHAN_RADAR; 579 cmd->expect_beacon =
580 ch_switch->chandef.chan->flags & IEEE80211_CHAN_RADAR;
579 581
580 err = iwl_dvm_send_cmd(priv, &hcmd); 582 err = iwl_dvm_send_cmd(priv, &hcmd);
581 kfree(cmd); 583 kfree(cmd);