diff options
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 58135a5096af..fbb93a70ddc7 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -870,70 +870,6 @@ static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata, | |||
870 | return changed; | 870 | return changed; |
871 | } | 871 | } |
872 | 872 | ||
873 | static void ieee80211_sta_send_apinfo(struct ieee80211_sub_if_data *sdata) | ||
874 | { | ||
875 | union iwreq_data wrqu; | ||
876 | |||
877 | memset(&wrqu, 0, sizeof(wrqu)); | ||
878 | if (sdata->u.mgd.flags & IEEE80211_STA_ASSOCIATED) | ||
879 | memcpy(wrqu.ap_addr.sa_data, sdata->u.mgd.bssid, ETH_ALEN); | ||
880 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | ||
881 | wireless_send_event(sdata->dev, SIOCGIWAP, &wrqu, NULL); | ||
882 | } | ||
883 | |||
884 | static void ieee80211_sta_send_associnfo(struct ieee80211_sub_if_data *sdata) | ||
885 | { | ||
886 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | ||
887 | char *buf; | ||
888 | size_t len; | ||
889 | int i; | ||
890 | union iwreq_data wrqu; | ||
891 | |||
892 | if (!ifmgd->assocreq_ies && !ifmgd->assocresp_ies) | ||
893 | return; | ||
894 | |||
895 | buf = kmalloc(50 + 2 * (ifmgd->assocreq_ies_len + | ||
896 | ifmgd->assocresp_ies_len), GFP_KERNEL); | ||
897 | if (!buf) | ||
898 | return; | ||
899 | |||
900 | len = sprintf(buf, "ASSOCINFO("); | ||
901 | if (ifmgd->assocreq_ies) { | ||
902 | len += sprintf(buf + len, "ReqIEs="); | ||
903 | for (i = 0; i < ifmgd->assocreq_ies_len; i++) { | ||
904 | len += sprintf(buf + len, "%02x", | ||
905 | ifmgd->assocreq_ies[i]); | ||
906 | } | ||
907 | } | ||
908 | if (ifmgd->assocresp_ies) { | ||
909 | if (ifmgd->assocreq_ies) | ||
910 | len += sprintf(buf + len, " "); | ||
911 | len += sprintf(buf + len, "RespIEs="); | ||
912 | for (i = 0; i < ifmgd->assocresp_ies_len; i++) { | ||
913 | len += sprintf(buf + len, "%02x", | ||
914 | ifmgd->assocresp_ies[i]); | ||
915 | } | ||
916 | } | ||
917 | len += sprintf(buf + len, ")"); | ||
918 | |||
919 | if (len > IW_CUSTOM_MAX) { | ||
920 | len = sprintf(buf, "ASSOCRESPIE="); | ||
921 | for (i = 0; i < ifmgd->assocresp_ies_len; i++) { | ||
922 | len += sprintf(buf + len, "%02x", | ||
923 | ifmgd->assocresp_ies[i]); | ||
924 | } | ||
925 | } | ||
926 | |||
927 | if (len <= IW_CUSTOM_MAX) { | ||
928 | memset(&wrqu, 0, sizeof(wrqu)); | ||
929 | wrqu.data.length = len; | ||
930 | wireless_send_event(sdata->dev, IWEVCUSTOM, &wrqu, buf); | ||
931 | } | ||
932 | |||
933 | kfree(buf); | ||
934 | } | ||
935 | |||
936 | |||
937 | static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, | 873 | static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, |
938 | u32 bss_info_changed) | 874 | u32 bss_info_changed) |
939 | { | 875 | { |
@@ -966,7 +902,6 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, | |||
966 | 902 | ||
967 | ifmgd->flags |= IEEE80211_STA_PREV_BSSID_SET; | 903 | ifmgd->flags |= IEEE80211_STA_PREV_BSSID_SET; |
968 | memcpy(ifmgd->prev_bssid, sdata->u.mgd.bssid, ETH_ALEN); | 904 | memcpy(ifmgd->prev_bssid, sdata->u.mgd.bssid, ETH_ALEN); |
969 | ieee80211_sta_send_associnfo(sdata); | ||
970 | 905 | ||
971 | ifmgd->last_probe = jiffies; | 906 | ifmgd->last_probe = jiffies; |
972 | ieee80211_led_assoc(local, 1); | 907 | ieee80211_led_assoc(local, 1); |
@@ -993,8 +928,6 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, | |||
993 | 928 | ||
994 | netif_tx_start_all_queues(sdata->dev); | 929 | netif_tx_start_all_queues(sdata->dev); |
995 | netif_carrier_on(sdata->dev); | 930 | netif_carrier_on(sdata->dev); |
996 | |||
997 | ieee80211_sta_send_apinfo(sdata); | ||
998 | } | 931 | } |
999 | 932 | ||
1000 | static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata) | 933 | static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata) |
@@ -1147,8 +1080,6 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1147 | changed |= BSS_CHANGED_ASSOC; | 1080 | changed |= BSS_CHANGED_ASSOC; |
1148 | sdata->vif.bss_conf.assoc = false; | 1081 | sdata->vif.bss_conf.assoc = false; |
1149 | 1082 | ||
1150 | ieee80211_sta_send_apinfo(sdata); | ||
1151 | |||
1152 | if (self_disconnected || reason == WLAN_REASON_DISASSOC_STA_HAS_LEFT) { | 1083 | if (self_disconnected || reason == WLAN_REASON_DISASSOC_STA_HAS_LEFT) { |
1153 | ifmgd->state = IEEE80211_STA_MLME_DISABLED; | 1084 | ifmgd->state = IEEE80211_STA_MLME_DISABLED; |
1154 | ieee80211_rx_bss_remove(sdata, ifmgd->bssid, | 1085 | ieee80211_rx_bss_remove(sdata, ifmgd->bssid, |