aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap/hostap_ap.c
diff options
context:
space:
mode:
authorJouni Malinen <jkmaline@cc.hut.fi>2005-07-30 23:43:19 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-07-31 00:28:02 -0400
commitebed67d2847a9d299b47eeb5d82744671ab2b198 (patch)
tree9565c6fdaa7745669ec11087e259544cc6b31d2f /drivers/net/wireless/hostap/hostap_ap.c
parentf3b10e1636dec053f4874d593e3de5d46da48a5f (diff)
[PATCH] hostap: Start using net/ieee80211.h
Preparations for starting to use net/ieee80211 instead of private IEEE 802.11 implementation. Include net/ieee80211.h and net/ieee80211_crypt.h into files that will be needed these in the future. Remove duplicate definitions from hostap_common.h and rename WLAN_FC_GET_{TYPE,STYPE} macros for now sinc net/ieee80211.h is using incompatible definitions. This will be resolved in the future by updating Host AP to use the versions that do not shift type/stype. Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_ap.c')
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index b9684e3a568b..f59912a0fb4c 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -634,8 +634,8 @@ static void hostap_ap_tx_cb_auth(struct sk_buff *skb, int ok, void *data)
634 634
635 hdr = (struct hostap_ieee80211_hdr *) skb->data; 635 hdr = (struct hostap_ieee80211_hdr *) skb->data;
636 fc = le16_to_cpu(hdr->frame_control); 636 fc = le16_to_cpu(hdr->frame_control);
637 if (WLAN_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT || 637 if (HOSTAP_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT ||
638 WLAN_FC_GET_STYPE(fc) != WLAN_FC_STYPE_AUTH || 638 HOSTAP_FC_GET_STYPE(fc) != WLAN_FC_STYPE_AUTH ||
639 skb->len < IEEE80211_MGMT_HDR_LEN + 6) { 639 skb->len < IEEE80211_MGMT_HDR_LEN + 6) {
640 printk(KERN_DEBUG "%s: hostap_ap_tx_cb_auth received invalid " 640 printk(KERN_DEBUG "%s: hostap_ap_tx_cb_auth received invalid "
641 "frame\n", dev->name); 641 "frame\n", dev->name);
@@ -703,9 +703,9 @@ static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data)
703 703
704 hdr = (struct hostap_ieee80211_hdr *) skb->data; 704 hdr = (struct hostap_ieee80211_hdr *) skb->data;
705 fc = le16_to_cpu(hdr->frame_control); 705 fc = le16_to_cpu(hdr->frame_control);
706 if (WLAN_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT || 706 if (HOSTAP_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT ||
707 (WLAN_FC_GET_STYPE(fc) != WLAN_FC_STYPE_ASSOC_RESP && 707 (HOSTAP_FC_GET_STYPE(fc) != WLAN_FC_STYPE_ASSOC_RESP &&
708 WLAN_FC_GET_STYPE(fc) != WLAN_FC_STYPE_REASSOC_RESP) || 708 HOSTAP_FC_GET_STYPE(fc) != WLAN_FC_STYPE_REASSOC_RESP) ||
709 skb->len < IEEE80211_MGMT_HDR_LEN + 4) { 709 skb->len < IEEE80211_MGMT_HDR_LEN + 4) {
710 printk(KERN_DEBUG "%s: hostap_ap_tx_cb_assoc received invalid " 710 printk(KERN_DEBUG "%s: hostap_ap_tx_cb_assoc received invalid "
711 "frame\n", dev->name); 711 "frame\n", dev->name);
@@ -2145,8 +2145,8 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb,
2145 * buffer is long enough */ 2145 * buffer is long enough */
2146 hdr = (struct hostap_ieee80211_hdr *) skb->data; 2146 hdr = (struct hostap_ieee80211_hdr *) skb->data;
2147 fc = le16_to_cpu(hdr->frame_control); 2147 fc = le16_to_cpu(hdr->frame_control);
2148 type = WLAN_FC_GET_TYPE(fc); 2148 type = HOSTAP_FC_GET_TYPE(fc);
2149 stype = WLAN_FC_GET_STYPE(fc); 2149 stype = HOSTAP_FC_GET_STYPE(fc);
2150 2150
2151#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT 2151#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
2152 if (!local->hostapd && type == WLAN_FC_TYPE_DATA) { 2152 if (!local->hostapd && type == WLAN_FC_TYPE_DATA) {
@@ -2271,8 +2271,8 @@ void hostap_rx(struct net_device *dev, struct sk_buff *skb,
2271 fc = le16_to_cpu(hdr->frame_control); 2271 fc = le16_to_cpu(hdr->frame_control);
2272 2272
2273 if (local->ap->ap_policy == AP_OTHER_AP_SKIP_ALL && 2273 if (local->ap->ap_policy == AP_OTHER_AP_SKIP_ALL &&
2274 WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_MGMT && 2274 HOSTAP_FC_GET_TYPE(fc) == WLAN_FC_TYPE_MGMT &&
2275 WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_BEACON) 2275 HOSTAP_FC_GET_STYPE(fc) == WLAN_FC_STYPE_BEACON)
2276 goto drop; 2276 goto drop;
2277 2277
2278 skb->protocol = __constant_htons(ETH_P_HOSTAP); 2278 skb->protocol = __constant_htons(ETH_P_HOSTAP);
@@ -2907,7 +2907,7 @@ int hostap_update_sta_ps(local_info_t *local, struct hostap_ieee80211_hdr *hdr)
2907 2907
2908 fc = le16_to_cpu(hdr->frame_control); 2908 fc = le16_to_cpu(hdr->frame_control);
2909 hostap_update_sta_ps2(local, sta, fc & WLAN_FC_PWRMGT, 2909 hostap_update_sta_ps2(local, sta, fc & WLAN_FC_PWRMGT,
2910 WLAN_FC_GET_TYPE(fc), WLAN_FC_GET_STYPE(fc)); 2910 HOSTAP_FC_GET_TYPE(fc), HOSTAP_FC_GET_STYPE(fc));
2911 2911
2912 atomic_dec(&sta->users); 2912 atomic_dec(&sta->users);
2913 return 0; 2913 return 0;
@@ -2932,8 +2932,8 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
2932 hdr = (struct hostap_ieee80211_hdr *) skb->data; 2932 hdr = (struct hostap_ieee80211_hdr *) skb->data;
2933 2933
2934 fc = le16_to_cpu(hdr->frame_control); 2934 fc = le16_to_cpu(hdr->frame_control);
2935 type = WLAN_FC_GET_TYPE(fc); 2935 type = HOSTAP_FC_GET_TYPE(fc);
2936 stype = WLAN_FC_GET_STYPE(fc); 2936 stype = HOSTAP_FC_GET_STYPE(fc);
2937 2937
2938 spin_lock(&local->ap->sta_table_lock); 2938 spin_lock(&local->ap->sta_table_lock);
2939 sta = ap_get_sta(local->ap, hdr->addr2); 2939 sta = ap_get_sta(local->ap, hdr->addr2);