diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-09-11 13:38:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:32 -0400 |
commit | c812ee24855e20f43cf211e51e3eb53fe6dc6f1d (patch) | |
tree | c3f2cd6dee34fce68062b711fbfa112d8357272a | |
parent | f3a2a42470c1c362b9a7b4e933a15a274d4b090e (diff) |
iwlwifi: clean up ht config a little
is_ht can be bool instead of u8, and there's
no need to use IWL_CHANNEL_WIDTH_* constants
in supported_chan_width when that could just
be named is_40mhz instead.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 7 |
2 files changed, 7 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 484d5c1a7312..c09475105c52 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -636,8 +636,7 @@ u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv, | |||
636 | { | 636 | { |
637 | struct iwl_ht_info *iwl_ht_conf = &priv->current_ht_config; | 637 | struct iwl_ht_info *iwl_ht_conf = &priv->current_ht_config; |
638 | 638 | ||
639 | if ((!iwl_ht_conf->is_ht) || | 639 | if (!iwl_ht_conf->is_ht || !iwl_ht_conf->is_40mhz) |
640 | (iwl_ht_conf->supported_chan_width != IWL_CHANNEL_WIDTH_40MHZ)) | ||
641 | return 0; | 640 | return 0; |
642 | 641 | ||
643 | /* We do not check for IEEE80211_HT_CAP_SUP_WIDTH_20_40 | 642 | /* We do not check for IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
@@ -2619,21 +2618,18 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2619 | if (conf_is_ht40_minus(conf)) { | 2618 | if (conf_is_ht40_minus(conf)) { |
2620 | ht_conf->extension_chan_offset = | 2619 | ht_conf->extension_chan_offset = |
2621 | IEEE80211_HT_PARAM_CHA_SEC_BELOW; | 2620 | IEEE80211_HT_PARAM_CHA_SEC_BELOW; |
2622 | ht_conf->supported_chan_width = | 2621 | ht_conf->is_40mhz = true; |
2623 | IWL_CHANNEL_WIDTH_40MHZ; | ||
2624 | } else if (conf_is_ht40_plus(conf)) { | 2622 | } else if (conf_is_ht40_plus(conf)) { |
2625 | ht_conf->extension_chan_offset = | 2623 | ht_conf->extension_chan_offset = |
2626 | IEEE80211_HT_PARAM_CHA_SEC_ABOVE; | 2624 | IEEE80211_HT_PARAM_CHA_SEC_ABOVE; |
2627 | ht_conf->supported_chan_width = | 2625 | ht_conf->is_40mhz = true; |
2628 | IWL_CHANNEL_WIDTH_40MHZ; | ||
2629 | } else { | 2626 | } else { |
2630 | ht_conf->extension_chan_offset = | 2627 | ht_conf->extension_chan_offset = |
2631 | IEEE80211_HT_PARAM_CHA_SEC_NONE; | 2628 | IEEE80211_HT_PARAM_CHA_SEC_NONE; |
2632 | ht_conf->supported_chan_width = | 2629 | ht_conf->is_40mhz = false; |
2633 | IWL_CHANNEL_WIDTH_20MHZ; | ||
2634 | } | 2630 | } |
2635 | } else | 2631 | } else |
2636 | ht_conf->supported_chan_width = IWL_CHANNEL_WIDTH_20MHZ; | 2632 | ht_conf->is_40mhz = false; |
2637 | /* Default to no protection. Protection mode will later be set | 2633 | /* Default to no protection. Protection mode will later be set |
2638 | * from BSS config in iwl_ht_conf */ | 2634 | * from BSS config in iwl_ht_conf */ |
2639 | ht_conf->ht_protection = IEEE80211_HT_OP_MODE_PROTECTION_NONE; | 2635 | ht_conf->ht_protection = IEEE80211_HT_OP_MODE_PROTECTION_NONE; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 028d50599550..961d53440034 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -504,8 +504,8 @@ union iwl_ht_rate_supp { | |||
504 | 504 | ||
505 | struct iwl_ht_info { | 505 | struct iwl_ht_info { |
506 | /* self configuration data */ | 506 | /* self configuration data */ |
507 | u8 is_ht; | 507 | bool is_ht; |
508 | u8 supported_chan_width; | 508 | bool is_40mhz; |
509 | u8 sm_ps; | 509 | u8 sm_ps; |
510 | struct ieee80211_mcs_info mcs; | 510 | struct ieee80211_mcs_info mcs; |
511 | /* BSS related data */ | 511 | /* BSS related data */ |
@@ -726,9 +726,6 @@ struct iwl_dma_ptr { | |||
726 | size_t size; | 726 | size_t size; |
727 | }; | 727 | }; |
728 | 728 | ||
729 | #define IWL_CHANNEL_WIDTH_20MHZ 0 | ||
730 | #define IWL_CHANNEL_WIDTH_40MHZ 1 | ||
731 | |||
732 | #define IWL_OPERATION_MODE_AUTO 0 | 729 | #define IWL_OPERATION_MODE_AUTO 0 |
733 | #define IWL_OPERATION_MODE_HT_ONLY 1 | 730 | #define IWL_OPERATION_MODE_HT_ONLY 1 |
734 | #define IWL_OPERATION_MODE_MIXED 2 | 731 | #define IWL_OPERATION_MODE_MIXED 2 |