Commit acfaf10b authored by John W. Linville's avatar John W. Linville

Merge branch 'upstream-fixes'

parents c45ae87e 4832843d
...@@ -1394,7 +1394,7 @@ static void update_network(struct ieee80211_network *dst, ...@@ -1394,7 +1394,7 @@ static void update_network(struct ieee80211_network *dst,
/* dst->last_associate is not overwritten */ /* dst->last_associate is not overwritten */
} }
static inline int is_beacon(int fc) static inline int is_beacon(__le16 fc)
{ {
return (WLAN_FC_GET_STYPE(le16_to_cpu(fc)) == IEEE80211_STYPE_BEACON); return (WLAN_FC_GET_STYPE(le16_to_cpu(fc)) == IEEE80211_STYPE_BEACON);
} }
...@@ -1443,9 +1443,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device ...@@ -1443,9 +1443,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
escape_essid(info_element->data, escape_essid(info_element->data,
info_element->len), info_element->len),
MAC_ARG(beacon->header.addr3), MAC_ARG(beacon->header.addr3),
is_beacon(le16_to_cpu is_beacon(beacon->header.frame_ctl) ?
(beacon->header.
frame_ctl)) ?
"BEACON" : "PROBE RESPONSE"); "BEACON" : "PROBE RESPONSE");
return; return;
} }
...@@ -1496,9 +1494,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device ...@@ -1496,9 +1494,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
escape_essid(network.ssid, escape_essid(network.ssid,
network.ssid_len), network.ssid_len),
MAC_ARG(network.bssid), MAC_ARG(network.bssid),
is_beacon(le16_to_cpu is_beacon(beacon->header.frame_ctl) ?
(beacon->header.
frame_ctl)) ?
"BEACON" : "PROBE RESPONSE"); "BEACON" : "PROBE RESPONSE");
#endif #endif
memcpy(target, &network, sizeof(*target)); memcpy(target, &network, sizeof(*target));
...@@ -1509,9 +1505,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device ...@@ -1509,9 +1505,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
escape_essid(target->ssid, escape_essid(target->ssid,
target->ssid_len), target->ssid_len),
MAC_ARG(target->bssid), MAC_ARG(target->bssid),
is_beacon(le16_to_cpu is_beacon(beacon->header.frame_ctl) ?
(beacon->header.
frame_ctl)) ?
"BEACON" : "PROBE RESPONSE"); "BEACON" : "PROBE RESPONSE");
update_network(target, &network); update_network(target, &network);
network.ibss_dfs = NULL; network.ibss_dfs = NULL;
...@@ -1519,7 +1513,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device ...@@ -1519,7 +1513,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
spin_unlock_irqrestore(&ieee->lock, flags); spin_unlock_irqrestore(&ieee->lock, flags);
if (is_beacon(le16_to_cpu(beacon->header.frame_ctl))) { if (is_beacon(beacon->header.frame_ctl)) {
if (ieee->handle_beacon != NULL) if (ieee->handle_beacon != NULL)
ieee->handle_beacon(dev, beacon, &network); ieee->handle_beacon(dev, beacon, &network);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment