diff options
Diffstat (limited to 'drivers/net/wireless/hostap/hostap.c')
-rw-r--r-- | drivers/net/wireless/hostap/hostap.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/net/wireless/hostap/hostap.c b/drivers/net/wireless/hostap/hostap.c index 0858eba4575f..9ce18b6d6cb8 100644 --- a/drivers/net/wireless/hostap/hostap.c +++ b/drivers/net/wireless/hostap/hostap.c | |||
@@ -594,7 +594,7 @@ void hostap_dump_rx_header(const char *name, const struct hfa384x_rx_frame *rx) | |||
594 | fc = __le16_to_cpu(rx->frame_control); | 594 | fc = __le16_to_cpu(rx->frame_control); |
595 | printk(KERN_DEBUG " FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x " | 595 | printk(KERN_DEBUG " FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x " |
596 | "data_len=%d%s%s\n", | 596 | "data_len=%d%s%s\n", |
597 | fc, HOSTAP_FC_GET_TYPE(fc), HOSTAP_FC_GET_STYPE(fc), | 597 | fc, WLAN_FC_GET_TYPE(fc) >> 2, WLAN_FC_GET_STYPE(fc) >> 4, |
598 | __le16_to_cpu(rx->duration_id), __le16_to_cpu(rx->seq_ctrl), | 598 | __le16_to_cpu(rx->duration_id), __le16_to_cpu(rx->seq_ctrl), |
599 | __le16_to_cpu(rx->data_len), | 599 | __le16_to_cpu(rx->data_len), |
600 | fc & WLAN_FC_TODS ? " [ToDS]" : "", | 600 | fc & WLAN_FC_TODS ? " [ToDS]" : "", |
@@ -623,7 +623,7 @@ void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx) | |||
623 | fc = __le16_to_cpu(tx->frame_control); | 623 | fc = __le16_to_cpu(tx->frame_control); |
624 | printk(KERN_DEBUG " FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x " | 624 | printk(KERN_DEBUG " FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x " |
625 | "data_len=%d%s%s\n", | 625 | "data_len=%d%s%s\n", |
626 | fc, HOSTAP_FC_GET_TYPE(fc), HOSTAP_FC_GET_STYPE(fc), | 626 | fc, WLAN_FC_GET_TYPE(fc) >> 2, WLAN_FC_GET_STYPE(fc) >> 4, |
627 | __le16_to_cpu(tx->duration_id), __le16_to_cpu(tx->seq_ctrl), | 627 | __le16_to_cpu(tx->duration_id), __le16_to_cpu(tx->seq_ctrl), |
628 | __le16_to_cpu(tx->data_len), | 628 | __le16_to_cpu(tx->data_len), |
629 | fc & WLAN_FC_TODS ? " [ToDS]" : "", | 629 | fc & WLAN_FC_TODS ? " [ToDS]" : "", |
@@ -666,15 +666,15 @@ int hostap_80211_get_hdrlen(u16 fc) | |||
666 | { | 666 | { |
667 | int hdrlen = 24; | 667 | int hdrlen = 24; |
668 | 668 | ||
669 | switch (HOSTAP_FC_GET_TYPE(fc)) { | 669 | switch (WLAN_FC_GET_TYPE(fc)) { |
670 | case WLAN_FC_TYPE_DATA: | 670 | case IEEE80211_FTYPE_DATA: |
671 | if ((fc & WLAN_FC_FROMDS) && (fc & WLAN_FC_TODS)) | 671 | if ((fc & WLAN_FC_FROMDS) && (fc & WLAN_FC_TODS)) |
672 | hdrlen = 30; /* Addr4 */ | 672 | hdrlen = 30; /* Addr4 */ |
673 | break; | 673 | break; |
674 | case WLAN_FC_TYPE_CTRL: | 674 | case IEEE80211_FTYPE_CTL: |
675 | switch (HOSTAP_FC_GET_STYPE(fc)) { | 675 | switch (WLAN_FC_GET_STYPE(fc)) { |
676 | case WLAN_FC_STYPE_CTS: | 676 | case IEEE80211_STYPE_CTS: |
677 | case WLAN_FC_STYPE_ACK: | 677 | case IEEE80211_STYPE_ACK: |
678 | hdrlen = 10; | 678 | hdrlen = 10; |
679 | break; | 679 | break; |
680 | default: | 680 | default: |
@@ -1093,7 +1093,7 @@ int prism2_update_comms_qual(struct net_device *dev) | |||
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | 1095 | ||
1096 | int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u8 stype, | 1096 | int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u16 stype, |
1097 | u8 *body, size_t bodylen) | 1097 | u8 *body, size_t bodylen) |
1098 | { | 1098 | { |
1099 | struct sk_buff *skb; | 1099 | struct sk_buff *skb; |
@@ -1108,8 +1108,7 @@ int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u8 stype, | |||
1108 | mgmt = (struct hostap_ieee80211_mgmt *) | 1108 | mgmt = (struct hostap_ieee80211_mgmt *) |
1109 | skb_put(skb, IEEE80211_MGMT_HDR_LEN); | 1109 | skb_put(skb, IEEE80211_MGMT_HDR_LEN); |
1110 | memset(mgmt, 0, IEEE80211_MGMT_HDR_LEN); | 1110 | memset(mgmt, 0, IEEE80211_MGMT_HDR_LEN); |
1111 | mgmt->frame_control = | 1111 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | stype); |
1112 | cpu_to_le16((WLAN_FC_TYPE_MGMT << 2) | (stype << 4)); | ||
1113 | memcpy(mgmt->da, dst, ETH_ALEN); | 1112 | memcpy(mgmt->da, dst, ETH_ALEN); |
1114 | memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); | 1113 | memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); |
1115 | memcpy(mgmt->bssid, dst, ETH_ALEN); | 1114 | memcpy(mgmt->bssid, dst, ETH_ALEN); |
@@ -1140,7 +1139,7 @@ int prism2_sta_deauth(local_info_t *local, u16 reason) | |||
1140 | return 0; | 1139 | return 0; |
1141 | 1140 | ||
1142 | reason = cpu_to_le16(reason); | 1141 | reason = cpu_to_le16(reason); |
1143 | ret = prism2_sta_send_mgmt(local, local->bssid, WLAN_FC_STYPE_DEAUTH, | 1142 | ret = prism2_sta_send_mgmt(local, local->bssid, IEEE80211_STYPE_DEAUTH, |
1144 | (u8 *) &reason, 2); | 1143 | (u8 *) &reason, 2); |
1145 | memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); | 1144 | memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); |
1146 | wireless_send_event(local->dev, SIOCGIWAP, &wrqu, NULL); | 1145 | wireless_send_event(local->dev, SIOCGIWAP, &wrqu, NULL); |