softmac: report SIOCGIWAP event upon association
Subsystems (2)
PATCH 1/1 softmac: report SIOCGIWAP event upon association
wpa_supplicant requires some notification when association has completed, and this is the way to do it.
Before this patch, wpa_supplicant just times out when trying to associate, even though the association completed successfully in the background. This was reported at
http://www.mail-archive.com/[email protected]/msg00959.html
After this patch, wpa_supplicant works for me. I have tested connecting to a WEP network.
net/ieee80211/softmac/ieee80211softmac_assoc.c renamed from net/ieee80211/softmac/ieee80211softmac_assoc.c.orig +6 -0
@@ -282,6 +282,8 @@ ieee80211softmac_associated(struct ieee8struct ieee80211_assoc_response * resp, struct ieee80211softmac_network *net) { + union iwreq_data wrqu; + mac->associnfo.associating =0 ; mac->associated =1 ;if (mac->set_bssid_filter)
@@ -290,6 +292,10 @@ ieee80211softmac_associated(struct ieee8netif_carrier_on (mac->dev); mac->association_id =le16_to_cpup (&resp->aid); + + wrqu.ap_addr.sa_family =ARPHRD_ETHER ; +memcpy (wrqu.ap_addr.sa_data, net->bssid,ETH_ALEN ); +wireless_send_event (mac->dev,SIOCGIWAP , &wrqu,NULL ); }/* received frame handling functions */
Quoted 2 lines · Daniel Drake
wpa_supplicantrequires some notification when association has completed, and this is the way to do it.
Check out the patches I posted earlier:
http://softmac.sipsolutions.net/patches/
Specifically, this one by Dan Williams:
http://softmac.sipsolutions.net/patches/softmac-events.patch
I think that's what you're doing here, but can't do an in-depth check at the moment.
johannes