forked from luck/tmp_suning_uos_patched
Revert "mac80211: Use IWEVASSOCREQIE instead of IWEVCUSTOM"
This reverts commit 087d833e5a
, which was
reported to break wireless at least in some combinations with 32bit user
space and a 64bit kernel. Alex Williamnson bisected it to this commit.
Reported-and-bisected-by: Alex Williamson <alex.williamson@hp.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
Cc: David Miller <davem@davemloft.net>
Cc: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
b380b0d4f7
commit
bf7394ccc1
|
@ -478,21 +478,51 @@ int ieee80211_ht_addt_info_ie_to_ht_bss_info(
|
||||||
static void ieee80211_sta_send_associnfo(struct net_device *dev,
|
static void ieee80211_sta_send_associnfo(struct net_device *dev,
|
||||||
struct ieee80211_if_sta *ifsta)
|
struct ieee80211_if_sta *ifsta)
|
||||||
{
|
{
|
||||||
|
char *buf;
|
||||||
|
size_t len;
|
||||||
|
int i;
|
||||||
union iwreq_data wrqu;
|
union iwreq_data wrqu;
|
||||||
|
|
||||||
|
if (!ifsta->assocreq_ies && !ifsta->assocresp_ies)
|
||||||
|
return;
|
||||||
|
|
||||||
|
buf = kmalloc(50 + 2 * (ifsta->assocreq_ies_len +
|
||||||
|
ifsta->assocresp_ies_len), GFP_KERNEL);
|
||||||
|
if (!buf)
|
||||||
|
return;
|
||||||
|
|
||||||
|
len = sprintf(buf, "ASSOCINFO(");
|
||||||
if (ifsta->assocreq_ies) {
|
if (ifsta->assocreq_ies) {
|
||||||
memset(&wrqu, 0, sizeof(wrqu));
|
len += sprintf(buf + len, "ReqIEs=");
|
||||||
wrqu.data.length = ifsta->assocreq_ies_len;
|
for (i = 0; i < ifsta->assocreq_ies_len; i++) {
|
||||||
wireless_send_event(dev, IWEVASSOCREQIE, &wrqu,
|
len += sprintf(buf + len, "%02x",
|
||||||
ifsta->assocreq_ies);
|
ifsta->assocreq_ies[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ifsta->assocresp_ies) {
|
||||||
|
if (ifsta->assocreq_ies)
|
||||||
|
len += sprintf(buf + len, " ");
|
||||||
|
len += sprintf(buf + len, "RespIEs=");
|
||||||
|
for (i = 0; i < ifsta->assocresp_ies_len; i++) {
|
||||||
|
len += sprintf(buf + len, "%02x",
|
||||||
|
ifsta->assocresp_ies[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
len += sprintf(buf + len, ")");
|
||||||
|
|
||||||
|
if (len > IW_CUSTOM_MAX) {
|
||||||
|
len = sprintf(buf, "ASSOCRESPIE=");
|
||||||
|
for (i = 0; i < ifsta->assocresp_ies_len; i++) {
|
||||||
|
len += sprintf(buf + len, "%02x",
|
||||||
|
ifsta->assocresp_ies[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ifsta->assocresp_ies) {
|
memset(&wrqu, 0, sizeof(wrqu));
|
||||||
memset(&wrqu, 0, sizeof(wrqu));
|
wrqu.data.length = len;
|
||||||
wrqu.data.length = ifsta->assocresp_ies_len;
|
wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf);
|
||||||
wireless_send_event(dev, IWEVASSOCRESPIE, &wrqu,
|
|
||||||
ifsta->assocresp_ies);
|
kfree(buf);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user