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 07/14] mac80211: adding 802.11n configuration flows
Date: Fri, 9 Nov 2007 10:01:59 +0200 [thread overview]
Message-ID: <11945953313626-git-send-email-ron.rindjunsky@intel.com> (raw)
In-Reply-To: <11945953313491-git-send-email-ron.rindjunsky@intel.com>
This patch configures the 802.11n mode of operation
internally in ieee80211_conf structure and in the low-level
driver as well (through op conf_ht).
It does not include AP configuration flows.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
---
include/net/mac80211.h | 5 ++++
net/mac80211/ieee80211.c | 51 ++++++++++++++++++++++++++++++++++++++++++
net/mac80211/ieee80211_i.h | 5 ++++
net/mac80211/ieee80211_sta.c | 38 +++++++++++++++++++++++++++++++
4 files changed, 99 insertions(+), 0 deletions(-)
Index: wl2_6_24_HT/include/net/mac80211.h
===================================================================
--- wl2_6_24_HT.orig/include/net/mac80211.h
+++ wl2_6_24_HT/include/net/mac80211.h
@@ -1050,6 +1050,8 @@ enum ieee80211_erp_change_flags {
* @tx_last_beacon: Determine whether the last IBSS beacon was sent by us.
* This is needed only for IBSS mode and the result of this function is
* used to determine whether to reply to Probe Requests.
+ *
+ * @conf_ht: Configures low level driver with 802.11n HT data. Must be atomic.
*/
struct ieee80211_ops {
int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb,
@@ -1095,6 +1097,9 @@ struct ieee80211_ops {
struct sk_buff *skb,
struct ieee80211_tx_control *control);
int (*tx_last_beacon)(struct ieee80211_hw *hw);
+#ifdef CONFIG_MAC80211_HT
+ int (*conf_ht)(struct ieee80211_hw *hw, struct ieee80211_conf *conf);
+#endif /* CONFIG_MAC80211_HT */
};
/**
Index: wl2_6_24_HT/net/mac80211/ieee80211.c
===================================================================
--- wl2_6_24_HT.orig/net/mac80211/ieee80211.c
+++ wl2_6_24_HT/net/mac80211/ieee80211.c
@@ -534,6 +534,59 @@ int ieee80211_hw_config(struct ieee80211
return ret;
}
+#ifdef CONFIG_MAC80211_HT
+
+/**
+ * ieee80211_hw_config_ht should be used only after legacy configuration
+ * has been determined, as ht configuration depends upon the hardware's
+ * HT abilities for a _specific_ band.
+ */
+int ieee80211_hw_config_ht(struct ieee80211_local *local, int enable_ht,
+ struct ieee80211_ht_info *req_ht_cap,
+ struct ieee80211_ht_bss_info *req_bss_cap)
+{
+ struct ieee80211_conf *conf = &local->hw.conf;
+ struct ieee80211_hw_mode *mode = conf->mode;
+ int i;
+
+ /* HT is not supported */
+ if (!mode->ht_info.ht_supported) {
+ conf->flags &= ~(IEEE80211_CONF_SUPPORT_HT_MODE);
+ return -EOPNOTSUPP;
+ }
+
+ /* disable HT */
+ if (!enable_ht) {
+ conf->flags &= ~(IEEE80211_CONF_SUPPORT_HT_MODE);
+ } else {
+ conf->flags |= IEEE80211_CONF_SUPPORT_HT_MODE;
+ conf->ht_conf.cap = req_ht_cap->cap & mode->ht_info.cap;
+ conf->ht_conf.cap &= ~(IEEE80211_HT_CAP_MIMO_PS);
+ conf->ht_conf.cap |=
+ mode->ht_info.cap & IEEE80211_HT_CAP_MIMO_PS;
+ conf->ht_bss_conf.primary_channel =
+ req_bss_cap->primary_channel;
+ conf->ht_bss_conf.bss_cap = req_bss_cap->bss_cap;
+ conf->ht_bss_conf.bss_op_mode = req_bss_cap->bss_op_mode;
+ for (i = 0; i < 16; i++)
+ conf->ht_conf.supp_mcs_set[i] =
+ mode->ht_info.supp_mcs_set[i] &
+ req_ht_cap->supp_mcs_set[i];
+
+ /* In STA mode, this gives us indication
+ * to the AP's mode of operation */
+ conf->ht_conf.ht_supported = 1;
+ conf->ht_conf.ampdu_factor = req_ht_cap->ampdu_factor;
+ conf->ht_conf.ampdu_density = req_ht_cap->ampdu_density;
+ }
+
+ local->ops->conf_ht(local_to_hw(local), &local->hw.conf);
+
+ return 0;
+}
+
+#endif /* CONFIG_MAC80211_HT */
+
void ieee80211_erp_info_change_notify(struct net_device *dev, u8 changes)
{
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
Index: wl2_6_24_HT/net/mac80211/ieee80211_i.h
===================================================================
--- wl2_6_24_HT.orig/net/mac80211/ieee80211_i.h
+++ wl2_6_24_HT/net/mac80211/ieee80211_i.h
@@ -711,6 +711,11 @@ int ieee80211_if_update_wds(struct net_d
void ieee80211_if_setup(struct net_device *dev);
struct ieee80211_rate *ieee80211_get_rate(struct ieee80211_local *local,
int phymode, int hwrate);
+#ifdef CONFIG_MAC80211_HT
+int ieee80211_hw_config_ht(struct ieee80211_local *local, int enable_ht,
+ struct ieee80211_ht_info *req_ht_cap,
+ struct ieee80211_ht_bss_info *req_bss_cap);
+#endif /* CONFIG_MAC80211_HT */
/* ieee80211_ioctl.c */
extern const struct iw_handler_def ieee80211_iw_handler_def;
Index: wl2_6_24_HT/net/mac80211/ieee80211_sta.c
===================================================================
--- wl2_6_24_HT.orig/net/mac80211/ieee80211_sta.c
+++ wl2_6_24_HT/net/mac80211/ieee80211_sta.c
@@ -1451,6 +1451,21 @@ static void ieee80211_rx_mgmt_assoc_resp
}
sta->supp_rates = rates;
+#ifdef CONFIG_MAC80211_HT
+ if (elems.ht_cap_elem && elems.ht_info_elem && elems.wmm_param &&
+ local->ops->conf_ht) {
+ struct ieee80211_ht_bss_info bss_info;
+
+ ieee80211_ht_cap_ie_to_ht_info(
+ (struct ieee80211_ht_cap *)
+ elems.ht_cap_elem, &sta->ht_info);
+ ieee80211_ht_addt_info_ie_to_ht_bss_info(
+ (struct ieee80211_ht_addt_info *)
+ elems.ht_info_elem, &bss_info);
+ ieee80211_hw_config_ht(local, 1, &sta->ht_info, &bss_info);
+ }
+#endif /* CONFIG_MAC80211_HT */
+
rate_control_rate_init(sta, local);
if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) {
@@ -1866,6 +1881,10 @@ static void ieee80211_rx_mgmt_beacon(str
struct ieee80211_if_sta *ifsta;
size_t baselen;
struct ieee802_11_elems elems;
+#ifdef CONFIG_MAC80211_HT
+ struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ struct ieee80211_conf *conf = &local->hw.conf;
+#endif /* CONFIG_MAC80211_HT */
ieee80211_rx_bss_info(dev, mgmt, len, rx_status, 1);
@@ -1888,6 +1907,25 @@ static void ieee80211_rx_mgmt_beacon(str
if (elems.erp_info && elems.erp_info_len >= 1)
ieee80211_handle_erp_ie(dev, elems.erp_info[0]);
+#ifdef CONFIG_MAC80211_HT
+ if (elems.ht_cap_elem && elems.ht_info_elem &&
+ elems.wmm_param && local->ops->conf_ht &&
+ conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) {
+ struct ieee80211_ht_bss_info bss_info;
+
+ ieee80211_ht_addt_info_ie_to_ht_bss_info(
+ (struct ieee80211_ht_addt_info *)
+ elems.ht_info_elem, &bss_info);
+ /* check if AP changed bss inforamation */
+ if ((conf->ht_bss_conf.primary_channel !=
+ bss_info.primary_channel) ||
+ (conf->ht_bss_conf.bss_cap != bss_info.bss_cap) ||
+ (conf->ht_bss_conf.bss_op_mode != bss_info.bss_op_mode))
+ ieee80211_hw_config_ht(local, 1, &conf->ht_conf,
+ &bss_info);
+ }
+#endif /* CONFIG_MAC80211_HT */
+
if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) {
ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param,
elems.wmm_param_len);
---------------------------------------------------------------------
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 ` Ron Rindjunsky [this message]
2007-11-09 8:02 ` [PATCH 08/14] iwlwifi: 802.11n new framework structures preperation Ron Rindjunsky
2007-11-09 8:02 ` [PATCH 09/14] iwlwifi: 802.11n configuring hw_mode parameters to support HT in A/G Ron Rindjunsky
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=11945953313626-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).