aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/ieee80211.h7
-rw-r--r--net/ieee80211/ieee80211_rx.c25
2 files changed, 30 insertions, 2 deletions
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index 9310b2e01d41..931737eec6c6 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -225,8 +225,9 @@ struct ieee80211_snap_hdr {
225#define WLAN_CAPABILITY_PBCC (1<<6) 225#define WLAN_CAPABILITY_PBCC (1<<6)
226#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7) 226#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
227#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8) 227#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8)
228#define WLAN_CAPABILITY_QOS (1<<9)
228#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) 229#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
229#define WLAN_CAPABILITY_OSSS_OFDM (1<<13) 230#define WLAN_CAPABILITY_DSSS_OFDM (1<<13)
230 231
231/* Status codes */ 232/* Status codes */
232enum ieee80211_statuscode { 233enum ieee80211_statuscode {
@@ -756,6 +757,7 @@ struct ieee80211_network {
756 u16 beacon_interval; 757 u16 beacon_interval;
757 u16 listen_interval; 758 u16 listen_interval;
758 u16 atim_window; 759 u16 atim_window;
760 u8 erp_value;
759 u8 wpa_ie[MAX_WPA_IE_LEN]; 761 u8 wpa_ie[MAX_WPA_IE_LEN];
760 size_t wpa_ie_len; 762 size_t wpa_ie_len;
761 u8 rsn_ie[MAX_WPA_IE_LEN]; 763 u8 rsn_ie[MAX_WPA_IE_LEN];
@@ -910,6 +912,9 @@ struct ieee80211_device {
910 int (*handle_probe_response) (struct net_device * dev, 912 int (*handle_probe_response) (struct net_device * dev,
911 struct ieee80211_probe_response * resp, 913 struct ieee80211_probe_response * resp,
912 struct ieee80211_network * network); 914 struct ieee80211_network * network);
915 int (*handle_probe_request) (struct net_device * dev,
916 struct ieee80211_probe_request * req,
917 struct ieee80211_rx_stats * stats);
913 int (*handle_assoc_response) (struct net_device * dev, 918 int (*handle_assoc_response) (struct net_device * dev,
914 struct ieee80211_assoc_response * resp, 919 struct ieee80211_assoc_response * resp,
915 struct ieee80211_network * network); 920 struct ieee80211_network * network);
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index 2c4613527dfd..8bcdbabae3a1 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -1065,6 +1065,8 @@ static inline int ieee80211_network_init(struct ieee80211_device *ieee, struct i
1065 network->ssid_len = 0; 1065 network->ssid_len = 0;
1066 network->flags = 0; 1066 network->flags = 0;
1067 network->atim_window = 0; 1067 network->atim_window = 0;
1068 network->erp_value = (network->capability & WLAN_CAPABILITY_IBSS) ?
1069 0x3 : 0x0;
1068 1070
1069 if (stats->freq == IEEE80211_52GHZ_BAND) { 1071 if (stats->freq == IEEE80211_52GHZ_BAND) {
1070 /* for A band (No DS info) */ 1072 /* for A band (No DS info) */
@@ -1178,8 +1180,16 @@ static inline int ieee80211_network_init(struct ieee80211_device *ieee, struct i
1178 IEEE80211_DEBUG_SCAN("MFIE_TYPE_TIM: ignored\n"); 1180 IEEE80211_DEBUG_SCAN("MFIE_TYPE_TIM: ignored\n");
1179 break; 1181 break;
1180 1182
1183 case MFIE_TYPE_ERP_INFO:
1184 network->erp_value = info_element->data[0];
1185 IEEE80211_DEBUG_SCAN("MFIE_TYPE_ERP_SET: %d\n",
1186 network->erp_value);
1187 break;
1188
1181 case MFIE_TYPE_IBSS_SET: 1189 case MFIE_TYPE_IBSS_SET:
1182 IEEE80211_DEBUG_SCAN("MFIE_TYPE_IBSS_SET: ignored\n"); 1190 network->atim_window = info_element->data[0];
1191 IEEE80211_DEBUG_SCAN("MFIE_TYPE_IBSS_SET: %d\n",
1192 network->atim_window);
1183 break; 1193 break;
1184 1194
1185 case MFIE_TYPE_CHALLENGE: 1195 case MFIE_TYPE_CHALLENGE:
@@ -1290,6 +1300,7 @@ static inline void update_network(struct ieee80211_network *dst,
1290 dst->beacon_interval = src->beacon_interval; 1300 dst->beacon_interval = src->beacon_interval;
1291 dst->listen_interval = src->listen_interval; 1301 dst->listen_interval = src->listen_interval;
1292 dst->atim_window = src->atim_window; 1302 dst->atim_window = src->atim_window;
1303 dst->erp_value = src->erp_value;
1293 1304
1294 memcpy(dst->wpa_ie, src->wpa_ie, src->wpa_ie_len); 1305 memcpy(dst->wpa_ie, src->wpa_ie, src->wpa_ie_len);
1295 dst->wpa_ie_len = src->wpa_ie_len; 1306 dst->wpa_ie_len = src->wpa_ie_len;
@@ -1471,6 +1482,18 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee,
1471 (header->frame_ctl))); 1482 (header->frame_ctl)));
1472 break; 1483 break;
1473 1484
1485 case IEEE80211_STYPE_PROBE_REQ:
1486 IEEE80211_DEBUG_MGMT("recieved auth (%d)\n",
1487 WLAN_FC_GET_STYPE(le16_to_cpu
1488 (header->frame_ctl)));
1489
1490 if (ieee->handle_probe_request != NULL)
1491 ieee->handle_probe_request(ieee->dev,
1492 (struct
1493 ieee80211_probe_request *)
1494 header, stats);
1495 break;
1496
1474 case IEEE80211_STYPE_PROBE_RESP: 1497 case IEEE80211_STYPE_PROBE_RESP:
1475 IEEE80211_DEBUG_MGMT("received PROBE RESPONSE (%d)\n", 1498 IEEE80211_DEBUG_MGMT("received PROBE RESPONSE (%d)\n",
1476 WLAN_FC_GET_STYPE(le16_to_cpu 1499 WLAN_FC_GET_STYPE(le16_to_cpu