diff options
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 0b30277eb366..920ec8792f4b 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -57,7 +57,7 @@ static void ieee80211_rx_mgmt_auth_ibss(struct ieee80211_sub_if_data *sdata, | |||
57 | */ | 57 | */ |
58 | if (auth_alg == WLAN_AUTH_OPEN && auth_transaction == 1) | 58 | if (auth_alg == WLAN_AUTH_OPEN && auth_transaction == 1) |
59 | ieee80211_send_auth(sdata, 2, WLAN_AUTH_OPEN, NULL, 0, | 59 | ieee80211_send_auth(sdata, 2, WLAN_AUTH_OPEN, NULL, 0, |
60 | sdata->u.ibss.bssid, 0); | 60 | sdata->u.ibss.bssid, NULL, 0, 0); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | 63 | static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, |
@@ -494,7 +494,7 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata) | |||
494 | 494 | ||
495 | capability = WLAN_CAPABILITY_IBSS; | 495 | capability = WLAN_CAPABILITY_IBSS; |
496 | 496 | ||
497 | if (sdata->default_key) | 497 | if (ifibss->privacy) |
498 | capability |= WLAN_CAPABILITY_PRIVACY; | 498 | capability |= WLAN_CAPABILITY_PRIVACY; |
499 | else | 499 | else |
500 | sdata->drop_unencrypted = 0; | 500 | sdata->drop_unencrypted = 0; |
@@ -524,9 +524,8 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
524 | return; | 524 | return; |
525 | 525 | ||
526 | capability = WLAN_CAPABILITY_IBSS; | 526 | capability = WLAN_CAPABILITY_IBSS; |
527 | if (sdata->default_key) | 527 | if (ifibss->privacy) |
528 | capability |= WLAN_CAPABILITY_PRIVACY; | 528 | capability |= WLAN_CAPABILITY_PRIVACY; |
529 | |||
530 | if (ifibss->fixed_bssid) | 529 | if (ifibss->fixed_bssid) |
531 | bssid = ifibss->bssid; | 530 | bssid = ifibss->bssid; |
532 | if (ifibss->fixed_channel) | 531 | if (ifibss->fixed_channel) |
@@ -705,7 +704,7 @@ static void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
705 | struct ieee80211_mgmt *mgmt; | 704 | struct ieee80211_mgmt *mgmt; |
706 | u16 fc; | 705 | u16 fc; |
707 | 706 | ||
708 | rx_status = (struct ieee80211_rx_status *) skb->cb; | 707 | rx_status = IEEE80211_SKB_RXCB(skb); |
709 | mgmt = (struct ieee80211_mgmt *) skb->data; | 708 | mgmt = (struct ieee80211_mgmt *) skb->data; |
710 | fc = le16_to_cpu(mgmt->frame_control); | 709 | fc = le16_to_cpu(mgmt->frame_control); |
711 | 710 | ||
@@ -743,7 +742,7 @@ static void ieee80211_ibss_work(struct work_struct *work) | |||
743 | if (!netif_running(sdata->dev)) | 742 | if (!netif_running(sdata->dev)) |
744 | return; | 743 | return; |
745 | 744 | ||
746 | if (local->sw_scanning || local->hw_scanning) | 745 | if (local->scanning) |
747 | return; | 746 | return; |
748 | 747 | ||
749 | if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_ADHOC)) | 748 | if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_ADHOC)) |
@@ -782,7 +781,7 @@ static void ieee80211_ibss_timer(unsigned long data) | |||
782 | } | 781 | } |
783 | 782 | ||
784 | set_bit(IEEE80211_IBSS_REQ_RUN, &ifibss->request); | 783 | set_bit(IEEE80211_IBSS_REQ_RUN, &ifibss->request); |
785 | queue_work(local->hw.workqueue, &ifibss->work); | 784 | ieee80211_queue_work(&local->hw, &ifibss->work); |
786 | } | 785 | } |
787 | 786 | ||
788 | #ifdef CONFIG_PM | 787 | #ifdef CONFIG_PM |
@@ -836,8 +835,7 @@ void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local) | |||
836 | } | 835 | } |
837 | 836 | ||
838 | ieee80211_rx_result | 837 | ieee80211_rx_result |
839 | ieee80211_ibss_rx_mgmt(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, | 838 | ieee80211_ibss_rx_mgmt(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) |
840 | struct ieee80211_rx_status *rx_status) | ||
841 | { | 839 | { |
842 | struct ieee80211_local *local = sdata->local; | 840 | struct ieee80211_local *local = sdata->local; |
843 | struct ieee80211_mgmt *mgmt; | 841 | struct ieee80211_mgmt *mgmt; |
@@ -852,11 +850,10 @@ ieee80211_ibss_rx_mgmt(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, | |||
852 | switch (fc & IEEE80211_FCTL_STYPE) { | 850 | switch (fc & IEEE80211_FCTL_STYPE) { |
853 | case IEEE80211_STYPE_PROBE_RESP: | 851 | case IEEE80211_STYPE_PROBE_RESP: |
854 | case IEEE80211_STYPE_BEACON: | 852 | case IEEE80211_STYPE_BEACON: |
855 | memcpy(skb->cb, rx_status, sizeof(*rx_status)); | ||
856 | case IEEE80211_STYPE_PROBE_REQ: | 853 | case IEEE80211_STYPE_PROBE_REQ: |
857 | case IEEE80211_STYPE_AUTH: | 854 | case IEEE80211_STYPE_AUTH: |
858 | skb_queue_tail(&sdata->u.ibss.skb_queue, skb); | 855 | skb_queue_tail(&sdata->u.ibss.skb_queue, skb); |
859 | queue_work(local->hw.workqueue, &sdata->u.ibss.work); | 856 | ieee80211_queue_work(&local->hw, &sdata->u.ibss.work); |
860 | return RX_QUEUED; | 857 | return RX_QUEUED; |
861 | } | 858 | } |
862 | 859 | ||
@@ -874,6 +871,8 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, | |||
874 | } else | 871 | } else |
875 | sdata->u.ibss.fixed_bssid = false; | 872 | sdata->u.ibss.fixed_bssid = false; |
876 | 873 | ||
874 | sdata->u.ibss.privacy = params->privacy; | ||
875 | |||
877 | sdata->vif.bss_conf.beacon_int = params->beacon_interval; | 876 | sdata->vif.bss_conf.beacon_int = params->beacon_interval; |
878 | 877 | ||
879 | sdata->u.ibss.channel = params->channel; | 878 | sdata->u.ibss.channel = params->channel; |
@@ -913,7 +912,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, | |||
913 | ieee80211_recalc_idle(sdata->local); | 912 | ieee80211_recalc_idle(sdata->local); |
914 | 913 | ||
915 | set_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request); | 914 | set_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request); |
916 | queue_work(sdata->local->hw.workqueue, &sdata->u.ibss.work); | 915 | ieee80211_queue_work(&sdata->local->hw, &sdata->u.ibss.work); |
917 | 916 | ||
918 | return 0; | 917 | return 0; |
919 | } | 918 | } |