[PATCH] ieee80211: Type-o, capbility definition for QoS, and ERP parsing

tree 3ac0dd07b9972dfd68fee47ec2152d3d378de000
parent 9ada1d971d9829c34a14d98840080b7e69fdff6b
author Mohamed Abbad <mohamed.abbas@intel.com> 1126054379 -0500
committer James Ketrenos <jketreno@linux.intel.com> 1127314340 -0500

Type-o, capbility definition for QoS, and ERP parsing

Added WLAN_CAPABILITY_QOS
Fixed type-o WLAN_CAPABILITY_OSSS_OFDM -> WLAN_CAPABILITY_DSSS_OFDM
Added ERP IE parsing to ieee80211_rx
Added handle_probe_request callback.

Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
James Ketrenos 2005-09-21 11:58:29 -05:00 committed by Jeff Garzik
parent 9ba7e0d157
commit 42c94e43be
2 changed files with 30 additions and 2 deletions

View file

@ -225,8 +225,9 @@ struct ieee80211_snap_hdr {
#define WLAN_CAPABILITY_PBCC (1<<6)
#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8)
#define WLAN_CAPABILITY_QOS (1<<9)
#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
#define WLAN_CAPABILITY_OSSS_OFDM (1<<13)
#define WLAN_CAPABILITY_DSSS_OFDM (1<<13)
/* Status codes */
enum ieee80211_statuscode {
@ -756,6 +757,7 @@ struct ieee80211_network {
u16 beacon_interval;
u16 listen_interval;
u16 atim_window;
u8 erp_value;
u8 wpa_ie[MAX_WPA_IE_LEN];
size_t wpa_ie_len;
u8 rsn_ie[MAX_WPA_IE_LEN];
@ -910,6 +912,9 @@ struct ieee80211_device {
int (*handle_probe_response) (struct net_device * dev,
struct ieee80211_probe_response * resp,
struct ieee80211_network * network);
int (*handle_probe_request) (struct net_device * dev,
struct ieee80211_probe_request * req,
struct ieee80211_rx_stats * stats);
int (*handle_assoc_response) (struct net_device * dev,
struct ieee80211_assoc_response * resp,
struct ieee80211_network * network);

View file

@ -1065,6 +1065,8 @@ static inline int ieee80211_network_init(struct ieee80211_device *ieee, struct i
network->ssid_len = 0;
network->flags = 0;
network->atim_window = 0;
network->erp_value = (network->capability & WLAN_CAPABILITY_IBSS) ?
0x3 : 0x0;
if (stats->freq == IEEE80211_52GHZ_BAND) {
/* for A band (No DS info) */
@ -1178,8 +1180,16 @@ static inline int ieee80211_network_init(struct ieee80211_device *ieee, struct i
IEEE80211_DEBUG_SCAN("MFIE_TYPE_TIM: ignored\n");
break;
case MFIE_TYPE_ERP_INFO:
network->erp_value = info_element->data[0];
IEEE80211_DEBUG_SCAN("MFIE_TYPE_ERP_SET: %d\n",
network->erp_value);
break;
case MFIE_TYPE_IBSS_SET:
IEEE80211_DEBUG_SCAN("MFIE_TYPE_IBSS_SET: ignored\n");
network->atim_window = info_element->data[0];
IEEE80211_DEBUG_SCAN("MFIE_TYPE_IBSS_SET: %d\n",
network->atim_window);
break;
case MFIE_TYPE_CHALLENGE:
@ -1290,6 +1300,7 @@ static inline void update_network(struct ieee80211_network *dst,
dst->beacon_interval = src->beacon_interval;
dst->listen_interval = src->listen_interval;
dst->atim_window = src->atim_window;
dst->erp_value = src->erp_value;
memcpy(dst->wpa_ie, src->wpa_ie, src->wpa_ie_len);
dst->wpa_ie_len = src->wpa_ie_len;
@ -1471,6 +1482,18 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee,
(header->frame_ctl)));
break;
case IEEE80211_STYPE_PROBE_REQ:
IEEE80211_DEBUG_MGMT("recieved auth (%d)\n",
WLAN_FC_GET_STYPE(le16_to_cpu
(header->frame_ctl)));
if (ieee->handle_probe_request != NULL)
ieee->handle_probe_request(ieee->dev,
(struct
ieee80211_probe_request *)
header, stats);
break;
case IEEE80211_STYPE_PROBE_RESP:
IEEE80211_DEBUG_MGMT("received PROBE RESPONSE (%d)\n",
WLAN_FC_GET_STYPE(le16_to_cpu