Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10223
b: refs/heads/master
c: fd27817
h: refs/heads/master
i:
  10221: 0dca8c8
  10219: 8cde9df
  10215: a0e4c55
  10207: 7053d75
v: v3
  • Loading branch information
James Ketrenos authored and Jeff Garzik committed Sep 16, 2005
1 parent ad476e0 commit 0ff12e9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9c8a11d7c2298680ff3ee8acda54575c88668bfc
refs/heads/master: fd27817ce941c7134adefd2852f8a5f274315ff4
43 changes: 26 additions & 17 deletions trunk/net/ieee80211/ieee80211_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,11 +787,11 @@ static inline int ieee80211_network_init(struct ieee80211_device *ieee,

/* Pull out fixed field data */
memcpy(network->bssid, beacon->header.addr3, ETH_ALEN);
network->capability = beacon->capability;
network->capability = le16_to_cpu(beacon->capability);
network->last_scanned = jiffies;
network->time_stamp[0] = beacon->time_stamp[0];
network->time_stamp[1] = beacon->time_stamp[1];
network->beacon_interval = beacon->beacon_interval;
network->time_stamp[0] = le32_to_cpu(beacon->time_stamp[0]);
network->time_stamp[1] = le32_to_cpu(beacon->time_stamp[1]);
network->beacon_interval = le16_to_cpu(beacon->beacon_interval);
/* Where to pull this? beacon->listen_interval; */
network->listen_interval = 0x0A;
network->rates_len = network->rates_ex_len = 0;
Expand Down Expand Up @@ -1070,8 +1070,9 @@ static inline void ieee80211_process_probe_response(struct ieee80211_device
escape_essid(info_element->data,
info_element->len),
MAC_ARG(beacon->header.addr3),
WLAN_FC_GET_STYPE(beacon->header.
frame_ctl) ==
WLAN_FC_GET_STYPE(le16_to_cpu
(beacon->header.
frame_ctl)) ==
IEEE80211_STYPE_PROBE_RESP ?
"PROBE RESPONSE" : "BEACON");
return;
Expand Down Expand Up @@ -1122,8 +1123,9 @@ static inline void ieee80211_process_probe_response(struct ieee80211_device
escape_essid(network.ssid,
network.ssid_len),
MAC_ARG(network.bssid),
WLAN_FC_GET_STYPE(beacon->header.
frame_ctl) ==
WLAN_FC_GET_STYPE(le16_to_cpu
(beacon->header.
frame_ctl)) ==
IEEE80211_STYPE_PROBE_RESP ?
"PROBE RESPONSE" : "BEACON");
#endif
Expand All @@ -1134,8 +1136,9 @@ static inline void ieee80211_process_probe_response(struct ieee80211_device
escape_essid(target->ssid,
target->ssid_len),
MAC_ARG(target->bssid),
WLAN_FC_GET_STYPE(beacon->header.
frame_ctl) ==
WLAN_FC_GET_STYPE(le16_to_cpu
(beacon->header.
frame_ctl)) ==
IEEE80211_STYPE_PROBE_RESP ?
"PROBE RESPONSE" : "BEACON");
update_network(target, &network);
Expand All @@ -1148,20 +1151,23 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee,
struct ieee80211_hdr *header,
struct ieee80211_rx_stats *stats)
{
switch (WLAN_FC_GET_STYPE(header->frame_ctl)) {
switch (WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl))) {
case IEEE80211_STYPE_ASSOC_RESP:
IEEE80211_DEBUG_MGMT("received ASSOCIATION RESPONSE (%d)\n",
WLAN_FC_GET_STYPE(header->frame_ctl));
WLAN_FC_GET_STYPE(le16_to_cpu
(header->frame_ctl)));
break;

case IEEE80211_STYPE_REASSOC_RESP:
IEEE80211_DEBUG_MGMT("received REASSOCIATION RESPONSE (%d)\n",
WLAN_FC_GET_STYPE(header->frame_ctl));
WLAN_FC_GET_STYPE(le16_to_cpu
(header->frame_ctl)));
break;

case IEEE80211_STYPE_PROBE_RESP:
IEEE80211_DEBUG_MGMT("received PROBE RESPONSE (%d)\n",
WLAN_FC_GET_STYPE(header->frame_ctl));
WLAN_FC_GET_STYPE(le16_to_cpu
(header->frame_ctl)));
IEEE80211_DEBUG_SCAN("Probe response\n");
ieee80211_process_probe_response(ieee,
(struct
Expand All @@ -1171,7 +1177,8 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee,

case IEEE80211_STYPE_BEACON:
IEEE80211_DEBUG_MGMT("received BEACON (%d)\n",
WLAN_FC_GET_STYPE(header->frame_ctl));
WLAN_FC_GET_STYPE(le16_to_cpu
(header->frame_ctl)));
IEEE80211_DEBUG_SCAN("Beacon\n");
ieee80211_process_probe_response(ieee,
(struct
Expand All @@ -1181,10 +1188,12 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee,

default:
IEEE80211_DEBUG_MGMT("received UNKNOWN (%d)\n",
WLAN_FC_GET_STYPE(header->frame_ctl));
WLAN_FC_GET_STYPE(le16_to_cpu
(header->frame_ctl)));
IEEE80211_WARNING("%s: Unknown management packet: %d\n",
ieee->dev->name,
WLAN_FC_GET_STYPE(header->frame_ctl));
WLAN_FC_GET_STYPE(le16_to_cpu
(header->frame_ctl)));
break;
}
}
Expand Down

0 comments on commit 0ff12e9

Please sign in to comment.