From: Reinette Chatre <reinette.chatre@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net,
Johannes Berg <johannes@sipsolutions.net>,
Reinette Chatre <reinette.chatre@intel.com>
Subject: [PATCH 07/13] iwlwifi: clean up ht config a little
Date: Fri, 11 Sep 2009 10:38:13 -0700 [thread overview]
Message-ID: <1252690699-25796-8-git-send-email-reinette.chatre@intel.com> (raw)
In-Reply-To: <1252690699-25796-1-git-send-email-reinette.chatre@intel.com>
From: Johannes Berg <johannes@sipsolutions.net>
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>
---
drivers/net/wireless/iwlwifi/iwl-core.c | 14 +++++---------
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 acfd7b4..7c50065 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,
{
struct iwl_ht_info *iwl_ht_conf = &priv->current_ht_config;
- if ((!iwl_ht_conf->is_ht) ||
- (iwl_ht_conf->supported_chan_width != IWL_CHANNEL_WIDTH_40MHZ))
+ if (!iwl_ht_conf->is_ht || !iwl_ht_conf->is_40mhz)
return 0;
/* We do not check for IEEE80211_HT_CAP_SUP_WIDTH_20_40
@@ -2799,21 +2798,18 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
if (conf_is_ht40_minus(conf)) {
ht_conf->extension_chan_offset =
IEEE80211_HT_PARAM_CHA_SEC_BELOW;
- ht_conf->supported_chan_width =
- IWL_CHANNEL_WIDTH_40MHZ;
+ ht_conf->is_40mhz = true;
} else if (conf_is_ht40_plus(conf)) {
ht_conf->extension_chan_offset =
IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
- ht_conf->supported_chan_width =
- IWL_CHANNEL_WIDTH_40MHZ;
+ ht_conf->is_40mhz = true;
} else {
ht_conf->extension_chan_offset =
IEEE80211_HT_PARAM_CHA_SEC_NONE;
- ht_conf->supported_chan_width =
- IWL_CHANNEL_WIDTH_20MHZ;
+ ht_conf->is_40mhz = false;
}
} else
- ht_conf->supported_chan_width = IWL_CHANNEL_WIDTH_20MHZ;
+ ht_conf->is_40mhz = false;
/* Default to no protection. Protection mode will later be set
* from BSS config in iwl_ht_conf */
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 028d505..961d534 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 {
struct iwl_ht_info {
/* self configuration data */
- u8 is_ht;
- u8 supported_chan_width;
+ bool is_ht;
+ bool is_40mhz;
u8 sm_ps;
struct ieee80211_mcs_info mcs;
/* BSS related data */
@@ -726,9 +726,6 @@ struct iwl_dma_ptr {
size_t size;
};
-#define IWL_CHANNEL_WIDTH_20MHZ 0
-#define IWL_CHANNEL_WIDTH_40MHZ 1
-
#define IWL_OPERATION_MODE_AUTO 0
#define IWL_OPERATION_MODE_HT_ONLY 1
#define IWL_OPERATION_MODE_MIXED 2
--
1.5.6.3
next prev parent reply other threads:[~2009-09-11 17:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 17:38 [PATCH 0/13] iwlwifi driver updates 09/11/2009 Reinette Chatre
2009-09-11 17:38 ` [PATCH 01/13] iwlwifi: modify LED blink index table Reinette Chatre
2009-09-11 17:38 ` [PATCH 02/13 v2.6.32 and w-t] iwlwifi: fix HT operation in 2.4 GHz band Reinette Chatre
2009-09-11 17:38 ` [PATCH 03/13] iwlwifi: remove un-supported eeprom parameters Reinette Chatre
2009-09-11 17:38 ` [PATCH 04/13] iwlwifi: separate nic_config for different NIC Reinette Chatre
2009-09-11 17:38 ` [PATCH 05/13] iwlwifi: separate set_hw_params function for 6000 series Reinette Chatre
2009-09-11 17:38 ` [PATCH 06/13 v2.6.32 and w-t] iwlwifi: fix potential rx buffer loss Reinette Chatre
2009-09-11 17:38 ` Reinette Chatre [this message]
2009-09-11 17:46 ` [PATCH 07/13] iwlwifi: clean up ht config a little Gábor Stefanik
2009-09-11 21:12 ` reinette chatre
2009-09-12 13:12 ` Johannes Berg
2009-09-11 17:38 ` [PATCH 08/13] iwlwifi: Adjust blink rate to compensate Clock difference Reinette Chatre
2009-09-11 17:38 ` [PATCH 09/13] iwlwifi: clean up ht config naming Reinette Chatre
2009-09-13 23:45 ` [ipw3945-devel] " Tomas Winkler
2009-09-13 23:52 ` Johannes Berg
2009-09-11 17:38 ` [PATCH 10/13] iwlwifi: show NVM version in debugfs Reinette Chatre
2009-09-11 17:38 ` [PATCH 11/13] iwlwifi: clarify and clean up chain settings Reinette Chatre
2009-09-11 17:38 ` [PATCH 12/13 v2.6.32 and w-t] iwlwifi: find the correct first antenna Reinette Chatre
2009-09-11 17:38 ` [PATCH 13/13 v2.6.32 and w-t] iwlwifi: disable powersave for 4965 Reinette Chatre
2009-09-11 17:48 ` reinette chatre
2009-09-11 17:50 ` [PATCH 13/13 v2.6.32] " reinette chatre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1252690699-25796-8-git-send-email-reinette.chatre@intel.com \
--to=reinette.chatre@intel.com \
--cc=ipw3945-devel@lists.sourceforge.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox