summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/dvm
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-05-21 20:03:01 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-06-06 13:21:16 +0200
commitd370493f9be79530950dfab23b980ce60bc84f34 (patch)
tree4be4bec91797f5becbc516c9cfeb42111118a6f4 /drivers/net/wireless/iwlwifi/dvm
parent2587d36b1e121b84993e66dc8624c60793e25921 (diff)
downloadtalos-obmc-linux-d370493f9be79530950dfab23b980ce60bc84f34.tar.gz
talos-obmc-linux-d370493f9be79530950dfab23b980ce60bc84f34.zip
iwlwifi: move ht40 bitmap into config
There's no need to dynamically fill the HT40 band bitmap as it's a device parameter, just put it into the HT configuration. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/dev.h2
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/devices.c13
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/main.c9
3 files changed, 6 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/dev.h b/drivers/net/wireless/iwlwifi/dvm/dev.h
index 2880a0a3da68..af9de9542922 100644
--- a/drivers/net/wireless/iwlwifi/dvm/dev.h
+++ b/drivers/net/wireless/iwlwifi/dvm/dev.h
@@ -635,7 +635,6 @@ enum iwl_scan_type {
* @rx_chains_num: Number of RX chains
* @valid_tx_ant: usable antennas for TX
* @valid_rx_ant: usable antennas for RX
- * @ht40_channel: is 40MHz width possible: BIT(IEEE80211_BAND_XXX)
* @sku: sku read from EEPROM
* @ct_kill_threshold: temperature threshold - in hw dependent unit
* @ct_kill_exit_threshold: when to reeable the device - in hw dependent unit
@@ -648,7 +647,6 @@ struct iwl_hw_params {
u8 rx_chains_num;
u8 valid_tx_ant;
u8 valid_rx_ant;
- u8 ht40_channel;
bool use_rts_for_aggregation;
u16 sku;
u32 ct_kill_threshold;
diff --git a/drivers/net/wireless/iwlwifi/dvm/devices.c b/drivers/net/wireless/iwlwifi/dvm/devices.c
index 7d3bb1e2d196..ddf053c5713d 100644
--- a/drivers/net/wireless/iwlwifi/dvm/devices.c
+++ b/drivers/net/wireless/iwlwifi/dvm/devices.c
@@ -171,8 +171,6 @@ static const struct iwl_sensitivity_ranges iwl1000_sensitivity = {
static void iwl1000_hw_set_hw_params(struct iwl_priv *priv)
{
- priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ);
-
iwl1000_set_ct_threshold(priv);
/* Set initial sensitivity parameters */
@@ -244,8 +242,6 @@ static const struct iwl_sensitivity_ranges iwl2000_sensitivity = {
static void iwl2000_hw_set_hw_params(struct iwl_priv *priv)
{
- priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ);
-
iwl2000_set_ct_threshold(priv);
/* Set initial sensitivity parameters */
@@ -389,9 +385,6 @@ static void iwl5000_set_ct_threshold(struct iwl_priv *priv)
static void iwl5000_hw_set_hw_params(struct iwl_priv *priv)
{
- priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
- BIT(IEEE80211_BAND_5GHZ);
-
iwl5000_set_ct_threshold(priv);
/* Set initial sensitivity parameters */
@@ -400,9 +393,6 @@ static void iwl5000_hw_set_hw_params(struct iwl_priv *priv)
static void iwl5150_hw_set_hw_params(struct iwl_priv *priv)
{
- priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
- BIT(IEEE80211_BAND_5GHZ);
-
iwl5150_set_ct_threshold(priv);
/* Set initial sensitivity parameters */
@@ -594,9 +584,6 @@ static const struct iwl_sensitivity_ranges iwl6000_sensitivity = {
static void iwl6000_hw_set_hw_params(struct iwl_priv *priv)
{
- priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
- BIT(IEEE80211_BAND_5GHZ);
-
iwl6000_set_ct_threshold(priv);
/* Set initial sensitivity parameters */
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c
index d67ae99c00b9..441188725985 100644
--- a/drivers/net/wireless/iwlwifi/dvm/main.c
+++ b/drivers/net/wireless/iwlwifi/dvm/main.c
@@ -1157,16 +1157,19 @@ static void iwl_init_ht_hw_capab(const struct iwl_priv *priv,
u8 tx_chains_num = priv->hw_params.tx_chains_num;
ht_info->cap = 0;
+ ht_info->ht_supported = false;
memset(&ht_info->mcs, 0, sizeof(ht_info->mcs));
+ if (!priv->cfg->ht_params)
+ return;
+
ht_info->ht_supported = true;
- if (priv->cfg->ht_params &&
- priv->cfg->ht_params->ht_greenfield_support)
+ if (priv->cfg->ht_params->ht_greenfield_support)
ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD;
ht_info->cap |= IEEE80211_HT_CAP_SGI_20;
max_bit_rate = MAX_BIT_RATE_20_MHZ;
- if (priv->hw_params.ht40_channel & BIT(band)) {
+ if (priv->cfg->ht_params->ht40_bands & BIT(band)) {
ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
ht_info->cap |= IEEE80211_HT_CAP_SGI_40;
ht_info->mcs.rx_mask[4] = 0x01;
OpenPOWER on IntegriCloud