From: Ron Rindjunsky <ron.rindjunsky@intel.com>
To: linville@tuxdriver.com
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org,
tomas.winkler@intel.com, flamingice@sourmilk.net,
Ron Rindjunsky <ron.rindjunsky@intel.com>
Subject: [PATCH 09/14] iwlwifi: 802.11n configuring hw_mode parameters to support HT in A/G
Date: Fri, 9 Nov 2007 10:02:01 +0200 [thread overview]
Message-ID: <1194595331715-git-send-email-ron.rindjunsky@intel.com> (raw)
In-Reply-To: <11945953311042-git-send-email-ron.rindjunsky@intel.com>
This patch fills the mac80211's ieee80211_hw_mode structures with the
needed 802.11n data needed for the new framework
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-4965.c | 32 ++++++++++++++++++++------
drivers/net/wireless/iwlwifi/iwl-4965.h | 4 +-
drivers/net/wireless/iwlwifi/iwl4965-base.c | 26 ++++++----------------
3 files changed, 33 insertions(+), 29 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index fed2357..0a6f6ec 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -3668,6 +3668,30 @@ static int parse_elems(u8 *start, size_t len, struct ieee802_11_elems *elems)
return 0;
}
+
+void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info, int mode)
+{
+ ht_info->cap = 0;
+ memset(ht_info->supp_mcs_set, 0, 16);
+
+ ht_info->ht_supported = 1;
+
+ if (mode == MODE_IEEE80211A) {
+ ht_info->cap |= (u16)IEEE80211_HT_CAP_SUP_WIDTH;
+ ht_info->cap |= (u16)IEEE80211_HT_CAP_SGI_40;
+ ht_info->supp_mcs_set[4] = 0x01;
+ }
+ ht_info->cap |= (u16)IEEE80211_HT_CAP_GRN_FLD;
+ ht_info->cap |= (u16)IEEE80211_HT_CAP_SGI_20;
+ ht_info->cap |= (u16)(IEEE80211_HT_CAP_MIMO_PS &
+ (IWL_MIMO_PS_NONE << 2));
+
+ ht_info->ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF;
+ ht_info->ampdu_density = CFG_HT_MPDU_DENSITY_DEF;
+
+ ht_info->supp_mcs_set[0] = 0xFF;
+ ht_info->supp_mcs_set[1] = 0xFF;
+}
#endif /* CONFIG_IWL4965_HT */
static void iwl4965_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id)
@@ -4269,14 +4293,6 @@ static int iwl4965_tx_queue_agg_disable(struct iwl_priv *priv, u16 txq_id,
#endif/* CONFIG_IWL4965_HT_AGG */
#endif /* CONFIG_IWL4965_HT */
-/*
- * RATE SCALE CODE
- */
-int iwl4965_init_hw_rates(struct iwl_priv *priv, struct ieee80211_rate *rates)
-{
- return 0;
-}
-
/**
* iwl4965_add_station - Initialize a station's hardware rate table
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h
index 71cd2b7..4a54aad 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.h
@@ -750,8 +750,6 @@ extern int iwl4965_tx_cmd(struct iwl_priv *priv, struct iwl_cmd *out_cmd,
u8 sta_id, dma_addr_t txcmd_phys,
struct ieee80211_hdr *hdr, u8 hdr_len,
struct ieee80211_tx_control *ctrl, void *sta_in);
-extern int iwl4965_init_hw_rates(struct iwl_priv *priv,
- struct ieee80211_rate *rates);
extern int iwl4965_alive_notify(struct iwl_priv *priv);
extern void iwl4965_update_rate_scaling(struct iwl_priv *priv, u8 mode);
extern void iwl4965_set_ht_add_station(struct iwl_priv *priv, u8 index);
@@ -766,6 +764,8 @@ extern int iwl4965_set_fat_chan_info(struct iwl_priv *priv, int phymode,
extern void iwl4965_rf_kill_ct_config(struct iwl_priv *priv);
#ifdef CONFIG_IWL4965_HT
+extern void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info,
+ int mode);
#ifdef CONFIG_IWL4965_HT_AGG
extern int iwl_mac_ht_tx_agg_start(struct ieee80211_hw *hw, u8 *da,
u16 tid, u16 *start_seq_num);
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index d9f918b..1d0946f 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -5626,8 +5626,6 @@ static void iwl_init_hw_rates(struct iwl_priv *priv,
if (IWL_BASIC_RATES_MASK & (1 << i))
rates[i].flags |= IEEE80211_RATE_BASIC;
}
-
- iwl4965_init_hw_rates(priv, rates);
}
/**
@@ -5645,10 +5643,8 @@ static int iwl_init_geos(struct iwl_priv *priv)
A = 0,
B = 1,
G = 2,
- A_11N = 3,
- G_11N = 4,
};
- int mode_count = 5;
+ int mode_count = 3;
if (priv->modes) {
IWL_DEBUG_INFO("Geography modes already initialized.\n");
@@ -5688,6 +5684,9 @@ static int iwl_init_geos(struct iwl_priv *priv)
modes[A].num_rates = 8; /* just OFDM */
modes[A].rates = &rates[4];
modes[A].num_channels = 0;
+#ifdef CONFIG_IWL4965_HT
+ iwl4965_init_ht_hw_capab(&modes[A].ht_info, MODE_IEEE80211A);
+#endif
modes[B].mode = MODE_IEEE80211B;
modes[B].channels = channels;
@@ -5700,18 +5699,9 @@ static int iwl_init_geos(struct iwl_priv *priv)
modes[G].rates = rates;
modes[G].num_rates = 12; /* OFDM & CCK */
modes[G].num_channels = 0;
-
- modes[G_11N].mode = MODE_IEEE80211G;
- modes[G_11N].channels = channels;
- modes[G_11N].num_rates = 13; /* OFDM & CCK */
- modes[G_11N].rates = rates;
- modes[G_11N].num_channels = 0;
-
- modes[A_11N].mode = MODE_IEEE80211A;
- modes[A_11N].channels = &channels[ARRAY_SIZE(iwl_eeprom_band_1)];
- modes[A_11N].rates = &rates[4];
- modes[A_11N].num_rates = 9; /* just OFDM */
- modes[A_11N].num_channels = 0;
+#ifdef CONFIG_IWL4965_HT
+ iwl4965_init_ht_hw_capab(&modes[G].ht_info, MODE_IEEE80211G);
+#endif
priv->ieee_channels = channels;
priv->ieee_rates = rates;
@@ -5731,11 +5721,9 @@ static int iwl_init_geos(struct iwl_priv *priv)
if (is_channel_a_band(ch)) {
geo_ch = &modes[A].channels[modes[A].num_channels++];
- modes[A_11N].num_channels++;
} else {
geo_ch = &modes[B].channels[modes[B].num_channels++];
modes[G].num_channels++;
- modes[G_11N].num_channels++;
}
geo_ch->freq = ieee80211chan2mhz(ch->channel);
--
1.5.3.3
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
next prev parent reply other threads:[~2007-11-09 8:02 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-09 8:01 [PATCH 0/14] mac80211/iwlwifi (#everything): integrate IEEE802.11n support Ron Rindjunsky
2007-11-09 8:01 ` [PATCH 01/14] mac80211: adding MAC80211_HT config variable Ron Rindjunsky
2007-11-09 8:01 ` [PATCH 02/14] mac80211: adding 802.11n definitions in ieee80211.h Ron Rindjunsky
2007-11-09 8:01 ` [PATCH 03/14] mac80211: adding 802.11n HT framework definitions Ron Rindjunsky
2007-11-09 8:01 ` [PATCH 04/14] mac80211: adding 802.11n IEs handling Ron Rindjunsky
2007-11-09 8:01 ` [PATCH 05/14] mac80211: adding 802.11n essential A-MPDU addBA capability Ron Rindjunsky
2007-11-09 8:01 ` [PATCH 06/14] mac80211: adding 802.11n essential A-MSDU Rx capability Ron Rindjunsky
2007-11-09 8:01 ` [PATCH 07/14] mac80211: adding 802.11n configuration flows Ron Rindjunsky
2007-11-09 8:02 ` [PATCH 08/14] iwlwifi: 802.11n new framework structures preperation Ron Rindjunsky
2007-11-09 8:02 ` Ron Rindjunsky [this message]
2007-11-09 8:02 ` [PATCH 10/14] iwlwifi: 802.11n handling probe request HT IE Ron Rindjunsky
2007-11-09 8:02 ` [PATCH 11/14] iwlwifi: 802.11n comply HT self configuration flow with mac80211 framework Ron Rindjunsky
2007-11-09 8:02 ` [PATCH 12/14] iwlwifi: 802.11n comply HT add station " Ron Rindjunsky
2007-11-09 8:02 ` [PATCH 13/14] iwlwifi: 802.11n comply HT rate scaling flows " Ron Rindjunsky
2007-11-09 8:02 ` [PATCH 14/14] iwlwifi: 802.11n add support to 8K A-MSDU Rx frames Ron Rindjunsky
2007-11-09 16:53 ` [PATCH 12/14] iwlwifi: 802.11n comply HT add station flow with mac80211 framework Johannes Berg
2007-11-11 20:21 ` [PATCH 12/14] iwlwifi: 802.11n comply HT add station flow withmac80211 framework Rindjunsky, Ron
2007-11-12 16:35 ` Johannes Berg
2007-11-09 16:52 ` [PATCH 10/14] iwlwifi: 802.11n handling probe request HT IE Johannes Berg
2007-11-09 16:51 ` [PATCH 09/14] iwlwifi: 802.11n configuring hw_mode parameters to support HT in A/G Johannes Berg
2007-11-09 16:48 ` [PATCH 07/14] mac80211: adding 802.11n configuration flows Johannes Berg
2007-11-11 20:20 ` Rindjunsky, Ron
2007-11-12 16:37 ` Johannes Berg
2007-11-13 15:58 ` Rindjunsky, Ron
2007-11-09 16:41 ` [PATCH 06/14] mac80211: adding 802.11n essential A-MSDU Rx capability Johannes Berg
2007-11-11 20:20 ` [PATCH 06/14] mac80211: adding 802.11n essential A-MSDU Rxcapability Rindjunsky, Ron
2007-11-12 16:45 ` Johannes Berg
2007-11-13 15:58 ` [PATCH 06/14] mac80211: adding 802.11n essential A-MSDURxcapability Rindjunsky, Ron
2007-11-13 16:22 ` Rindjunsky, Ron
2007-11-13 16:32 ` Johannes Berg
2007-11-14 15:14 ` Ron Rindzonski
2007-11-19 0:19 ` [PATCH 06/14] mac80211: adding 802.11n essential A-MSDU Rxcapability Jouni Malinen
2007-11-19 13:29 ` Ron Rindjunsky
2007-11-19 15:27 ` Johannes Berg
2007-11-09 16:34 ` [PATCH 05/14] mac80211: adding 802.11n essential A-MPDU addBA capability Johannes Berg
2007-11-11 20:20 ` [PATCH 05/14] mac80211: adding 802.11n essential A-MPDU addBAcapability Rindjunsky, Ron
2007-11-12 16:48 ` Johannes Berg
2007-11-13 15:58 ` [PATCH 05/14] mac80211: adding 802.11n essential A-MPDUaddBAcapability Rindjunsky, Ron
2007-11-09 16:23 ` [PATCH 03/14] mac80211: adding 802.11n HT framework definitions Johannes Berg
2007-11-11 20:20 ` Rindjunsky, Ron
2007-11-09 16:26 ` [PATCH 02/14] mac80211: adding 802.11n definitions in ieee80211.h Johannes Berg
2007-11-11 20:20 ` [PATCH 02/14] mac80211: adding 802.11n definitions inieee80211.h Rindjunsky, Ron
2007-11-12 16:49 ` Johannes Berg
2007-11-12 3:24 ` [PATCH 01/14] mac80211: adding MAC80211_HT config variable Michael Wu
2007-11-12 7:33 ` Rindjunsky, Ron
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=1194595331715-git-send-email-ron.rindjunsky@intel.com \
--to=ron.rindjunsky@intel.com \
--cc=flamingice@sourmilk.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=tomas.winkler@intel.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;
as well as URLs for NNTP newsgroup(s).