aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_sta.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-03-28 19:33:32 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-08 15:05:56 -0400
commit38668c059f5202f5fd9612391f9aa1b38a97241b (patch)
treebf331e19aa1a8a8586b3cc2905c284b6f6b03cbd /net/mac80211/ieee80211_sta.c
parent9788ba7500c3a6268ceb63296a0f37f34d450beb (diff)
mac80211: eliminate conf_ht
This patch eliminates the use of conf_ht, replacing it with bss_info_changed. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_sta.c')
-rw-r--r--net/mac80211/ieee80211_sta.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 1ee07f0b02e..0e936233dac 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -493,6 +493,7 @@ static void ieee80211_set_associated(struct net_device *dev,
493{ 493{
494 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 494 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
495 struct ieee80211_local *local = sdata->local; 495 struct ieee80211_local *local = sdata->local;
496 struct ieee80211_conf *conf = &local_to_hw(local)->conf;
496 union iwreq_data wrqu; 497 union iwreq_data wrqu;
497 u32 changed = BSS_CHANGED_ASSOC; 498 u32 changed = BSS_CHANGED_ASSOC;
498 499
@@ -505,7 +506,7 @@ static void ieee80211_set_associated(struct net_device *dev,
505 return; 506 return;
506 507
507 bss = ieee80211_rx_bss_get(dev, ifsta->bssid, 508 bss = ieee80211_rx_bss_get(dev, ifsta->bssid,
508 local->hw.conf.channel->center_freq, 509 conf->channel->center_freq,
509 ifsta->ssid, ifsta->ssid_len); 510 ifsta->ssid, ifsta->ssid_len);
510 if (bss) { 511 if (bss) {
511 if (bss->has_erp_value) 512 if (bss->has_erp_value)
@@ -514,6 +515,13 @@ static void ieee80211_set_associated(struct net_device *dev,
514 ieee80211_rx_bss_put(dev, bss); 515 ieee80211_rx_bss_put(dev, bss);
515 } 516 }
516 517
518 if (conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) {
519 changed |= BSS_CHANGED_HT;
520 sdata->bss_conf.assoc_ht = 1;
521 sdata->bss_conf.ht_conf = &conf->ht_conf;
522 sdata->bss_conf.ht_bss_conf = &conf->ht_bss_conf;
523 }
524
517 netif_carrier_on(dev); 525 netif_carrier_on(dev);
518 ifsta->flags |= IEEE80211_STA_PREV_BSSID_SET; 526 ifsta->flags |= IEEE80211_STA_PREV_BSSID_SET;
519 memcpy(ifsta->prev_bssid, sdata->u.sta.bssid, ETH_ALEN); 527 memcpy(ifsta->prev_bssid, sdata->u.sta.bssid, ETH_ALEN);
@@ -524,6 +532,11 @@ static void ieee80211_set_associated(struct net_device *dev,
524 ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; 532 ifsta->flags &= ~IEEE80211_STA_ASSOCIATED;
525 netif_carrier_off(dev); 533 netif_carrier_off(dev);
526 ieee80211_reset_erp_info(dev); 534 ieee80211_reset_erp_info(dev);
535
536 sdata->bss_conf.assoc_ht = 0;
537 sdata->bss_conf.ht_conf = NULL;
538 sdata->bss_conf.ht_bss_conf = NULL;
539
527 memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); 540 memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
528 } 541 }
529 wrqu.ap_addr.sa_family = ARPHRD_ETHER; 542 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
@@ -1999,17 +2012,15 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
1999 else 2012 else
2000 sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE; 2013 sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;
2001 2014
2002 if (elems.ht_cap_elem && elems.ht_info_elem && elems.wmm_param && 2015 if (elems.ht_cap_elem && elems.ht_info_elem && elems.wmm_param) {
2003 local->ops->conf_ht) {
2004 struct ieee80211_ht_bss_info bss_info; 2016 struct ieee80211_ht_bss_info bss_info;
2005
2006 ieee80211_ht_cap_ie_to_ht_info( 2017 ieee80211_ht_cap_ie_to_ht_info(
2007 (struct ieee80211_ht_cap *) 2018 (struct ieee80211_ht_cap *)
2008 elems.ht_cap_elem, &sta->ht_info); 2019 elems.ht_cap_elem, &sta->ht_info);
2009 ieee80211_ht_addt_info_ie_to_ht_bss_info( 2020 ieee80211_ht_addt_info_ie_to_ht_bss_info(
2010 (struct ieee80211_ht_addt_info *) 2021 (struct ieee80211_ht_addt_info *)
2011 elems.ht_info_elem, &bss_info); 2022 elems.ht_info_elem, &bss_info);
2012 ieee80211_hw_config_ht(local, 1, &sta->ht_info, &bss_info); 2023 ieee80211_handle_ht(local, 1, &sta->ht_info, &bss_info);
2013 } 2024 }
2014 2025
2015 rate_control_rate_init(sta, local); 2026 rate_control_rate_init(sta, local);
@@ -2760,20 +2771,14 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev,
2760 changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]); 2771 changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]);
2761 2772
2762 if (elems.ht_cap_elem && elems.ht_info_elem && 2773 if (elems.ht_cap_elem && elems.ht_info_elem &&
2763 elems.wmm_param && local->ops->conf_ht && 2774 elems.wmm_param && conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) {
2764 conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) {
2765 struct ieee80211_ht_bss_info bss_info; 2775 struct ieee80211_ht_bss_info bss_info;
2766 2776
2767 ieee80211_ht_addt_info_ie_to_ht_bss_info( 2777 ieee80211_ht_addt_info_ie_to_ht_bss_info(
2768 (struct ieee80211_ht_addt_info *) 2778 (struct ieee80211_ht_addt_info *)
2769 elems.ht_info_elem, &bss_info); 2779 elems.ht_info_elem, &bss_info);
2770 /* check if AP changed bss inforamation */ 2780 changed |= ieee80211_handle_ht(local, 1, &conf->ht_conf,
2771 if ((conf->ht_bss_conf.primary_channel != 2781 &bss_info);
2772 bss_info.primary_channel) ||
2773 (conf->ht_bss_conf.bss_cap != bss_info.bss_cap) ||
2774 (conf->ht_bss_conf.bss_op_mode != bss_info.bss_op_mode))
2775 ieee80211_hw_config_ht(local, 1, &conf->ht_conf,
2776 &bss_info);
2777 } 2782 }
2778 2783
2779 if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { 2784 if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) {