diff options
author | Pete Zaitcev <zaitcev@redhat.com> | 2006-02-27 02:43:20 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-02-27 20:12:02 -0500 |
commit | 4832843d773462643cc471ca715382f5e509afb3 (patch) | |
tree | 342ae6d4ea97b83aa123fdaaac392888d9d3189e /net/ieee80211 | |
parent | 051d3cbd96909b2fe6b5038e7bbe77f41356db05 (diff) |
[PATCH] ieee80211_rx.c: is_beacon
Fix broken is_beacon().
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/ieee80211')
-rw-r--r-- | net/ieee80211/ieee80211_rx.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index 960aa78cdb97..b410ab8bcf7a 100644 --- a/net/ieee80211/ieee80211_rx.c +++ b/net/ieee80211/ieee80211_rx.c | |||
@@ -1301,7 +1301,7 @@ static void update_network(struct ieee80211_network *dst, | |||
1301 | /* dst->last_associate is not overwritten */ | 1301 | /* dst->last_associate is not overwritten */ |
1302 | } | 1302 | } |
1303 | 1303 | ||
1304 | static inline int is_beacon(int fc) | 1304 | static inline int is_beacon(__le16 fc) |
1305 | { | 1305 | { |
1306 | return (WLAN_FC_GET_STYPE(le16_to_cpu(fc)) == IEEE80211_STYPE_BEACON); | 1306 | return (WLAN_FC_GET_STYPE(le16_to_cpu(fc)) == IEEE80211_STYPE_BEACON); |
1307 | } | 1307 | } |
@@ -1348,9 +1348,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device | |||
1348 | escape_essid(info_element->data, | 1348 | escape_essid(info_element->data, |
1349 | info_element->len), | 1349 | info_element->len), |
1350 | MAC_ARG(beacon->header.addr3), | 1350 | MAC_ARG(beacon->header.addr3), |
1351 | is_beacon(le16_to_cpu | 1351 | is_beacon(beacon->header.frame_ctl) ? |
1352 | (beacon->header. | ||
1353 | frame_ctl)) ? | ||
1354 | "BEACON" : "PROBE RESPONSE"); | 1352 | "BEACON" : "PROBE RESPONSE"); |
1355 | return; | 1353 | return; |
1356 | } | 1354 | } |
@@ -1400,9 +1398,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device | |||
1400 | escape_essid(network.ssid, | 1398 | escape_essid(network.ssid, |
1401 | network.ssid_len), | 1399 | network.ssid_len), |
1402 | MAC_ARG(network.bssid), | 1400 | MAC_ARG(network.bssid), |
1403 | is_beacon(le16_to_cpu | 1401 | is_beacon(beacon->header.frame_ctl) ? |
1404 | (beacon->header. | ||
1405 | frame_ctl)) ? | ||
1406 | "BEACON" : "PROBE RESPONSE"); | 1402 | "BEACON" : "PROBE RESPONSE"); |
1407 | #endif | 1403 | #endif |
1408 | memcpy(target, &network, sizeof(*target)); | 1404 | memcpy(target, &network, sizeof(*target)); |
@@ -1412,16 +1408,14 @@ static void ieee80211_process_probe_response(struct ieee80211_device | |||
1412 | escape_essid(target->ssid, | 1408 | escape_essid(target->ssid, |
1413 | target->ssid_len), | 1409 | target->ssid_len), |
1414 | MAC_ARG(target->bssid), | 1410 | MAC_ARG(target->bssid), |
1415 | is_beacon(le16_to_cpu | 1411 | is_beacon(beacon->header.frame_ctl) ? |
1416 | (beacon->header. | ||
1417 | frame_ctl)) ? | ||
1418 | "BEACON" : "PROBE RESPONSE"); | 1412 | "BEACON" : "PROBE RESPONSE"); |
1419 | update_network(target, &network); | 1413 | update_network(target, &network); |
1420 | } | 1414 | } |
1421 | 1415 | ||
1422 | spin_unlock_irqrestore(&ieee->lock, flags); | 1416 | spin_unlock_irqrestore(&ieee->lock, flags); |
1423 | 1417 | ||
1424 | if (is_beacon(le16_to_cpu(beacon->header.frame_ctl))) { | 1418 | if (is_beacon(beacon->header.frame_ctl)) { |
1425 | if (ieee->handle_beacon != NULL) | 1419 | if (ieee->handle_beacon != NULL) |
1426 | ieee->handle_beacon(dev, beacon, &network); | 1420 | ieee->handle_beacon(dev, beacon, &network); |
1427 | } else { | 1421 | } else { |