diff options
author | David S. Miller <davem@davemloft.net> | 2010-07-23 17:03:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-23 17:03:38 -0400 |
commit | 2a88e7e559f2358f4e1422d0b0c0278a74136581 (patch) | |
tree | b4e9e56dbde79fe7185cba511a1ffd85f5d2018e /net/mac80211 | |
parent | 344e0f623cec5eba273db06fe57db080988d6b26 (diff) | |
parent | 7a17a33c0da37f8d24222c967550d19dabf13617 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-commands.h
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 4 | ||||
-rw-r--r-- | net/mac80211/ht.c | 2 | ||||
-rw-r--r-- | net/mac80211/ibss.c | 92 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 7 | ||||
-rw-r--r-- | net/mac80211/iface.c | 6 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 13 | ||||
-rw-r--r-- | net/mac80211/util.c | 7 | ||||
-rw-r--r-- | net/mac80211/wep.c | 5 |
8 files changed, 77 insertions, 59 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 5e56e91c92c4..a3f3325df9f2 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1154,10 +1154,6 @@ static int ieee80211_set_txq_params(struct wiphy *wiphy, | |||
1154 | return -EINVAL; | 1154 | return -EINVAL; |
1155 | } | 1155 | } |
1156 | 1156 | ||
1157 | /* enable WMM or activate new settings */ | ||
1158 | local->hw.conf.flags |= IEEE80211_CONF_QOS; | ||
1159 | drv_config(local, IEEE80211_CONF_CHANGE_QOS); | ||
1160 | |||
1161 | return 0; | 1157 | return 0; |
1162 | } | 1158 | } |
1163 | 1159 | ||
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index be928ef7ef51..9d101fb33861 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -29,7 +29,7 @@ void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband, | |||
29 | 29 | ||
30 | memset(ht_cap, 0, sizeof(*ht_cap)); | 30 | memset(ht_cap, 0, sizeof(*ht_cap)); |
31 | 31 | ||
32 | if (!ht_cap_ie) | 32 | if (!ht_cap_ie || !sband->ht_cap.ht_supported) |
33 | return; | 33 | return; |
34 | 34 | ||
35 | ht_cap->ht_supported = true; | 35 | ht_cap->ht_supported = true; |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index d4e84b22a66d..c691780725a7 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -43,6 +43,8 @@ static void ieee80211_rx_mgmt_auth_ibss(struct ieee80211_sub_if_data *sdata, | |||
43 | { | 43 | { |
44 | u16 auth_alg, auth_transaction, status_code; | 44 | u16 auth_alg, auth_transaction, status_code; |
45 | 45 | ||
46 | lockdep_assert_held(&sdata->u.ibss.mtx); | ||
47 | |||
46 | if (len < 24 + 6) | 48 | if (len < 24 + 6) |
47 | return; | 49 | return; |
48 | 50 | ||
@@ -78,6 +80,8 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
78 | u32 bss_change; | 80 | u32 bss_change; |
79 | u8 supp_rates[IEEE80211_MAX_SUPP_RATES]; | 81 | u8 supp_rates[IEEE80211_MAX_SUPP_RATES]; |
80 | 82 | ||
83 | lockdep_assert_held(&ifibss->mtx); | ||
84 | |||
81 | /* Reset own TSF to allow time synchronization work. */ | 85 | /* Reset own TSF to allow time synchronization work. */ |
82 | drv_reset_tsf(local); | 86 | drv_reset_tsf(local); |
83 | 87 | ||
@@ -205,6 +209,8 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
205 | int i, j; | 209 | int i, j; |
206 | u16 beacon_int = cbss->beacon_interval; | 210 | u16 beacon_int = cbss->beacon_interval; |
207 | 211 | ||
212 | lockdep_assert_held(&sdata->u.ibss.mtx); | ||
213 | |||
208 | if (beacon_int < 10) | 214 | if (beacon_int < 10) |
209 | beacon_int = 10; | 215 | beacon_int = 10; |
210 | 216 | ||
@@ -449,6 +455,8 @@ static int ieee80211_sta_active_ibss(struct ieee80211_sub_if_data *sdata) | |||
449 | int active = 0; | 455 | int active = 0; |
450 | struct sta_info *sta; | 456 | struct sta_info *sta; |
451 | 457 | ||
458 | lockdep_assert_held(&sdata->u.ibss.mtx); | ||
459 | |||
452 | rcu_read_lock(); | 460 | rcu_read_lock(); |
453 | 461 | ||
454 | list_for_each_entry_rcu(sta, &local->sta_list, list) { | 462 | list_for_each_entry_rcu(sta, &local->sta_list, list) { |
@@ -473,6 +481,8 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata) | |||
473 | { | 481 | { |
474 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; | 482 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; |
475 | 483 | ||
484 | lockdep_assert_held(&ifibss->mtx); | ||
485 | |||
476 | mod_timer(&ifibss->timer, | 486 | mod_timer(&ifibss->timer, |
477 | round_jiffies(jiffies + IEEE80211_IBSS_MERGE_INTERVAL)); | 487 | round_jiffies(jiffies + IEEE80211_IBSS_MERGE_INTERVAL)); |
478 | 488 | ||
@@ -505,6 +515,8 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata) | |||
505 | u16 capability; | 515 | u16 capability; |
506 | int i; | 516 | int i; |
507 | 517 | ||
518 | lockdep_assert_held(&ifibss->mtx); | ||
519 | |||
508 | if (ifibss->fixed_bssid) { | 520 | if (ifibss->fixed_bssid) { |
509 | memcpy(bssid, ifibss->bssid, ETH_ALEN); | 521 | memcpy(bssid, ifibss->bssid, ETH_ALEN); |
510 | } else { | 522 | } else { |
@@ -549,6 +561,8 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
549 | int active_ibss; | 561 | int active_ibss; |
550 | u16 capability; | 562 | u16 capability; |
551 | 563 | ||
564 | lockdep_assert_held(&ifibss->mtx); | ||
565 | |||
552 | active_ibss = ieee80211_sta_active_ibss(sdata); | 566 | active_ibss = ieee80211_sta_active_ibss(sdata); |
553 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 567 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
554 | printk(KERN_DEBUG "%s: sta_find_ibss (active_ibss=%d)\n", | 568 | printk(KERN_DEBUG "%s: sta_find_ibss (active_ibss=%d)\n", |
@@ -637,6 +651,8 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
637 | struct ieee80211_mgmt *resp; | 651 | struct ieee80211_mgmt *resp; |
638 | u8 *pos, *end; | 652 | u8 *pos, *end; |
639 | 653 | ||
654 | lockdep_assert_held(&ifibss->mtx); | ||
655 | |||
640 | if (ifibss->state != IEEE80211_IBSS_MLME_JOINED || | 656 | if (ifibss->state != IEEE80211_IBSS_MLME_JOINED || |
641 | len < 24 + 2 || !ifibss->presp) | 657 | len < 24 + 2 || !ifibss->presp) |
642 | return; | 658 | return; |
@@ -740,6 +756,8 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
740 | mgmt = (struct ieee80211_mgmt *) skb->data; | 756 | mgmt = (struct ieee80211_mgmt *) skb->data; |
741 | fc = le16_to_cpu(mgmt->frame_control); | 757 | fc = le16_to_cpu(mgmt->frame_control); |
742 | 758 | ||
759 | mutex_lock(&sdata->u.ibss.mtx); | ||
760 | |||
743 | switch (fc & IEEE80211_FCTL_STYPE) { | 761 | switch (fc & IEEE80211_FCTL_STYPE) { |
744 | case IEEE80211_STYPE_PROBE_REQ: | 762 | case IEEE80211_STYPE_PROBE_REQ: |
745 | ieee80211_rx_mgmt_probe_req(sdata, mgmt, skb->len); | 763 | ieee80211_rx_mgmt_probe_req(sdata, mgmt, skb->len); |
@@ -756,14 +774,23 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
756 | ieee80211_rx_mgmt_auth_ibss(sdata, mgmt, skb->len); | 774 | ieee80211_rx_mgmt_auth_ibss(sdata, mgmt, skb->len); |
757 | break; | 775 | break; |
758 | } | 776 | } |
777 | |||
778 | mutex_unlock(&sdata->u.ibss.mtx); | ||
759 | } | 779 | } |
760 | 780 | ||
761 | void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata) | 781 | void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata) |
762 | { | 782 | { |
763 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; | 783 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; |
764 | 784 | ||
765 | if (!test_and_clear_bit(IEEE80211_IBSS_REQ_RUN, &ifibss->request)) | 785 | mutex_lock(&ifibss->mtx); |
766 | return; | 786 | |
787 | /* | ||
788 | * Work could be scheduled after scan or similar | ||
789 | * when we aren't even joined (or trying) with a | ||
790 | * network. | ||
791 | */ | ||
792 | if (!ifibss->ssid_len) | ||
793 | goto out; | ||
767 | 794 | ||
768 | switch (ifibss->state) { | 795 | switch (ifibss->state) { |
769 | case IEEE80211_IBSS_MLME_SEARCH: | 796 | case IEEE80211_IBSS_MLME_SEARCH: |
@@ -776,15 +803,9 @@ void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata) | |||
776 | WARN_ON(1); | 803 | WARN_ON(1); |
777 | break; | 804 | break; |
778 | } | 805 | } |
779 | } | ||
780 | 806 | ||
781 | static void ieee80211_queue_ibss_work(struct ieee80211_sub_if_data *sdata) | 807 | out: |
782 | { | 808 | mutex_unlock(&ifibss->mtx); |
783 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; | ||
784 | struct ieee80211_local *local = sdata->local; | ||
785 | |||
786 | set_bit(IEEE80211_IBSS_REQ_RUN, &ifibss->request); | ||
787 | ieee80211_queue_work(&local->hw, &sdata->work); | ||
788 | } | 809 | } |
789 | 810 | ||
790 | static void ieee80211_ibss_timer(unsigned long data) | 811 | static void ieee80211_ibss_timer(unsigned long data) |
@@ -799,7 +820,7 @@ static void ieee80211_ibss_timer(unsigned long data) | |||
799 | return; | 820 | return; |
800 | } | 821 | } |
801 | 822 | ||
802 | ieee80211_queue_ibss_work(sdata); | 823 | ieee80211_queue_work(&local->hw, &sdata->work); |
803 | } | 824 | } |
804 | 825 | ||
805 | #ifdef CONFIG_PM | 826 | #ifdef CONFIG_PM |
@@ -828,6 +849,7 @@ void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata) | |||
828 | 849 | ||
829 | setup_timer(&ifibss->timer, ieee80211_ibss_timer, | 850 | setup_timer(&ifibss->timer, ieee80211_ibss_timer, |
830 | (unsigned long) sdata); | 851 | (unsigned long) sdata); |
852 | mutex_init(&ifibss->mtx); | ||
831 | } | 853 | } |
832 | 854 | ||
833 | /* scan finished notification */ | 855 | /* scan finished notification */ |
@@ -841,10 +863,8 @@ void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local) | |||
841 | continue; | 863 | continue; |
842 | if (sdata->vif.type != NL80211_IFTYPE_ADHOC) | 864 | if (sdata->vif.type != NL80211_IFTYPE_ADHOC) |
843 | continue; | 865 | continue; |
844 | if (!sdata->u.ibss.ssid_len) | ||
845 | continue; | ||
846 | sdata->u.ibss.last_scan_completed = jiffies; | 866 | sdata->u.ibss.last_scan_completed = jiffies; |
847 | ieee80211_queue_ibss_work(sdata); | 867 | ieee80211_queue_work(&local->hw, &sdata->work); |
848 | } | 868 | } |
849 | mutex_unlock(&local->iflist_mtx); | 869 | mutex_unlock(&local->iflist_mtx); |
850 | } | 870 | } |
@@ -854,6 +874,17 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, | |||
854 | { | 874 | { |
855 | struct sk_buff *skb; | 875 | struct sk_buff *skb; |
856 | 876 | ||
877 | skb = dev_alloc_skb(sdata->local->hw.extra_tx_headroom + | ||
878 | 36 /* bitrates */ + | ||
879 | 34 /* SSID */ + | ||
880 | 3 /* DS params */ + | ||
881 | 4 /* IBSS params */ + | ||
882 | params->ie_len); | ||
883 | if (!skb) | ||
884 | return -ENOMEM; | ||
885 | |||
886 | mutex_lock(&sdata->u.ibss.mtx); | ||
887 | |||
857 | if (params->bssid) { | 888 | if (params->bssid) { |
858 | memcpy(sdata->u.ibss.bssid, params->bssid, ETH_ALEN); | 889 | memcpy(sdata->u.ibss.bssid, params->bssid, ETH_ALEN); |
859 | sdata->u.ibss.fixed_bssid = true; | 890 | sdata->u.ibss.fixed_bssid = true; |
@@ -882,35 +913,19 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, | |||
882 | sdata->u.ibss.ie_len = params->ie_len; | 913 | sdata->u.ibss.ie_len = params->ie_len; |
883 | } | 914 | } |
884 | 915 | ||
885 | skb = dev_alloc_skb(sdata->local->hw.extra_tx_headroom + | ||
886 | 36 /* bitrates */ + | ||
887 | 34 /* SSID */ + | ||
888 | 3 /* DS params */ + | ||
889 | 4 /* IBSS params */ + | ||
890 | params->ie_len); | ||
891 | if (!skb) | ||
892 | return -ENOMEM; | ||
893 | |||
894 | sdata->u.ibss.skb = skb; | 916 | sdata->u.ibss.skb = skb; |
895 | sdata->u.ibss.state = IEEE80211_IBSS_MLME_SEARCH; | 917 | sdata->u.ibss.state = IEEE80211_IBSS_MLME_SEARCH; |
896 | sdata->u.ibss.ibss_join_req = jiffies; | 918 | sdata->u.ibss.ibss_join_req = jiffies; |
897 | 919 | ||
898 | memcpy(sdata->u.ibss.ssid, params->ssid, IEEE80211_MAX_SSID_LEN); | 920 | memcpy(sdata->u.ibss.ssid, params->ssid, IEEE80211_MAX_SSID_LEN); |
899 | |||
900 | /* | ||
901 | * The ssid_len setting below is used to see whether | ||
902 | * we are active, and we need all other settings | ||
903 | * before that may get visible. | ||
904 | */ | ||
905 | mb(); | ||
906 | |||
907 | sdata->u.ibss.ssid_len = params->ssid_len; | 921 | sdata->u.ibss.ssid_len = params->ssid_len; |
908 | 922 | ||
909 | ieee80211_recalc_idle(sdata->local); | 923 | ieee80211_recalc_idle(sdata->local); |
910 | 924 | ||
911 | set_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request); | ||
912 | ieee80211_queue_work(&sdata->local->hw, &sdata->work); | 925 | ieee80211_queue_work(&sdata->local->hw, &sdata->work); |
913 | 926 | ||
927 | mutex_unlock(&sdata->u.ibss.mtx); | ||
928 | |||
914 | return 0; | 929 | return 0; |
915 | } | 930 | } |
916 | 931 | ||
@@ -921,7 +936,9 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) | |||
921 | struct ieee80211_local *local = sdata->local; | 936 | struct ieee80211_local *local = sdata->local; |
922 | struct cfg80211_bss *cbss; | 937 | struct cfg80211_bss *cbss; |
923 | u16 capability; | 938 | u16 capability; |
924 | int active_ibss = 0; | 939 | int active_ibss; |
940 | |||
941 | mutex_lock(&sdata->u.ibss.mtx); | ||
925 | 942 | ||
926 | active_ibss = ieee80211_sta_active_ibss(sdata); | 943 | active_ibss = ieee80211_sta_active_ibss(sdata); |
927 | 944 | ||
@@ -943,11 +960,6 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) | |||
943 | } | 960 | } |
944 | } | 961 | } |
945 | 962 | ||
946 | del_timer_sync(&sdata->u.ibss.timer); | ||
947 | clear_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request); | ||
948 | cancel_work_sync(&sdata->work); | ||
949 | clear_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request); | ||
950 | |||
951 | sta_info_flush(sdata->local, sdata); | 963 | sta_info_flush(sdata->local, sdata); |
952 | 964 | ||
953 | /* remove beacon */ | 965 | /* remove beacon */ |
@@ -964,6 +976,10 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) | |||
964 | memset(sdata->u.ibss.bssid, 0, ETH_ALEN); | 976 | memset(sdata->u.ibss.bssid, 0, ETH_ALEN); |
965 | sdata->u.ibss.ssid_len = 0; | 977 | sdata->u.ibss.ssid_len = 0; |
966 | 978 | ||
979 | del_timer_sync(&sdata->u.ibss.timer); | ||
980 | |||
981 | mutex_unlock(&sdata->u.ibss.mtx); | ||
982 | |||
967 | ieee80211_recalc_idle(sdata->local); | 983 | ieee80211_recalc_idle(sdata->local); |
968 | 984 | ||
969 | return 0; | 985 | return 0; |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index a3649a86a784..ef470064b154 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -377,14 +377,11 @@ struct ieee80211_if_managed { | |||
377 | int last_cqm_event_signal; | 377 | int last_cqm_event_signal; |
378 | }; | 378 | }; |
379 | 379 | ||
380 | enum ieee80211_ibss_request { | ||
381 | IEEE80211_IBSS_REQ_RUN = 0, | ||
382 | }; | ||
383 | |||
384 | struct ieee80211_if_ibss { | 380 | struct ieee80211_if_ibss { |
385 | struct timer_list timer; | 381 | struct timer_list timer; |
386 | 382 | ||
387 | unsigned long request; | 383 | struct mutex mtx; |
384 | |||
388 | unsigned long last_scan_completed; | 385 | unsigned long last_scan_completed; |
389 | 386 | ||
390 | u32 basic_rates; | 387 | u32 basic_rates; |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 910729fc18cd..ebbe264e2b0b 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -249,6 +249,8 @@ static int ieee80211_open(struct net_device *dev) | |||
249 | local->fif_other_bss++; | 249 | local->fif_other_bss++; |
250 | 250 | ||
251 | ieee80211_configure_filter(local); | 251 | ieee80211_configure_filter(local); |
252 | |||
253 | netif_carrier_on(dev); | ||
252 | break; | 254 | break; |
253 | default: | 255 | default: |
254 | res = drv_add_interface(local, &sdata->vif); | 256 | res = drv_add_interface(local, &sdata->vif); |
@@ -741,7 +743,7 @@ static void ieee80211_iface_work(struct work_struct *work) | |||
741 | int len = skb->len; | 743 | int len = skb->len; |
742 | 744 | ||
743 | mutex_lock(&local->sta_mtx); | 745 | mutex_lock(&local->sta_mtx); |
744 | sta = sta_info_get(sdata, mgmt->sa); | 746 | sta = sta_info_get_bss(sdata, mgmt->sa); |
745 | if (sta) { | 747 | if (sta) { |
746 | switch (mgmt->u.action.u.addba_req.action_code) { | 748 | switch (mgmt->u.action.u.addba_req.action_code) { |
747 | case WLAN_ACTION_ADDBA_REQ: | 749 | case WLAN_ACTION_ADDBA_REQ: |
@@ -782,7 +784,7 @@ static void ieee80211_iface_work(struct work_struct *work) | |||
782 | * right, so terminate the session. | 784 | * right, so terminate the session. |
783 | */ | 785 | */ |
784 | mutex_lock(&local->sta_mtx); | 786 | mutex_lock(&local->sta_mtx); |
785 | sta = sta_info_get(sdata, mgmt->sa); | 787 | sta = sta_info_get_bss(sdata, mgmt->sa); |
786 | if (sta) { | 788 | if (sta) { |
787 | u16 tid = *ieee80211_get_qos_ctl(hdr) & | 789 | u16 tid = *ieee80211_get_qos_ctl(hdr) & |
788 | IEEE80211_QOS_CTL_TID_MASK; | 790 | IEEE80211_QOS_CTL_TID_MASK; |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index d1962650b254..cf8d72196c65 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -698,10 +698,11 @@ void ieee80211_dynamic_ps_timer(unsigned long data) | |||
698 | 698 | ||
699 | /* MLME */ | 699 | /* MLME */ |
700 | static void ieee80211_sta_wmm_params(struct ieee80211_local *local, | 700 | static void ieee80211_sta_wmm_params(struct ieee80211_local *local, |
701 | struct ieee80211_if_managed *ifmgd, | 701 | struct ieee80211_sub_if_data *sdata, |
702 | u8 *wmm_param, size_t wmm_param_len) | 702 | u8 *wmm_param, size_t wmm_param_len) |
703 | { | 703 | { |
704 | struct ieee80211_tx_queue_params params; | 704 | struct ieee80211_tx_queue_params params; |
705 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | ||
705 | size_t left; | 706 | size_t left; |
706 | int count; | 707 | int count; |
707 | u8 *pos, uapsd_queues = 0; | 708 | u8 *pos, uapsd_queues = 0; |
@@ -790,8 +791,8 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local, | |||
790 | } | 791 | } |
791 | 792 | ||
792 | /* enable WMM or activate new settings */ | 793 | /* enable WMM or activate new settings */ |
793 | local->hw.conf.flags |= IEEE80211_CONF_QOS; | 794 | sdata->vif.bss_conf.qos = true; |
794 | drv_config(local, IEEE80211_CONF_CHANGE_QOS); | 795 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_QOS); |
795 | } | 796 | } |
796 | 797 | ||
797 | static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata, | 798 | static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata, |
@@ -1325,7 +1326,7 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk, | |||
1325 | } | 1326 | } |
1326 | 1327 | ||
1327 | if (elems.wmm_param) | 1328 | if (elems.wmm_param) |
1328 | ieee80211_sta_wmm_params(local, ifmgd, elems.wmm_param, | 1329 | ieee80211_sta_wmm_params(local, sdata, elems.wmm_param, |
1329 | elems.wmm_param_len); | 1330 | elems.wmm_param_len); |
1330 | else | 1331 | else |
1331 | ieee80211_set_wmm_default(sdata); | 1332 | ieee80211_set_wmm_default(sdata); |
@@ -1597,7 +1598,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
1597 | ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems, | 1598 | ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems, |
1598 | true); | 1599 | true); |
1599 | 1600 | ||
1600 | ieee80211_sta_wmm_params(local, ifmgd, elems.wmm_param, | 1601 | ieee80211_sta_wmm_params(local, sdata, elems.wmm_param, |
1601 | elems.wmm_param_len); | 1602 | elems.wmm_param_len); |
1602 | } | 1603 | } |
1603 | 1604 | ||
@@ -2030,6 +2031,8 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata, | |||
2030 | auth_alg = WLAN_AUTH_OPEN; | 2031 | auth_alg = WLAN_AUTH_OPEN; |
2031 | break; | 2032 | break; |
2032 | case NL80211_AUTHTYPE_SHARED_KEY: | 2033 | case NL80211_AUTHTYPE_SHARED_KEY: |
2034 | if (IS_ERR(sdata->local->wep_tx_tfm)) | ||
2035 | return -EOPNOTSUPP; | ||
2033 | auth_alg = WLAN_AUTH_SHARED_KEY; | 2036 | auth_alg = WLAN_AUTH_SHARED_KEY; |
2034 | break; | 2037 | break; |
2035 | case NL80211_AUTHTYPE_FT: | 2038 | case NL80211_AUTHTYPE_FT: |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index a54cf146ed50..794792177376 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -803,8 +803,8 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata) | |||
803 | 803 | ||
804 | /* after reinitialize QoS TX queues setting to default, | 804 | /* after reinitialize QoS TX queues setting to default, |
805 | * disable QoS at all */ | 805 | * disable QoS at all */ |
806 | local->hw.conf.flags &= ~IEEE80211_CONF_QOS; | 806 | sdata->vif.bss_conf.qos = sdata->vif.type != NL80211_IFTYPE_STATION; |
807 | drv_config(local, IEEE80211_CONF_CHANGE_QOS); | 807 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_QOS); |
808 | } | 808 | } |
809 | 809 | ||
810 | void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, | 810 | void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, |
@@ -1161,7 +1161,8 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1161 | BSS_CHANGED_BASIC_RATES | | 1161 | BSS_CHANGED_BASIC_RATES | |
1162 | BSS_CHANGED_BEACON_INT | | 1162 | BSS_CHANGED_BEACON_INT | |
1163 | BSS_CHANGED_BSSID | | 1163 | BSS_CHANGED_BSSID | |
1164 | BSS_CHANGED_CQM; | 1164 | BSS_CHANGED_CQM | |
1165 | BSS_CHANGED_QOS; | ||
1165 | 1166 | ||
1166 | switch (sdata->vif.type) { | 1167 | switch (sdata->vif.type) { |
1167 | case NL80211_IFTYPE_STATION: | 1168 | case NL80211_IFTYPE_STATION: |
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c index 6d133b6efce5..9ebc8d8a1f5b 100644 --- a/net/mac80211/wep.c +++ b/net/mac80211/wep.c | |||
@@ -32,13 +32,16 @@ int ieee80211_wep_init(struct ieee80211_local *local) | |||
32 | 32 | ||
33 | local->wep_tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, | 33 | local->wep_tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, |
34 | CRYPTO_ALG_ASYNC); | 34 | CRYPTO_ALG_ASYNC); |
35 | if (IS_ERR(local->wep_tx_tfm)) | 35 | if (IS_ERR(local->wep_tx_tfm)) { |
36 | local->wep_rx_tfm = ERR_PTR(-EINVAL); | ||
36 | return PTR_ERR(local->wep_tx_tfm); | 37 | return PTR_ERR(local->wep_tx_tfm); |
38 | } | ||
37 | 39 | ||
38 | local->wep_rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, | 40 | local->wep_rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, |
39 | CRYPTO_ALG_ASYNC); | 41 | CRYPTO_ALG_ASYNC); |
40 | if (IS_ERR(local->wep_rx_tfm)) { | 42 | if (IS_ERR(local->wep_rx_tfm)) { |
41 | crypto_free_blkcipher(local->wep_tx_tfm); | 43 | crypto_free_blkcipher(local->wep_tx_tfm); |
44 | local->wep_tx_tfm = ERR_PTR(-EINVAL); | ||
42 | return PTR_ERR(local->wep_rx_tfm); | 45 | return PTR_ERR(local->wep_rx_tfm); |
43 | } | 46 | } |
44 | 47 | ||