aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee80211/ieee80211_rx.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-01 01:58:38 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-01 01:58:38 -0500
commit68727fed5469100bec0764207d7efb7a9ecdee29 (patch)
tree7afb58ab7665b90122d3b4505be5c6c9f8bade4b /net/ieee80211/ieee80211_rx.c
parentdbfedbb98145375106cee7ec7269611d553819dc (diff)
parentb5b9d6647c1cd5eee90b58941c55f874c2a7e707 (diff)
Merge branch 'upstream-fixes'
Diffstat (limited to 'net/ieee80211/ieee80211_rx.c')
-rw-r--r--net/ieee80211/ieee80211_rx.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index fcf4382ef7d7..6b8469da29b1 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -1394,7 +1394,7 @@ static void update_network(struct ieee80211_network *dst,
1394 /* dst->last_associate is not overwritten */ 1394 /* dst->last_associate is not overwritten */
1395} 1395}
1396 1396
1397static inline int is_beacon(int fc) 1397static inline int is_beacon(__le16 fc)
1398{ 1398{
1399 return (WLAN_FC_GET_STYPE(le16_to_cpu(fc)) == IEEE80211_STYPE_BEACON); 1399 return (WLAN_FC_GET_STYPE(le16_to_cpu(fc)) == IEEE80211_STYPE_BEACON);
1400} 1400}
@@ -1443,9 +1443,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
1443 escape_essid(info_element->data, 1443 escape_essid(info_element->data,
1444 info_element->len), 1444 info_element->len),
1445 MAC_ARG(beacon->header.addr3), 1445 MAC_ARG(beacon->header.addr3),
1446 is_beacon(le16_to_cpu 1446 is_beacon(beacon->header.frame_ctl) ?
1447 (beacon->header.
1448 frame_ctl)) ?
1449 "BEACON" : "PROBE RESPONSE"); 1447 "BEACON" : "PROBE RESPONSE");
1450 return; 1448 return;
1451 } 1449 }
@@ -1496,9 +1494,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
1496 escape_essid(network.ssid, 1494 escape_essid(network.ssid,
1497 network.ssid_len), 1495 network.ssid_len),
1498 MAC_ARG(network.bssid), 1496 MAC_ARG(network.bssid),
1499 is_beacon(le16_to_cpu 1497 is_beacon(beacon->header.frame_ctl) ?
1500 (beacon->header.
1501 frame_ctl)) ?
1502 "BEACON" : "PROBE RESPONSE"); 1498 "BEACON" : "PROBE RESPONSE");
1503#endif 1499#endif
1504 memcpy(target, &network, sizeof(*target)); 1500 memcpy(target, &network, sizeof(*target));
@@ -1509,9 +1505,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
1509 escape_essid(target->ssid, 1505 escape_essid(target->ssid,
1510 target->ssid_len), 1506 target->ssid_len),
1511 MAC_ARG(target->bssid), 1507 MAC_ARG(target->bssid),
1512 is_beacon(le16_to_cpu 1508 is_beacon(beacon->header.frame_ctl) ?
1513 (beacon->header.
1514 frame_ctl)) ?
1515 "BEACON" : "PROBE RESPONSE"); 1509 "BEACON" : "PROBE RESPONSE");
1516 update_network(target, &network); 1510 update_network(target, &network);
1517 network.ibss_dfs = NULL; 1511 network.ibss_dfs = NULL;
@@ -1519,7 +1513,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
1519 1513
1520 spin_unlock_irqrestore(&ieee->lock, flags); 1514 spin_unlock_irqrestore(&ieee->lock, flags);
1521 1515
1522 if (is_beacon(le16_to_cpu(beacon->header.frame_ctl))) { 1516 if (is_beacon(beacon->header.frame_ctl)) {
1523 if (ieee->handle_beacon != NULL) 1517 if (ieee->handle_beacon != NULL)
1524 ieee->handle_beacon(dev, beacon, &network); 1518 ieee->handle_beacon(dev, beacon, &network);
1525 } else { 1519 } else {