* [PATCH 00/10] Stagging: rtl8187se updates
@ 2009-07-13 18:01 Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 01/10] Staging: rtl8187se/ieee80211: remove OPENSUSE_SLED ifdefs Bartlomiej Zolnierkiewicz
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-13 18:01 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
- more ifdefs removals
- switch it to use <linux/ieee80211.h>
- more preparations for LIBRTL
diffstat:
Makefile | 2
TODO | 6
ieee80211/ieee80211.h | 527 ++++++++++++++-------------------------
ieee80211/ieee80211_crypt_ccmp.c | 15 -
ieee80211/ieee80211_crypt_tkip.c | 31 --
ieee80211/ieee80211_crypt_wep.c | 5
ieee80211/ieee80211_rx.c | 270 ++-----------------
ieee80211/ieee80211_softmac.c | 38 --
ieee80211/ieee80211_tx.c | 29 --
ieee80211/ieee80211_wx.c | 6
r8180_core.c | 8
r8180_wx.c | 6
r8185b_init.c | 2
13 files changed, 275 insertions(+), 670 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 01/10] Staging: rtl8187se/ieee80211: remove OPENSUSE_SLED ifdefs
2009-07-13 18:01 [PATCH 00/10] Stagging: rtl8187se updates Bartlomiej Zolnierkiewicz
@ 2009-07-13 18:01 ` Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 02/10] Staging: rtl8187se/ieee80211: remove FEDORACORE_9 ifdef Bartlomiej Zolnierkiewicz
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-13 18:01 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtl8187se/ieee80211: remove OPENSUSE_SLED ifdefs
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/staging/rtl8187se/TODO | 1 -
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c | 5 -----
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c | 5 -----
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c | 5 -----
4 files changed, 16 deletions(-)
Index: b/drivers/staging/rtl8187se/TODO
===================================================================
--- a/drivers/staging/rtl8187se/TODO
+++ b/drivers/staging/rtl8187se/TODO
@@ -1,6 +1,5 @@
TODO:
- prepare private ieee80211 stack for merge with rtl8192su's version:
- - remove [IN]_OPENSUSE_SLED definitions
- remove ENABLE_IPS ifdefs
- rename struct ieee80211_hdr to struct ieee80211_hdr_4addr
- rename struct ieee80211_hdr_3addr_QOS to struct ieee80211_hdr_3addrqos
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
@@ -31,11 +31,6 @@ MODULE_AUTHOR("Jouni Malinen");
MODULE_DESCRIPTION("Host AP crypt: CCMP");
MODULE_LICENSE("GPL");
-#ifdef OPENSUSE_SLED
-#ifndef IN_OPENSUSE_SLED
-#define IN_OPENSUSE_SLED 1
-#endif
-#endif
#define AES_BLOCK_LEN 16
#define CCMP_HDR_LEN 8
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
@@ -31,11 +31,6 @@ MODULE_AUTHOR("Jouni Malinen");
MODULE_DESCRIPTION("Host AP crypt: TKIP");
MODULE_LICENSE("GPL");
-#ifdef OPENSUSE_SLED
-#ifndef IN_OPENSUSE_SLED
-#define IN_OPENSUSE_SLED 1
-#endif
-#endif
struct ieee80211_tkip_data {
#define TKIP_KEY_LEN 32
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
@@ -28,11 +28,6 @@ MODULE_AUTHOR("Jouni Malinen");
MODULE_DESCRIPTION("Host AP crypt: WEP");
MODULE_LICENSE("GPL");
-#ifdef OPENSUSE_SLED
-#ifndef IN_OPENSUSE_SLED
-#define IN_OPENSUSE_SLED 1
-#endif
-#endif
struct prism2_wep_data {
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 02/10] Staging: rtl8187se/ieee80211: remove FEDORACORE_9 ifdef
2009-07-13 18:01 [PATCH 00/10] Stagging: rtl8187se updates Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 01/10] Staging: rtl8187se/ieee80211: remove OPENSUSE_SLED ifdefs Bartlomiej Zolnierkiewicz
@ 2009-07-13 18:01 ` Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 03/10] Staging: rtl8187se/ieee80211: remove NOT_YET ifdefs Bartlomiej Zolnierkiewicz
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-13 18:01 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtl8187se/ieee80211: remove FEDORACORE_9 ifdef
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c | 6 ------
1 file changed, 6 deletions(-)
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
@@ -39,12 +39,6 @@ static const char *ieee80211_modes[] = {
"?", "a", "b", "ab", "g", "ag", "bg", "abg"
};
-#ifdef FEDORACORE_9
-#define IN_FEDORACORE_9 1
-#else
-#define IN_FEDORACORE_9 0
-#endif
-
#define MAX_CUSTOM_LEN 64
static inline char *rtl818x_translate_scan(struct ieee80211_device *ieee,
char *start, char *stop,
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 03/10] Staging: rtl8187se/ieee80211: remove NOT_YET ifdefs
2009-07-13 18:01 [PATCH 00/10] Stagging: rtl8187se updates Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 01/10] Staging: rtl8187se/ieee80211: remove OPENSUSE_SLED ifdefs Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 02/10] Staging: rtl8187se/ieee80211: remove FEDORACORE_9 ifdef Bartlomiej Zolnierkiewicz
@ 2009-07-13 18:01 ` Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 04/10] Staging: rtl8187se: remove ENABLE_IPS ifdefs Bartlomiej Zolnierkiewicz
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-13 18:01 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtl8187se/ieee80211: remove NOT_YET ifdefs
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c | 190 ---------------------
1 file changed, 190 deletions(-)
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
@@ -237,51 +237,6 @@ ieee80211_rx_frame_mgmt(struct ieee80211
return 0;
- #ifdef NOT_YET
- if (ieee->iw_mode == IW_MODE_MASTER) {
- printk(KERN_DEBUG "%s: Master mode not yet suppported.\n",
- ieee->dev->name);
- return 0;
-/*
- hostap_update_sta_ps(ieee, (struct hostap_ieee80211_hdr *)
- skb->data);*/
- }
-
- if (ieee->hostapd && type == IEEE80211_TYPE_MGMT) {
- if (stype == WLAN_FC_STYPE_BEACON &&
- ieee->iw_mode == IW_MODE_MASTER) {
- struct sk_buff *skb2;
- /* Process beacon frames also in kernel driver to
- * update STA(AP) table statistics */
- skb2 = skb_clone(skb, GFP_ATOMIC);
- if (skb2)
- hostap_rx(skb2->dev, skb2, rx_stats);
- }
-
- /* send management frames to the user space daemon for
- * processing */
- ieee->apdevstats.rx_packets++;
- ieee->apdevstats.rx_bytes += skb->len;
- prism2_rx_80211(ieee->apdev, skb, rx_stats, PRISM2_RX_MGMT);
- return 0;
- }
-
- if (ieee->iw_mode == IW_MODE_MASTER) {
- if (type != WLAN_FC_TYPE_MGMT && type != WLAN_FC_TYPE_CTRL) {
- printk(KERN_DEBUG "%s: unknown management frame "
- "(type=0x%02x, stype=0x%02x) dropped\n",
- skb->dev->name, type, stype);
- return -1;
- }
-
- hostap_rx(skb->dev, skb, rx_stats);
- return 0;
- }
-
- printk(KERN_DEBUG "%s: hostap_rx_frame_mgmt: management frame "
- "received in non-Host AP mode\n", skb->dev->name);
- return -1;
- #endif
}
@@ -527,14 +482,6 @@ int ieee80211_rx(struct ieee80211_device
unsigned int frag;
u8 *payload;
u16 ethertype;
-#ifdef NOT_YET
- struct net_device *wds = NULL;
- struct sk_buff *skb2 = NULL;
- struct net_device *wds = NULL;
- int frame_authorized = 0;
- int from_assoc_ap = 0;
- void *sta = NULL;
-#endif
// u16 QOS_ctl = 0;
u8 dst[ETH_ALEN];
u8 src[ETH_ALEN];
@@ -578,22 +525,6 @@ int ieee80211_rx(struct ieee80211_device
hdrlen = ieee80211_get_hdrlen(fc);
-#ifdef NOT_YET
- /* Put this code here so that we avoid duplicating it in all
- * Rx paths. - Jean II */
-#ifdef IW_WIRELESS_SPY /* defined in iw_handler.h */
- /* If spy monitoring on */
- if (iface->spy_data.spy_number > 0) {
- struct iw_quality wstats;
- wstats.level = rx_stats->signal;
- wstats.noise = rx_stats->noise;
- wstats.updated = 6; /* No qual value */
- /* Update spy records */
- wireless_spy_update(dev, hdr->addr2, &wstats);
- }
-#endif /* IW_WIRELESS_SPY */
- hostap_update_rx_stats(local->ap, hdr, rx_stats);
-#endif
if (ieee->iw_mode == IW_MODE_MONITOR) {
ieee80211_monitor_rx(ieee, skb, rx_stats);
@@ -607,20 +538,6 @@ int ieee80211_rx(struct ieee80211_device
if (skb->len >= hdrlen + 3)
idx = skb->data[hdrlen + 3] >> 6;
crypt = ieee->crypt[idx];
-#ifdef NOT_YET
- sta = NULL;
-
- /* Use station specific key to override default keys if the
- * receiver address is a unicast address ("individual RA"). If
- * bcrx_sta_key parameter is set, station specific key is used
- * even with broad/multicast targets (this is against IEEE
- * 802.11, but makes it easier to use different keys with
- * stations that do not support WEP key mapping). */
-
- if (!(hdr->addr1[0] & 0x01) || local->bcrx_sta_key)
- (void) hostap_handle_sta_crypto(local, hdr, &crypt,
- &sta);
-#endif
/* allow NULL decrypt to indicate an station specific override
* for default encryption */
@@ -682,46 +599,9 @@ int ieee80211_rx(struct ieee80211_device
break;
}
-#ifdef NOT_YET
- if (hostap_rx_frame_wds(ieee, hdr, fc, &wds))
- goto rx_dropped;
- if (wds) {
- skb->dev = dev = wds;
- stats = hostap_get_stats(dev);
- }
-
- if (ieee->iw_mode == IW_MODE_MASTER && !wds &&
- (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS &&
- ieee->stadev &&
- memcmp(hdr->addr2, ieee->assoc_ap_addr, ETH_ALEN) == 0) {
- /* Frame from BSSID of the AP for which we are a client */
- skb->dev = dev = ieee->stadev;
- stats = hostap_get_stats(dev);
- from_assoc_ap = 1;
- }
-#endif
dev->last_rx = jiffies;
-#ifdef NOT_YET
- if ((ieee->iw_mode == IW_MODE_MASTER ||
- ieee->iw_mode == IW_MODE_REPEAT) &&
- !from_assoc_ap) {
- switch (hostap_handle_sta_rx(ieee, dev, skb, rx_stats,
- wds != NULL)) {
- case AP_RX_CONTINUE_NOT_AUTHORIZED:
- frame_authorized = 0;
- break;
- case AP_RX_CONTINUE:
- frame_authorized = 1;
- break;
- case AP_RX_DROP:
- goto rx_dropped;
- case AP_RX_EXIT:
- goto rx_exit;
- }
- }
-#endif
/* Nullfunc frames may have PS-bit set, so they must be passed to
* hostap_handle_sta_rx() before being dropped here. */
@@ -864,31 +744,6 @@ int ieee80211_rx(struct ieee80211_device
payload = skb->data + hdrlen;
ethertype = (payload[6] << 8) | payload[7];
-#ifdef NOT_YET
- /* If IEEE 802.1X is used, check whether the port is authorized to send
- * the received frame. */
- if (ieee->ieee802_1x && ieee->iw_mode == IW_MODE_MASTER) {
- if (ethertype == ETH_P_PAE) {
- printk(KERN_DEBUG "%s: RX: IEEE 802.1X frame\n",
- dev->name);
- if (ieee->hostapd && ieee->apdev) {
- /* Send IEEE 802.1X frames to the user
- * space daemon for processing */
- prism2_rx_80211(ieee->apdev, skb, rx_stats,
- PRISM2_RX_MGMT);
- ieee->apdevstats.rx_packets++;
- ieee->apdevstats.rx_bytes += skb->len;
- goto rx_exit;
- }
- } else if (!frame_authorized) {
- printk(KERN_DEBUG "%s: dropped frame from "
- "unauthorized port (IEEE 802.1X): "
- "ethertype=0x%04x\n",
- dev->name, ethertype);
- goto rx_dropped;
- }
- }
-#endif
/* convert hdr + possible LLC headers into Ethernet header */
if (skb->len - hdrlen >= 8 &&
@@ -910,51 +765,10 @@ int ieee80211_rx(struct ieee80211_device
memcpy(skb_push(skb, ETH_ALEN), dst, ETH_ALEN);
}
-#ifdef NOT_YET
- if (wds && ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) ==
- IEEE80211_FCTL_TODS) &&
- skb->len >= ETH_HLEN + ETH_ALEN) {
- /* Non-standard frame: get addr4 from its bogus location after
- * the payload */
- memcpy(skb->data + ETH_ALEN,
- skb->data + skb->len - ETH_ALEN, ETH_ALEN);
- skb_trim(skb, skb->len - ETH_ALEN);
- }
-#endif
stats->rx_packets++;
stats->rx_bytes += skb->len;
-#ifdef NOT_YET
- if (ieee->iw_mode == IW_MODE_MASTER && !wds &&
- ieee->ap->bridge_packets) {
- if (dst[0] & 0x01) {
- /* copy multicast frame both to the higher layers and
- * to the wireless media */
- ieee->ap->bridged_multicast++;
- skb2 = skb_clone(skb, GFP_ATOMIC);
- if (skb2 == NULL)
- printk(KERN_DEBUG "%s: skb_clone failed for "
- "multicast frame\n", dev->name);
- } else if (hostap_is_sta_assoc(ieee->ap, dst)) {
- /* send frame directly to the associated STA using
- * wireless media and not passing to higher layers */
- ieee->ap->bridged_unicast++;
- skb2 = skb;
- skb = NULL;
- }
- }
-
- if (skb2 != NULL) {
- /* send to wireless media */
- skb2->protocol = __constant_htons(ETH_P_802_3);
- skb2->mac.raw = skb2->nh.raw = skb2->data;
- /* skb2->nh.raw = skb2->data + ETH_HLEN; */
- skb2->dev = dev;
- dev_queue_xmit(skb2);
- }
-
-#endif
if (skb) {
skb->protocol = eth_type_trans(skb, dev);
memset(skb->cb, 0, sizeof(skb->cb));
@@ -965,10 +779,6 @@ int ieee80211_rx(struct ieee80211_device
}
rx_exit:
-#ifdef NOT_YET
- if (sta)
- hostap_handle_sta_release(sta);
-#endif
return 1;
rx_dropped:
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 04/10] Staging: rtl8187se: remove ENABLE_IPS ifdefs
2009-07-13 18:01 [PATCH 00/10] Stagging: rtl8187se updates Bartlomiej Zolnierkiewicz
` (2 preceding siblings ...)
2009-07-13 18:01 ` [PATCH 03/10] Staging: rtl8187se/ieee80211: remove NOT_YET ifdefs Bartlomiej Zolnierkiewicz
@ 2009-07-13 18:01 ` Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 05/10] Staging: rtl8187se: rename struct ieee80211_hdr to struct ieee80211_hdr_4addr Bartlomiej Zolnierkiewicz
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-13 18:01 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtl8187se: remove ENABLE_IPS ifdefs
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/staging/rtl8187se/Makefile | 2
drivers/staging/rtl8187se/TODO | 1
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c | 38 ----------------
drivers/staging/rtl8187se/r8180_core.c | 4 -
drivers/staging/rtl8187se/r8180_wx.c | 6 --
drivers/staging/rtl8187se/r8185b_init.c | 2
6 files changed, 53 deletions(-)
Index: b/drivers/staging/rtl8187se/Makefile
===================================================================
--- a/drivers/staging/rtl8187se/Makefile
+++ b/drivers/staging/rtl8187se/Makefile
@@ -4,8 +4,6 @@
#EXTRA_CFLAGS += -O2
#CC = gcc
-#added for EeePC testing
-EXTRA_CFLAGS += -DENABLE_IPS
EXTRA_CFLAGS += -DSW_ANTE
EXTRA_CFLAGS += -DTX_TRACK
EXTRA_CFLAGS += -DHIGH_POWER
Index: b/drivers/staging/rtl8187se/TODO
===================================================================
--- a/drivers/staging/rtl8187se/TODO
+++ b/drivers/staging/rtl8187se/TODO
@@ -1,6 +1,5 @@
TODO:
- prepare private ieee80211 stack for merge with rtl8192su's version:
- - remove ENABLE_IPS ifdefs
- rename struct ieee80211_hdr to struct ieee80211_hdr_4addr
- rename struct ieee80211_hdr_3addr_QOS to struct ieee80211_hdr_3addrqos
- rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
@@ -574,7 +574,6 @@ out:
DOT11D_ScanComplete(ieee);
}
-#ifdef ENABLE_IPS
void ieee80211_softmac_scan_wq(struct work_struct *work)
{
struct delayed_work *dwork = to_delayed_work(work);
@@ -617,43 +616,6 @@ out:
DOT11D_ScanComplete(ieee);
return;
}
-#else
-void ieee80211_softmac_scan_wq(struct work_struct *work)
-{
- struct delayed_work *dwork = to_delayed_work(work);
- struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, softmac_scan_wq);
- short watchdog = 0;
- u8 channel_map[MAX_CHANNEL_NUMBER+1];
- memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1);
-// printk("enter scan wq,watchdog is %d\n",watchdog);
- down(&ieee->scan_sem);
-
- do{
- ieee->current_network.channel =
- (ieee->current_network.channel + 1) % MAX_CHANNEL_NUMBER;
- if (watchdog++ > MAX_CHANNEL_NUMBER)
- goto out; /* no good chans */
-
- }while(!channel_map[ieee->current_network.channel]);
-
-// printk("current_network.channel:%d\n", ieee->current_network.channel);
- if (ieee->scanning == 0 )
- {
- printk("error out, scanning = 0\n");
- goto out;
- }
- ieee->set_chan(ieee->dev, ieee->current_network.channel);
- if(channel_map[ieee->current_network.channel] == 1)
- ieee80211_send_probe_requests(ieee);
-
- queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, IEEE80211_SOFTMAC_SCAN_TIME);
-out:
- up(&ieee->scan_sem);
- if(IS_DOT11D_ENABLE(ieee))
- DOT11D_ScanComplete(ieee);
-}
-
-#endif
void ieee80211_beacons_start(struct ieee80211_device *ieee)
{
Index: b/drivers/staging/rtl8187se/r8180_core.c
===================================================================
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -3598,13 +3598,11 @@ void rtl8180_watch_dog(struct net_device
u32 TotalRxNum = 0;
u16 SlotIndex = 0;
u16 i = 0;
-#ifdef ENABLE_IPS
if(priv->ieee80211->actscanning == false){
if((priv->ieee80211->iw_mode != IW_MODE_ADHOC) && (priv->ieee80211->state == IEEE80211_NOLINK) && (priv->ieee80211->beinretry == false) && (priv->eRFPowerState == eRfOn)){
IPSEnter(dev);
}
}
-#endif
//YJ,add,080828,for link state check
if((priv->ieee80211->state == IEEE80211_LINKED) && (priv->ieee80211->iw_mode == IW_MODE_INFRA)){
SlotIndex = (priv->link_detect.SlotIndex++) % priv->link_detect.SlotNum;
@@ -3667,12 +3665,10 @@ int _rtl8180_up(struct net_device *dev)
rtl8185b_adapter_start(dev);
rtl8185b_rx_enable(dev);
rtl8185b_tx_enable(dev);
-#ifdef ENABLE_IPS
if(priv->bInactivePs){
if(priv->ieee80211->iw_mode == IW_MODE_ADHOC)
IPSLeave(dev);
}
-#endif
#ifdef RATE_ADAPT
timer_rate_adaptive((unsigned long)dev);
#endif
Index: b/drivers/staging/rtl8187se/r8180_wx.c
===================================================================
--- a/drivers/staging/rtl8187se/r8180_wx.c
+++ b/drivers/staging/rtl8187se/r8180_wx.c
@@ -194,13 +194,11 @@ static int r8180_wx_set_mode(struct net_
return 0;
down(&priv->wx_sem);
-#ifdef ENABLE_IPS
// printk("set mode ENABLE_IPS\n");
if(priv->bInactivePs){
if(wrqu->mode == IW_MODE_ADHOC)
IPSLeave(dev);
}
-#endif
ret = ieee80211_wx_set_mode(priv->ieee80211,a,wrqu,b);
//rtl8180_commit(dev);
@@ -363,7 +361,6 @@ static int r8180_wx_set_scan(struct net_
down(&priv->wx_sem);
if(priv->up){
-#ifdef ENABLE_IPS
// printk("set scan ENABLE_IPS\n");
priv->ieee80211->actscanning = true;
if(priv->bInactivePs && (priv->ieee80211->state != IEEE80211_LINKED)){
@@ -386,7 +383,6 @@ static int r8180_wx_set_scan(struct net_
ret = 0;
}
else
-#endif
{
//YJ,add,080828, prevent scan in BusyTraffic
//FIXME: Need to consider last scan time
@@ -439,11 +435,9 @@ static int r8180_wx_set_essid(struct net
return 0;
down(&priv->wx_sem);
-#ifdef ENABLE_IPS
//printk("set essid ENABLE_IPS\n");
if(priv->bInactivePs)
IPSLeave(dev);
-#endif
// printk("haha:set essid %s essid_len = %d essid_flgs = %d\n",b, wrqu->essid.length, wrqu->essid.flags);
ret = ieee80211_wx_set_essid(priv->ieee80211,a,wrqu,b);
Index: b/drivers/staging/rtl8187se/r8185b_init.c
===================================================================
--- a/drivers/staging/rtl8187se/r8185b_init.c
+++ b/drivers/staging/rtl8187se/r8185b_init.c
@@ -2546,7 +2546,6 @@ void rtl8185b_adapter_start(struct net_d
InitWirelessMode = ieee->mode;
}
//by amy for power save
-#ifdef ENABLE_IPS
// printk("initialize ENABLE_IPS\n");
priv->eRFPowerState = eRfOff;
priv->RfOffReason = 0;
@@ -2571,7 +2570,6 @@ void rtl8185b_adapter_start(struct net_d
// printk("rf off cost jiffies:%lx\n", (tmp2-tmp)*1000/HZ);
}
-#endif
// IPSEnter(dev);
//by amy for power save
#ifdef TODO
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 05/10] Staging: rtl8187se: rename struct ieee80211_hdr to struct ieee80211_hdr_4addr
2009-07-13 18:01 [PATCH 00/10] Stagging: rtl8187se updates Bartlomiej Zolnierkiewicz
` (3 preceding siblings ...)
2009-07-13 18:01 ` [PATCH 04/10] Staging: rtl8187se: remove ENABLE_IPS ifdefs Bartlomiej Zolnierkiewicz
@ 2009-07-13 18:01 ` Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 06/10] Staging: rtl8187se: rename struct ieee80211_hdr_3addr_qos to struct ieee80211_hdr_3addrqos Bartlomiej Zolnierkiewicz
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-13 18:01 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtl8187se: rename struct ieee80211_hdr to struct ieee80211_hdr_4addr
ieee80211_hdr name is too generic so use ieee80211_hdr_4addr one instead
(which matches the naming used by rtl8192su driver).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/staging/rtl8187se/TODO | 1
drivers/staging/rtl8187se/ieee80211/ieee80211.h | 4 -
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c | 10 +--
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c | 26 ++++----
drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c | 42 ++++++-------
drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c | 8 --
drivers/staging/rtl8187se/r8180_core.c | 4 -
7 files changed, 46 insertions(+), 49 deletions(-)
Index: b/drivers/staging/rtl8187se/TODO
===================================================================
--- a/drivers/staging/rtl8187se/TODO
+++ b/drivers/staging/rtl8187se/TODO
@@ -1,6 +1,5 @@
TODO:
- prepare private ieee80211 stack for merge with rtl8192su's version:
- - rename struct ieee80211_hdr to struct ieee80211_hdr_4addr
- rename struct ieee80211_hdr_3addr_QOS to struct ieee80211_hdr_3addrqos
- rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
- add hwsec_active flag to struct ieee80211_device
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -170,7 +170,7 @@ struct ieee_ibss_seq {
struct list_head list;
};
-struct ieee80211_hdr {
+struct ieee80211_hdr_4addr {
u16 frame_ctl;
u16 duration_id;
u8 addr1[ETH_ALEN];
@@ -1450,7 +1450,7 @@ extern void ieee80211_txb_free(struct ie
extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
struct ieee80211_rx_stats *rx_stats);
extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
- struct ieee80211_hdr *header,
+ struct ieee80211_hdr_4addr *header,
struct ieee80211_rx_stats *stats);
/* ieee80211_wx.c */
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
@@ -114,7 +114,7 @@ static inline void xor_block(u8 *b, u8 *
}
static void ccmp_init_blocks(struct crypto_tfm *tfm,
- struct ieee80211_hdr *hdr,
+ struct ieee80211_hdr_4addr *hdr,
u8 *pn, size_t dlen, u8 *b0, u8 *auth,
u8 *s0)
{
@@ -196,7 +196,7 @@ static int ieee80211_ccmp_encrypt(struct
struct ieee80211_ccmp_data *key = priv;
int data_len, i;
u8 *pos;
- struct ieee80211_hdr *hdr;
+ struct ieee80211_hdr_4addr *hdr;
int blocks, last, len;
u8 *mic;
u8 *b0 = key->tx_b0;
@@ -232,7 +232,7 @@ static int ieee80211_ccmp_encrypt(struct
*pos++ = key->tx_pn[1];
*pos++ = key->tx_pn[0];
- hdr = (struct ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
//mic is moved to here by john
mic = skb_put(skb, CCMP_MIC_LEN);
@@ -265,7 +265,7 @@ static int ieee80211_ccmp_decrypt(struct
{
struct ieee80211_ccmp_data *key = priv;
u8 keyidx, *pos;
- struct ieee80211_hdr *hdr;
+ struct ieee80211_hdr_4addr *hdr;
u8 pn[6];
size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN - CCMP_MIC_LEN;
u8 *mic = skb->data + skb->len - CCMP_MIC_LEN;
@@ -279,7 +279,7 @@ static int ieee80211_ccmp_decrypt(struct
return -1;
}
- hdr = (struct ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
pos = skb->data + hdr_len;
keyidx = pos[3];
if (!(keyidx & (1 << 5))) {
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
@@ -310,7 +310,7 @@ static int ieee80211_tkip_encrypt(struct
struct blkcipher_desc desc = {.tfm = tkey->tx_tfm_arc4};
int len;
u8 *pos;
- struct ieee80211_hdr *hdr;
+ struct ieee80211_hdr_4addr *hdr;
u8 rc4key[16],*icv;
u32 crc;
struct scatterlist sg;
@@ -321,7 +321,7 @@ static int ieee80211_tkip_encrypt(struct
skb->len < hdr_len)
return -1;
- hdr = (struct ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
if (!tkey->tx_phase1_done) {
tkip_mixing_phase1(tkey->tx_ttak, tkey->key, hdr->addr2,
@@ -369,7 +369,7 @@ static int ieee80211_tkip_decrypt(struct
u8 keyidx, *pos;
u32 iv32;
u16 iv16;
- struct ieee80211_hdr *hdr;
+ struct ieee80211_hdr_4addr *hdr;
u8 icv[4];
u32 crc;
struct scatterlist sg;
@@ -379,7 +379,7 @@ static int ieee80211_tkip_decrypt(struct
if (skb->len < hdr_len + 8 + 4)
return -1;
- hdr = (struct ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
pos = skb->data + hdr_len;
keyidx = pos[3];
if (!(keyidx & (1 << 5))) {
@@ -494,9 +494,9 @@ static int michael_mic(struct crypto_has
static void michael_mic_hdr(struct sk_buff *skb, u8 *hdr)
{
- struct ieee80211_hdr *hdr11;
+ struct ieee80211_hdr_4addr *hdr11;
- hdr11 = (struct ieee80211_hdr *) skb->data;
+ hdr11 = (struct ieee80211_hdr_4addr *)skb->data;
switch (le16_to_cpu(hdr11->frame_ctl) &
(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS)) {
case IEEE80211_FCTL_TODS:
@@ -527,9 +527,9 @@ static int ieee80211_michael_mic_add(str
{
struct ieee80211_tkip_data *tkey = priv;
u8 *pos;
- struct ieee80211_hdr *hdr;
+ struct ieee80211_hdr_4addr *hdr;
- hdr = (struct ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
if (skb_tailroom(skb) < 8 || skb->len < hdr_len) {
printk(KERN_DEBUG "Invalid packet for Michael MIC add "
@@ -556,7 +556,7 @@ static int ieee80211_michael_mic_add(str
}
static void ieee80211_michael_mic_failure(struct net_device *dev,
- struct ieee80211_hdr *hdr,
+ struct ieee80211_hdr_4addr *hdr,
int keyidx)
{
union iwreq_data wrqu;
@@ -581,9 +581,9 @@ static int ieee80211_michael_mic_verify(
{
struct ieee80211_tkip_data *tkey = priv;
u8 mic[8];
- struct ieee80211_hdr *hdr;
+ struct ieee80211_hdr_4addr *hdr;
- hdr = (struct ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
if (!tkey->key_set)
return -1;
@@ -601,8 +601,8 @@ static int ieee80211_michael_mic_verify(
return -1;
if (memcmp(mic, skb->data + skb->len - 8, 8) != 0) {
- struct ieee80211_hdr *hdr;
- hdr = (struct ieee80211_hdr *) skb->data;
+ struct ieee80211_hdr_4addr *hdr;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
printk(KERN_DEBUG "%s: Michael MIC verification failed for "
"MSDU from " MAC_FMT " keyidx=%d\n",
skb->dev ? skb->dev->name : "N/A", MAC_ARG(hdr->addr2),
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
@@ -49,7 +49,8 @@ static inline void ieee80211_monitor_rx(
struct sk_buff *skb,
struct ieee80211_rx_stats *rx_stats)
{
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
+ struct ieee80211_hdr_4addr *hdr =
+ (struct ieee80211_hdr_4addr *)skb->data;
u16 fc = le16_to_cpu(hdr->frame_ctl);
skb->dev = ieee->dev;
@@ -95,7 +96,7 @@ ieee80211_frag_cache_find(struct ieee802
/* Called only as a tasklet (software IRQ) */
static struct sk_buff *
ieee80211_frag_cache_get(struct ieee80211_device *ieee,
- struct ieee80211_hdr *hdr)
+ struct ieee80211_hdr_4addr *hdr)
{
struct sk_buff *skb = NULL;
u16 fc = le16_to_cpu(hdr->frame_ctl);
@@ -124,7 +125,7 @@ ieee80211_frag_cache_get(struct ieee8021
if (frag == 0) {
/* Reserve enough space to fit maximum frame length */
skb = dev_alloc_skb(ieee->dev->mtu +
- sizeof(struct ieee80211_hdr) +
+ sizeof(struct ieee80211_hdr_4addr) +
8 /* LLC */ +
2 /* alignment */ +
8 /* WEP */ +
@@ -164,7 +165,7 @@ ieee80211_frag_cache_get(struct ieee8021
/* Called only as a tasklet (software IRQ) */
static int ieee80211_frag_cache_invalidate(struct ieee80211_device *ieee,
- struct ieee80211_hdr *hdr)
+ struct ieee80211_hdr_4addr *hdr)
{
u16 fc = le16_to_cpu(hdr->frame_ctl);
u16 sc = le16_to_cpu(hdr->seq_ctl);
@@ -214,17 +215,18 @@ ieee80211_rx_frame_mgmt(struct ieee80211
struct ieee80211_rx_stats *rx_stats, u16 type,
u16 stype)
{
- struct ieee80211_hdr *hdr;
+ struct ieee80211_hdr_4addr *hdr;
// cheat the the hdr type
- hdr = (struct ieee80211_hdr *)skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
/* On the struct stats definition there is written that
* this is not mandatory.... but seems that the probe
* response parser uses it
*/
rx_stats->len = skb->len;
- ieee80211_rx_mgt(ieee,(struct ieee80211_hdr *)skb->data,rx_stats);
+ ieee80211_rx_mgt(ieee, (struct ieee80211_hdr_4addr *)skb->data,
+ rx_stats);
if((ieee->state == IEEE80211_LINKED)&&(memcmp(hdr->addr3,ieee->current_network.bssid,ETH_ALEN))) {
dev_kfree_skb_any(skb);
@@ -256,13 +258,13 @@ static int ieee80211_is_eapol_frame(stru
{
struct net_device *dev = ieee->dev;
u16 fc, ethertype;
- struct ieee80211_hdr *hdr;
+ struct ieee80211_hdr_4addr *hdr;
u8 *pos;
if (skb->len < 24)
return 0;
- hdr = (struct ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
fc = le16_to_cpu(hdr->frame_ctl);
/* check that the frame is unicast frame to us */
@@ -296,13 +298,13 @@ static inline int
ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb,
struct ieee80211_crypt_data *crypt)
{
- struct ieee80211_hdr *hdr;
+ struct ieee80211_hdr_4addr *hdr;
int res, hdrlen;
if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL)
return 0;
- hdr = (struct ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
hdrlen = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
#ifdef CONFIG_IEEE80211_CRYPT_TKIP
@@ -341,13 +343,13 @@ static inline int
ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *skb,
int keyidx, struct ieee80211_crypt_data *crypt)
{
- struct ieee80211_hdr *hdr;
+ struct ieee80211_hdr_4addr *hdr;
int res, hdrlen;
if (crypt == NULL || crypt->ops->decrypt_msdu == NULL)
return 0;
- hdr = (struct ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
hdrlen = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
atomic_inc(&crypt->refcnt);
@@ -367,7 +369,7 @@ ieee80211_rx_frame_decrypt_msdu(struct i
/* this function is stolen from ipw2200 driver*/
#define IEEE_PACKET_RETRY_TIME (5*HZ)
static int is_duplicate_packet(struct ieee80211_device *ieee,
- struct ieee80211_hdr *header)
+ struct ieee80211_hdr_4addr *header)
{
u16 fc = le16_to_cpu(header->frame_ctl);
u16 sc = le16_to_cpu(header->seq_ctl);
@@ -473,7 +475,7 @@ int ieee80211_rx(struct ieee80211_device
{
struct net_device *dev = ieee->dev;
//struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
- struct ieee80211_hdr *hdr;
+ struct ieee80211_hdr_4addr *hdr;
//struct ieee80211_hdr_3addr_QOS *hdr;
size_t hdrlen;
@@ -490,7 +492,7 @@ int ieee80211_rx(struct ieee80211_device
int keyidx = 0;
// cheat the the hdr type
- hdr = (struct ieee80211_hdr *)skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
stats = &ieee->stats;
if (skb->len < 10) {
@@ -631,7 +633,7 @@ int ieee80211_rx(struct ieee80211_device
(keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt)) < 0)
goto rx_dropped;
- hdr = (struct ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
/* skb: hdr + (possibly fragmented) plaintext payload */
// PR: FIXME: hostap has additional conditions in the "if" below:
@@ -684,7 +686,7 @@ int ieee80211_rx(struct ieee80211_device
/* this was the last fragment and the frame will be
* delivered, so remove skb from fragment cache */
skb = frag_skb;
- hdr = (struct ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
ieee80211_frag_cache_invalidate(ieee, hdr);
}
@@ -694,7 +696,7 @@ int ieee80211_rx(struct ieee80211_device
ieee80211_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt))
goto rx_dropped;
- hdr = (struct ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr_4addr *)skb->data;
if (crypt && !(fc & IEEE80211_FCTL_WEP) && !ieee->open_wep) {
if (/*ieee->ieee802_1x &&*/
ieee80211_is_eapol_frame(ieee, skb, hdrlen)) {
@@ -1525,7 +1527,7 @@ inline void ieee80211_process_probe_resp
}
void ieee80211_rx_mgt(struct ieee80211_device *ieee,
- struct ieee80211_hdr *header,
+ struct ieee80211_hdr_4addr *header,
struct ieee80211_rx_stats *stats)
{
switch (WLAN_FC_GET_STYPE(header->frame_ctl)) {
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
@@ -192,11 +192,11 @@ int ieee80211_encrypt_fragment(
return -1;
#ifdef CONFIG_IEEE80211_CRYPT_TKIP
- struct ieee80211_hdr *header;
+ struct ieee80211_hdr_4addr *header;
if (ieee->tkip_countermeasures &&
crypt && crypt->ops && strcmp(crypt->ops->name, "TKIP") == 0) {
- header = (struct ieee80211_hdr *) frag->data;
+ header = (struct ieee80211_hdr_4addr *)frag->data;
if (net_ratelimit()) {
printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
"TX packet to " MAC_FMT "\n",
@@ -317,10 +317,6 @@ int ieee80211_xmit(struct sk_buff *skb,
int ether_type, encrypt;
int bytes, fc, QOS_ctl, hdr_len;
struct sk_buff *skb_frag;
- //struct ieee80211_hdr header = { /* Ensure zero initialized */
- // .duration_id = 0,
- // .seq_ctl = 0
- //};
struct ieee80211_hdr_3addr_QOS header = { /* Ensure zero initialized */
.duration_id = 0,
.seq_ctl = 0,
Index: b/drivers/staging/rtl8187se/r8180_core.c
===================================================================
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -1540,7 +1540,7 @@ void rtl8180_rx(struct net_device *dev)
u8 LNA=0, BB=0;
u8 LNA_gain[4]={02, 17, 29, 39};
u8 Antenna = 0;
- struct ieee80211_hdr *hdr;
+ struct ieee80211_hdr_4addr *hdr;
u16 fc,type;
u8 bHwError = 0,bCRC = 0,bICV = 0;
bool bCckRate = false;
@@ -1736,7 +1736,7 @@ void rtl8180_rx(struct net_device *dev)
| (((*(priv->rxringtail))& (0x08000000)) != 0 )| (((~(*(priv->rxringtail)))& (0x10000000)) != 0 )| (((~(*(priv->rxringtail)))& (0x20000000)) != 0 );
bCRC = ((*(priv->rxringtail)) & (0x00002000)) >> 13;
bICV = ((*(priv->rxringtail)) & (0x00001000)) >> 12;
- hdr = (struct ieee80211_hdr *)priv->rxbuffer->buf;
+ hdr = (struct ieee80211_hdr_4addr *)priv->rxbuffer->buf;
fc = le16_to_cpu(hdr->frame_ctl);
type = WLAN_FC_GET_TYPE(fc);
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 06/10] Staging: rtl8187se: rename struct ieee80211_hdr_3addr_qos to struct ieee80211_hdr_3addrqos
2009-07-13 18:01 [PATCH 00/10] Stagging: rtl8187se updates Bartlomiej Zolnierkiewicz
` (4 preceding siblings ...)
2009-07-13 18:01 ` [PATCH 05/10] Staging: rtl8187se: rename struct ieee80211_hdr to struct ieee80211_hdr_4addr Bartlomiej Zolnierkiewicz
@ 2009-07-13 18:01 ` Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 07/10] Staging: rtl8187se: rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos Bartlomiej Zolnierkiewicz
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-13 18:01 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtl8187se: rename struct ieee80211_hdr_3addr_qos to struct ieee80211_hdr_3addrqos
Rename struct ieee80211_hdr_3addr_QOS to struct ieee80211_hdr_3addrqos
and QOS_ctl field to qos_ctl (to match the naming used by rtl8192su).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/staging/rtl8187se/TODO | 1 -
drivers/staging/rtl8187se/ieee80211/ieee80211.h | 4 ++--
drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c | 20 +++++++++-----------
drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c | 21 +++++++++++----------
4 files changed, 22 insertions(+), 24 deletions(-)
Index: b/drivers/staging/rtl8187se/TODO
===================================================================
--- a/drivers/staging/rtl8187se/TODO
+++ b/drivers/staging/rtl8187se/TODO
@@ -1,6 +1,5 @@
TODO:
- prepare private ieee80211 stack for merge with rtl8192su's version:
- - rename struct ieee80211_hdr_3addr_QOS to struct ieee80211_hdr_3addrqos
- rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
- add hwsec_active flag to struct ieee80211_device
- add bHwSec flag to cb_desc structure
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -200,14 +200,14 @@ struct ieee80211_hdr_3addr {
u16 seq_ctl;
} __attribute__ ((packed));
-struct ieee80211_hdr_3addr_QOS {
+struct ieee80211_hdr_3addrqos {
u16 frame_ctl;
u16 duration_id;
u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN];
u16 seq_ctl;
- u16 QOS_ctl;
+ u16 qos_ctl;
} __attribute__ ((packed));
enum eap_type {
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
@@ -104,7 +104,7 @@ ieee80211_frag_cache_get(struct ieee8021
unsigned int frag = WLAN_GET_SEQ_FRAG(sc);
unsigned int seq = WLAN_GET_SEQ_SEQ(sc);
struct ieee80211_frag_entry *entry;
- struct ieee80211_hdr_3addr_QOS *hdr_3addr_QoS;
+ struct ieee80211_hdr_3addrqos *hdr_3addrqos;
struct ieee80211_hdr_QOS *hdr_4addr_QoS;
u8 tid;
@@ -114,8 +114,8 @@ ieee80211_frag_cache_get(struct ieee8021
tid = UP2AC(tid);
tid ++;
} else if (IEEE80211_QOS_HAS_SEQ(fc)) {
- hdr_3addr_QoS = (struct ieee80211_hdr_3addr_QOS *)hdr;
- tid = le16_to_cpu(hdr_3addr_QoS->QOS_ctl) & IEEE80211_QOS_TID;
+ hdr_3addrqos = (struct ieee80211_hdr_3addrqos *)hdr;
+ tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QOS_TID;
tid = UP2AC(tid);
tid ++;
} else {
@@ -171,7 +171,7 @@ static int ieee80211_frag_cache_invalida
u16 sc = le16_to_cpu(hdr->seq_ctl);
unsigned int seq = WLAN_GET_SEQ_SEQ(sc);
struct ieee80211_frag_entry *entry;
- struct ieee80211_hdr_3addr_QOS *hdr_3addr_QoS;
+ struct ieee80211_hdr_3addrqos *hdr_3addrqos;
struct ieee80211_hdr_QOS *hdr_4addr_QoS;
u8 tid;
@@ -181,8 +181,8 @@ static int ieee80211_frag_cache_invalida
tid = UP2AC(tid);
tid ++;
} else if (IEEE80211_QOS_HAS_SEQ(fc)) {
- hdr_3addr_QoS = (struct ieee80211_hdr_3addr_QOS *)hdr;
- tid = le16_to_cpu(hdr_3addr_QoS->QOS_ctl) & IEEE80211_QOS_TID;
+ hdr_3addrqos = (struct ieee80211_hdr_3addrqos *)hdr;
+ tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QOS_TID;
tid = UP2AC(tid);
tid ++;
} else {
@@ -377,7 +377,7 @@ static int is_duplicate_packet(struct ie
u16 frag = WLAN_GET_SEQ_FRAG(sc);
u16 *last_seq, *last_frag;
unsigned long *last_time;
- struct ieee80211_hdr_3addr_QOS *hdr_3addr_QoS;
+ struct ieee80211_hdr_3addrqos *hdr_3addrqos;
struct ieee80211_hdr_QOS *hdr_4addr_QoS;
u8 tid;
@@ -388,8 +388,8 @@ static int is_duplicate_packet(struct ie
tid = UP2AC(tid);
tid ++;
} else if(IEEE80211_QOS_HAS_SEQ(fc)) { //QoS
- hdr_3addr_QoS = (struct ieee80211_hdr_3addr_QOS*)header;
- tid = le16_to_cpu(hdr_3addr_QoS->QOS_ctl) & IEEE80211_QOS_TID;
+ hdr_3addrqos = (struct ieee80211_hdr_3addrqos *)header;
+ tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QOS_TID;
tid = UP2AC(tid);
tid ++;
} else { // no QoS
@@ -476,7 +476,6 @@ int ieee80211_rx(struct ieee80211_device
struct net_device *dev = ieee->dev;
//struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
struct ieee80211_hdr_4addr *hdr;
- //struct ieee80211_hdr_3addr_QOS *hdr;
size_t hdrlen;
u16 fc, type, stype, sc;
@@ -484,7 +483,6 @@ int ieee80211_rx(struct ieee80211_device
unsigned int frag;
u8 *payload;
u16 ethertype;
-// u16 QOS_ctl = 0;
u8 dst[ETH_ALEN];
u8 src[ETH_ALEN];
u8 bssid[ETH_ALEN];
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
@@ -310,17 +310,17 @@ int ieee80211_xmit(struct sk_buff *skb,
{
struct ieee80211_device *ieee = netdev_priv(dev);
struct ieee80211_txb *txb = NULL;
- struct ieee80211_hdr_3addr_QOS *frag_hdr;
+ struct ieee80211_hdr_3addrqos *frag_hdr;
int i, bytes_per_frag, nr_frags, bytes_last_frag, frag_size;
unsigned long flags;
struct net_device_stats *stats = &ieee->stats;
int ether_type, encrypt;
- int bytes, fc, QOS_ctl, hdr_len;
+ int bytes, fc, qos_ctl, hdr_len;
struct sk_buff *skb_frag;
- struct ieee80211_hdr_3addr_QOS header = { /* Ensure zero initialized */
+ struct ieee80211_hdr_3addrqos header = { /* Ensure zero initialized */
.duration_id = 0,
.seq_ctl = 0,
- .QOS_ctl = 0
+ .qos_ctl = 0
};
u8 dest[ETH_ALEN], src[ETH_ALEN];
@@ -419,22 +419,23 @@ int ieee80211_xmit(struct sk_buff *skb,
if (is_multicast_ether_addr(header.addr1) ||
is_broadcast_ether_addr(header.addr1)) {
frag_size = MAX_FRAG_THRESHOLD;
- QOS_ctl = QOS_CTL_NOTCONTAIN_ACK;
+ qos_ctl = QOS_CTL_NOTCONTAIN_ACK;
}
else {
//printk(KERN_WARNING "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&frag_size = %d\n", frag_size);
frag_size = ieee->fts;//default:392
- QOS_ctl = 0;
+ qos_ctl = 0;
}
if (ieee->current_network.QoS_Enable) {
hdr_len = IEEE80211_3ADDR_LEN + 2;
- QOS_ctl |= skb->priority; //set in the ieee80211_classify
- header.QOS_ctl = cpu_to_le16(QOS_ctl);
+ /* skb->priority is set in the ieee80211_classify() */
+ qos_ctl |= skb->priority;
+ header.qos_ctl = cpu_to_le16(qos_ctl);
} else {
hdr_len = IEEE80211_3ADDR_LEN;
}
- //printk(KERN_WARNING "header size = %d, QOS_ctl = %x\n", hdr_len,QOS_ctl);
+
/* Determine amount of payload per fragment. Regardless of if
* this stack is providing the full 802.11 header, one will
* eventually be affixed to this fragment -- so we must account for
@@ -477,7 +478,7 @@ int ieee80211_xmit(struct sk_buff *skb,
if (encrypt)
skb_reserve(skb_frag, crypt->ops->extra_prefix_len);
- frag_hdr = (struct ieee80211_hdr_3addr_QOS *)skb_put(skb_frag, hdr_len);
+ frag_hdr = (struct ieee80211_hdr_3addrqos *)skb_put(skb_frag, hdr_len);
memcpy(frag_hdr, &header, hdr_len);
/* If this is not the last fragment, then add the MOREFRAGS
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 07/10] Staging: rtl8187se: rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
2009-07-13 18:01 [PATCH 00/10] Stagging: rtl8187se updates Bartlomiej Zolnierkiewicz
` (5 preceding siblings ...)
2009-07-13 18:01 ` [PATCH 06/10] Staging: rtl8187se: rename struct ieee80211_hdr_3addr_qos to struct ieee80211_hdr_3addrqos Bartlomiej Zolnierkiewicz
@ 2009-07-13 18:01 ` Bartlomiej Zolnierkiewicz
2009-07-13 18:02 ` [PATCH 08/10] Staging: rtl8187se/ieee80211: switch to use <linux/ieee80211.h> Bartlomiej Zolnierkiewicz
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-13 18:01 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtl8187se: rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
Rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
and QOS_ctl field to qos_ctl (to match the naming used by rtl8192su).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/staging/rtl8187se/TODO | 1 -
drivers/staging/rtl8187se/ieee80211/ieee80211.h | 4 ++--
drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c | 18 +++++++++---------
3 files changed, 11 insertions(+), 12 deletions(-)
Index: b/drivers/staging/rtl8187se/TODO
===================================================================
--- a/drivers/staging/rtl8187se/TODO
+++ b/drivers/staging/rtl8187se/TODO
@@ -1,6 +1,5 @@
TODO:
- prepare private ieee80211 stack for merge with rtl8192su's version:
- - rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
- add hwsec_active flag to struct ieee80211_device
- add bHwSec flag to cb_desc structure
- switch ieee80211.h to use <linux/ieee80211.h>
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -180,7 +180,7 @@ struct ieee80211_hdr_4addr {
u8 addr4[ETH_ALEN];
} __attribute__ ((packed));
-struct ieee80211_hdr_QOS {
+struct ieee80211_hdr_4addrqos {
u16 frame_ctl;
u16 duration_id;
u8 addr1[ETH_ALEN];
@@ -188,7 +188,7 @@ struct ieee80211_hdr_QOS {
u8 addr3[ETH_ALEN];
u16 seq_ctl;
u8 addr4[ETH_ALEN];
- u16 QOS_ctl;
+ u16 qos_ctl;
} __attribute__ ((packed));
struct ieee80211_hdr_3addr {
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
@@ -105,12 +105,12 @@ ieee80211_frag_cache_get(struct ieee8021
unsigned int seq = WLAN_GET_SEQ_SEQ(sc);
struct ieee80211_frag_entry *entry;
struct ieee80211_hdr_3addrqos *hdr_3addrqos;
- struct ieee80211_hdr_QOS *hdr_4addr_QoS;
+ struct ieee80211_hdr_4addrqos *hdr_4addrqos;
u8 tid;
if (((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS)&&IEEE80211_QOS_HAS_SEQ(fc)) {
- hdr_4addr_QoS = (struct ieee80211_hdr_QOS *)hdr;
- tid = le16_to_cpu(hdr_4addr_QoS->QOS_ctl) & IEEE80211_QOS_TID;
+ hdr_4addrqos = (struct ieee80211_hdr_4addrqos *)hdr;
+ tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QOS_TID;
tid = UP2AC(tid);
tid ++;
} else if (IEEE80211_QOS_HAS_SEQ(fc)) {
@@ -172,12 +172,12 @@ static int ieee80211_frag_cache_invalida
unsigned int seq = WLAN_GET_SEQ_SEQ(sc);
struct ieee80211_frag_entry *entry;
struct ieee80211_hdr_3addrqos *hdr_3addrqos;
- struct ieee80211_hdr_QOS *hdr_4addr_QoS;
+ struct ieee80211_hdr_4addrqos *hdr_4addrqos;
u8 tid;
if(((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS)&&IEEE80211_QOS_HAS_SEQ(fc)) {
- hdr_4addr_QoS = (struct ieee80211_hdr_QOS *)hdr;
- tid = le16_to_cpu(hdr_4addr_QoS->QOS_ctl) & IEEE80211_QOS_TID;
+ hdr_4addrqos = (struct ieee80211_hdr_4addrqos *)hdr;
+ tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QOS_TID;
tid = UP2AC(tid);
tid ++;
} else if (IEEE80211_QOS_HAS_SEQ(fc)) {
@@ -378,13 +378,13 @@ static int is_duplicate_packet(struct ie
u16 *last_seq, *last_frag;
unsigned long *last_time;
struct ieee80211_hdr_3addrqos *hdr_3addrqos;
- struct ieee80211_hdr_QOS *hdr_4addr_QoS;
+ struct ieee80211_hdr_4addrqos *hdr_4addrqos;
u8 tid;
//TO2DS and QoS
if(((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS)&&IEEE80211_QOS_HAS_SEQ(fc)) {
- hdr_4addr_QoS = (struct ieee80211_hdr_QOS *)header;
- tid = le16_to_cpu(hdr_4addr_QoS->QOS_ctl) & IEEE80211_QOS_TID;
+ hdr_4addrqos = (struct ieee80211_hdr_4addrqos *)header;
+ tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QOS_TID;
tid = UP2AC(tid);
tid ++;
} else if(IEEE80211_QOS_HAS_SEQ(fc)) { //QoS
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 08/10] Staging: rtl8187se/ieee80211: switch to use <linux/ieee80211.h>
2009-07-13 18:01 [PATCH 00/10] Stagging: rtl8187se updates Bartlomiej Zolnierkiewicz
` (6 preceding siblings ...)
2009-07-13 18:01 ` [PATCH 07/10] Staging: rtl8187se: rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos Bartlomiej Zolnierkiewicz
@ 2009-07-13 18:02 ` Bartlomiej Zolnierkiewicz
2009-07-13 18:02 ` [PATCH 09/10] Staging: rtl8187se/ieee80211: ieee80211.h reorderings Bartlomiej Zolnierkiewicz
2009-07-13 18:02 ` [PATCH 10/10] Staging: rtl8187se/ieee80211: convert MMIE_TYPE_* defines to enums Bartlomiej Zolnierkiewicz
9 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-13 18:02 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtl8187se/ieee80211: switch to use <linux/ieee80211.h>
While at it:
* remove some commented out code
* remove some unused definitions
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/staging/rtl8187se/TODO | 1
drivers/staging/rtl8187se/ieee80211/ieee80211.h | 122 ------------------------
2 files changed, 1 insertion(+), 122 deletions(-)
Index: b/drivers/staging/rtl8187se/TODO
===================================================================
--- a/drivers/staging/rtl8187se/TODO
+++ b/drivers/staging/rtl8187se/TODO
@@ -2,7 +2,6 @@ TODO:
- prepare private ieee80211 stack for merge with rtl8192su's version:
- add hwsec_active flag to struct ieee80211_device
- add bHwSec flag to cb_desc structure
- - switch ieee80211.h to use <linux/ieee80211.h>
- switch to use shared "librtl" instead of private ieee80211 stack
- switch to use LIB80211
- switch to use MAC80211
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -30,20 +30,7 @@
#include <linux/timer.h>
#include <linux/sched.h>
#include <linux/wireless.h>
-
-/*
-#ifndef bool
-#define bool int
-#endif
-
-#ifndef true
-#define true 1
-#endif
-
-#ifndef false
-#define false 0
-#endif
-*/
+#include <linux/ieee80211.h>
#define KEY_TYPE_NA 0x0
#define KEY_TYPE_WEP40 0x1
@@ -247,61 +234,8 @@ struct eapol {
#define MAX_FRAG_THRESHOLD 2346U
/* Frame control field constants */
-#define IEEE80211_FCTL_VERS 0x0002
-#define IEEE80211_FCTL_FTYPE 0x000c
-#define IEEE80211_FCTL_STYPE 0x00f0
-#define IEEE80211_FCTL_TODS 0x0100
-#define IEEE80211_FCTL_FROMDS 0x0200
#define IEEE80211_FCTL_DSTODS 0x0300 //added by david
-#define IEEE80211_FCTL_MOREFRAGS 0x0400
-#define IEEE80211_FCTL_RETRY 0x0800
-#define IEEE80211_FCTL_PM 0x1000
-#define IEEE80211_FCTL_MOREDATA 0x2000
#define IEEE80211_FCTL_WEP 0x4000
-#define IEEE80211_FCTL_ORDER 0x8000
-
-#define IEEE80211_FTYPE_MGMT 0x0000
-#define IEEE80211_FTYPE_CTL 0x0004
-#define IEEE80211_FTYPE_DATA 0x0008
-
-/* management */
-#define IEEE80211_STYPE_ASSOC_REQ 0x0000
-#define IEEE80211_STYPE_ASSOC_RESP 0x0010
-#define IEEE80211_STYPE_REASSOC_REQ 0x0020
-#define IEEE80211_STYPE_REASSOC_RESP 0x0030
-#define IEEE80211_STYPE_PROBE_REQ 0x0040
-#define IEEE80211_STYPE_PROBE_RESP 0x0050
-#define IEEE80211_STYPE_BEACON 0x0080
-#define IEEE80211_STYPE_ATIM 0x0090
-#define IEEE80211_STYPE_DISASSOC 0x00A0
-#define IEEE80211_STYPE_AUTH 0x00B0
-#define IEEE80211_STYPE_DEAUTH 0x00C0
-#define IEEE80211_STYPE_MANAGE_ACT 0x00D0
-
-/* control */
-#define IEEE80211_STYPE_PSPOLL 0x00A0
-#define IEEE80211_STYPE_RTS 0x00B0
-#define IEEE80211_STYPE_CTS 0x00C0
-#define IEEE80211_STYPE_ACK 0x00D0
-#define IEEE80211_STYPE_CFEND 0x00E0
-#define IEEE80211_STYPE_CFENDACK 0x00F0
-
-/* data */
-#define IEEE80211_STYPE_DATA 0x0000
-#define IEEE80211_STYPE_DATA_CFACK 0x0010
-#define IEEE80211_STYPE_DATA_CFPOLL 0x0020
-#define IEEE80211_STYPE_DATA_CFACKPOLL 0x0030
-#define IEEE80211_STYPE_NULLFUNC 0x0040
-#define IEEE80211_STYPE_CFACK 0x0050
-#define IEEE80211_STYPE_CFPOLL 0x0060
-#define IEEE80211_STYPE_CFACKPOLL 0x0070
-#define IEEE80211_STYPE_QOS_DATA 0x0080 //added for WMM 2006/8/2
-#define IEEE80211_STYPE_QOS_NULL 0x00C0
-
-
-#define IEEE80211_SCTL_FRAG 0x000F
-#define IEEE80211_SCTL_SEQ 0xFFF0
-
/* debug macros */
@@ -407,63 +341,9 @@ struct ieee80211_snap_hdr {
#define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG)
#define WLAN_GET_SEQ_SEQ(seq) ((seq) & IEEE80211_SCTL_SEQ)
-/* Authentication algorithms */
-#define WLAN_AUTH_OPEN 0
-#define WLAN_AUTH_SHARED_KEY 1
-
-#define WLAN_AUTH_CHALLENGE_LEN 128
-
#define WLAN_CAPABILITY_BSS (1<<0)
-#define WLAN_CAPABILITY_IBSS (1<<1)
-#define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
-#define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
-#define WLAN_CAPABILITY_PRIVACY (1<<4)
-#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
-#define WLAN_CAPABILITY_PBCC (1<<6)
-#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
#define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
-/* Status codes */
-#define WLAN_STATUS_SUCCESS 0
-#define WLAN_STATUS_UNSPECIFIED_FAILURE 1
-#define WLAN_STATUS_CAPS_UNSUPPORTED 10
-#define WLAN_STATUS_REASSOC_NO_ASSOC 11
-#define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12
-#define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13
-#define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14
-#define WLAN_STATUS_CHALLENGE_FAIL 15
-#define WLAN_STATUS_AUTH_TIMEOUT 16
-#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
-#define WLAN_STATUS_ASSOC_DENIED_RATES 18
-/* 802.11b */
-#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
-#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
-#define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21
-
-/* Reason codes */
-#define WLAN_REASON_UNSPECIFIED 1
-#define WLAN_REASON_PREV_AUTH_NOT_VALID 2
-#define WLAN_REASON_DEAUTH_LEAVING 3
-#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
-#define WLAN_REASON_DISASSOC_AP_BUSY 5
-#define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6
-#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
-#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
-#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
-
-
-/* Information Element IDs */
-#define WLAN_EID_SSID 0
-#define WLAN_EID_SUPP_RATES 1
-#define WLAN_EID_FH_PARAMS 2
-#define WLAN_EID_DS_PARAMS 3
-#define WLAN_EID_CF_PARAMS 4
-#define WLAN_EID_TIM 5
-#define WLAN_EID_IBSS_PARAMS 6
-#define WLAN_EID_CHALLENGE 16
-#define WLAN_EID_RSN 48
-#define WLAN_EID_GENERIC 221
-
#define IEEE80211_MGMT_HDR_LEN 24
#define IEEE80211_DATA_HDR3_LEN 24
#define IEEE80211_DATA_HDR4_LEN 30
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 09/10] Staging: rtl8187se/ieee80211: ieee80211.h reorderings
2009-07-13 18:01 [PATCH 00/10] Stagging: rtl8187se updates Bartlomiej Zolnierkiewicz
` (7 preceding siblings ...)
2009-07-13 18:02 ` [PATCH 08/10] Staging: rtl8187se/ieee80211: switch to use <linux/ieee80211.h> Bartlomiej Zolnierkiewicz
@ 2009-07-13 18:02 ` Bartlomiej Zolnierkiewicz
2009-07-13 18:02 ` [PATCH 10/10] Staging: rtl8187se/ieee80211: convert MMIE_TYPE_* defines to enums Bartlomiej Zolnierkiewicz
9 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-13 18:02 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtl8187se/ieee80211: ieee80211.h reorderings
Reorder the code in ieee80211.h for easier comparisions with
rtl8192su's version of the file.
While at it:
* use IEEE80211_4ADDR_LEN for IEEE80211_LEN definition
* remove unused country_code_type_t typedef
* make some minor coding style fixes
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/staging/rtl8187se/ieee80211/ieee80211.h | 391 +++++++++++-------------
1 file changed, 193 insertions(+), 198 deletions(-)
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -133,102 +133,14 @@ typedef struct ieee_param {
represents the 2304 bytes of real data, plus a possible 8 bytes of
WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */
-
-#define IEEE80211_HLEN 30
-#define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN)
-
-/* this is stolen and modified from the madwifi driver*/
-#define IEEE80211_FC0_TYPE_MASK 0x0c
-#define IEEE80211_FC0_TYPE_DATA 0x08
-#define IEEE80211_FC0_SUBTYPE_MASK 0xB0
-#define IEEE80211_FC0_SUBTYPE_QOS 0x80
-
-#define IEEE80211_QOS_HAS_SEQ(fc) \
- (((fc) & (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == \
- (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS))
-
-/* this is stolen from ipw2200 driver */
-#define IEEE_IBSS_MAC_HASH_SIZE 31
-struct ieee_ibss_seq {
- u8 mac[ETH_ALEN];
- u16 seq_num[17];
- u16 frag_num[17];
- unsigned long packet_time[17];
- struct list_head list;
-};
-
-struct ieee80211_hdr_4addr {
- u16 frame_ctl;
- u16 duration_id;
- u8 addr1[ETH_ALEN];
- u8 addr2[ETH_ALEN];
- u8 addr3[ETH_ALEN];
- u16 seq_ctl;
- u8 addr4[ETH_ALEN];
-} __attribute__ ((packed));
-
-struct ieee80211_hdr_4addrqos {
- u16 frame_ctl;
- u16 duration_id;
- u8 addr1[ETH_ALEN];
- u8 addr2[ETH_ALEN];
- u8 addr3[ETH_ALEN];
- u16 seq_ctl;
- u8 addr4[ETH_ALEN];
- u16 qos_ctl;
-} __attribute__ ((packed));
-
-struct ieee80211_hdr_3addr {
- u16 frame_ctl;
- u16 duration_id;
- u8 addr1[ETH_ALEN];
- u8 addr2[ETH_ALEN];
- u8 addr3[ETH_ALEN];
- u16 seq_ctl;
-} __attribute__ ((packed));
-
-struct ieee80211_hdr_3addrqos {
- u16 frame_ctl;
- u16 duration_id;
- u8 addr1[ETH_ALEN];
- u8 addr2[ETH_ALEN];
- u8 addr3[ETH_ALEN];
- u16 seq_ctl;
- u16 qos_ctl;
-} __attribute__ ((packed));
-
-enum eap_type {
- EAP_PACKET = 0,
- EAPOL_START,
- EAPOL_LOGOFF,
- EAPOL_KEY,
- EAPOL_ENCAP_ASF_ALERT
-};
-
-static const char *eap_types[] = {
- [EAP_PACKET] = "EAP-Packet",
- [EAPOL_START] = "EAPOL-Start",
- [EAPOL_LOGOFF] = "EAPOL-Logoff",
- [EAPOL_KEY] = "EAPOL-Key",
- [EAPOL_ENCAP_ASF_ALERT] = "EAPOL-Encap-ASF-Alert"
-};
-
-static inline const char *eap_get_type(int type)
-{
- return (type >= ARRAY_SIZE(eap_types)) ? "Unknown" : eap_types[type];
-}
-
-struct eapol {
- u8 snap[6];
- u16 ethertype;
- u8 version;
- u8 type;
- u16 length;
-} __attribute__ ((packed));
-
#define IEEE80211_3ADDR_LEN 24
#define IEEE80211_4ADDR_LEN 30
#define IEEE80211_FCS_LEN 4
+#define IEEE80211_HLEN IEEE80211_4ADDR_LEN
+#define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN)
+#define IEEE80211_MGMT_HDR_LEN 24
+#define IEEE80211_DATA_HDR3_LEN 24
+#define IEEE80211_DATA_HDR4_LEN 30
#define MIN_FRAG_THRESHOLD 256U
#define MAX_FRAG_THRESHOLD 2346U
@@ -249,6 +161,10 @@ do { if (ieee80211_debug_level & (level)
#define IEEE80211_DEBUG(level, fmt, args...) do {} while (0)
#endif /* CONFIG_IEEE80211_DEBUG */
+#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
+#define MAC_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], \
+ ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5]
+
/*
* To use the debug system;
*
@@ -344,11 +260,6 @@ struct ieee80211_snap_hdr {
#define WLAN_CAPABILITY_BSS (1<<0)
#define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
-#define IEEE80211_MGMT_HDR_LEN 24
-#define IEEE80211_DATA_HDR3_LEN 24
-#define IEEE80211_DATA_HDR4_LEN 30
-
-
#define IEEE80211_STATMASK_SIGNAL (1<<0)
#define IEEE80211_STATMASK_RSSI (1<<1)
#define IEEE80211_STATMASK_NOISE (1<<2)
@@ -415,8 +326,25 @@ struct ieee80211_snap_hdr {
#define IEEE80211_NUM_CCK_RATES 4
#define IEEE80211_OFDM_SHIFT_MASK_A 4
+/* this is stolen and modified from the madwifi driver*/
+#define IEEE80211_FC0_TYPE_MASK 0x0c
+#define IEEE80211_FC0_TYPE_DATA 0x08
+#define IEEE80211_FC0_SUBTYPE_MASK 0xB0
+#define IEEE80211_FC0_SUBTYPE_QOS 0x80
+#define IEEE80211_QOS_HAS_SEQ(fc) \
+ (((fc) & (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == \
+ (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS))
+/* this is stolen from ipw2200 driver */
+#define IEEE_IBSS_MAC_HASH_SIZE 31
+struct ieee_ibss_seq {
+ u8 mac[ETH_ALEN];
+ u16 seq_num[17];
+ u16 frag_num[17];
+ unsigned long packet_time[17];
+ struct list_head list;
+};
/* NOTE: This data is for statistical purposes; not all hardware provides this
* information for frames received. Not setting these will not cause
@@ -475,26 +403,6 @@ struct ieee80211_stats {
unsigned int rx_message_in_bad_msg_fragments;
};
-struct ieee80211_softmac_stats{
- unsigned int rx_ass_ok;
- unsigned int rx_ass_err;
- unsigned int rx_probe_rq;
- unsigned int tx_probe_rs;
- unsigned int tx_beacons;
- unsigned int rx_auth_rq;
- unsigned int rx_auth_rs_ok;
- unsigned int rx_auth_rs_err;
- unsigned int tx_auth_rq;
- unsigned int no_auth_rs;
- unsigned int no_ass_rs;
- unsigned int tx_ass_rq;
- unsigned int rx_ass_rq;
- unsigned int tx_probe_rq;
- unsigned int reassoc;
- unsigned int swtxstop;
- unsigned int swtxawake;
-};
-
struct ieee80211_device;
#include "ieee80211_crypt.h"
@@ -548,17 +456,6 @@ Total: 28-2340 bytes
*/
-struct ieee80211_header_data {
- u16 frame_ctl;
- u16 duration_id;
- u8 addr1[6];
- u8 addr2[6];
- u8 addr3[6];
- u16 seq_ctrl;
-};
-
-#define BEACON_PROBE_SSID_ID_POSITION 12
-
/* Management Frame Information Element Types */
#define MFIE_TYPE_SSID 0
#define MFIE_TYPE_RATES 1
@@ -574,20 +471,54 @@ struct ieee80211_header_data {
#define MFIE_TYPE_RATES_EX 50
#define MFIE_TYPE_GENERIC 221
-typedef enum
-{
- COUNTRY_CODE_FCC = 0,
- COUNTRY_CODE_IC = 1,
- COUNTRY_CODE_ETSI = 2,
- COUNTRY_CODE_SPAIN = 3,
- COUNTRY_CODE_FRANCE = 4,
- COUNTRY_CODE_MKK = 5,
- COUNTRY_CODE_MKK1 = 6,
- COUNTRY_CODE_ISRAEL = 7,
- COUNTRY_CODE_TELEC = 8,
- COUNTRY_CODE_GLOBAL_DOMAIN = 9,
- COUNTRY_CODE_WORLD_WIDE_13_INDEX = 10
-}country_code_type_t;
+struct ieee80211_header_data {
+ u16 frame_ctl;
+ u16 duration_id;
+ u8 addr1[6];
+ u8 addr2[6];
+ u8 addr3[6];
+ u16 seq_ctrl;
+};
+
+struct ieee80211_hdr_3addr {
+ u16 frame_ctl;
+ u16 duration_id;
+ u8 addr1[ETH_ALEN];
+ u8 addr2[ETH_ALEN];
+ u8 addr3[ETH_ALEN];
+ u16 seq_ctl;
+} __attribute__ ((packed));
+
+struct ieee80211_hdr_4addr {
+ u16 frame_ctl;
+ u16 duration_id;
+ u8 addr1[ETH_ALEN];
+ u8 addr2[ETH_ALEN];
+ u8 addr3[ETH_ALEN];
+ u16 seq_ctl;
+ u8 addr4[ETH_ALEN];
+} __attribute__ ((packed));
+
+struct ieee80211_hdr_3addrqos {
+ u16 frame_ctl;
+ u16 duration_id;
+ u8 addr1[ETH_ALEN];
+ u8 addr2[ETH_ALEN];
+ u8 addr3[ETH_ALEN];
+ u16 seq_ctl;
+ u16 qos_ctl;
+} __attribute__ ((packed));
+
+struct ieee80211_hdr_4addrqos {
+ u16 frame_ctl;
+ u16 duration_id;
+ u8 addr1[ETH_ALEN];
+ u8 addr2[ETH_ALEN];
+ u8 addr3[ETH_ALEN];
+ u16 seq_ctl;
+ u8 addr4[ETH_ALEN];
+ u16 qos_ctl;
+} __attribute__ ((packed));
struct ieee80211_info_element_hdr {
u8 id;
@@ -600,26 +531,6 @@ struct ieee80211_info_element {
u8 data[0];
} __attribute__ ((packed));
-/*
- * These are the data types that can make up management packets
- *
- u16 auth_algorithm;
- u16 auth_sequence;
- u16 beacon_interval;
- u16 capability;
- u8 current_ap[ETH_ALEN];
- u16 listen_interval;
- struct {
- u16 association_id:14, reserved:2;
- } __attribute__ ((packed));
- u32 time_stamp[2];
- u16 reason;
- u16 status;
-*/
-
-#define IEEE80211_DEFAULT_TX_ESSID "Penguin"
-#define IEEE80211_DEFAULT_BASIC_RATE 10
-
struct ieee80211_authentication {
struct ieee80211_header_data header;
u16 algorithm;
@@ -628,6 +539,15 @@ struct ieee80211_authentication {
//struct ieee80211_info_element_hdr info_element;
} __attribute__ ((packed));
+struct ieee80211_disassoc_frame {
+ struct ieee80211_hdr_3addr header;
+ u16 reasoncode;
+} __attribute__ ((packed));
+
+struct ieee80211_probe_request {
+ struct ieee80211_header_data header;
+ /* struct ieee80211_info_element info_element; */
+} __attribute__ ((packed));
struct ieee80211_probe_response {
struct ieee80211_header_data header;
@@ -637,11 +557,6 @@ struct ieee80211_probe_response {
struct ieee80211_info_element info_element;
} __attribute__ ((packed));
-struct ieee80211_probe_request {
- struct ieee80211_header_data header;
- /*struct ieee80211_info_element info_element;*/
-} __attribute__ ((packed));
-
struct ieee80211_assoc_request_frame {
struct ieee80211_hdr_3addr header;
u16 capability;
@@ -658,11 +573,6 @@ struct ieee80211_assoc_response_frame {
struct ieee80211_info_element info_element; /* supported rates */
} __attribute__ ((packed));
-struct ieee80211_disassoc_frame{
- struct ieee80211_hdr_3addr header;
- u16 reasoncode;
-}__attribute__ ((packed));
-
struct ieee80211_txb {
u8 nr_frags;
u8 encrypted;
@@ -672,6 +582,32 @@ struct ieee80211_txb {
struct sk_buff *fragments[0];
};
+/* SWEEP TABLE ENTRIES NUMBER */
+#define MAX_SWEEP_TAB_ENTRIES 42
+#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET 7
+
+/* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs
+ * only use 8, and then use extended rates for the remaining supported
+ * rates. Other APs, however, stick all of their supported rates on the
+ * main rates information element... */
+#define MAX_RATES_LENGTH ((u8)12)
+#define MAX_RATES_EX_LENGTH ((u8)16)
+
+#define MAX_NETWORK_COUNT 128
+
+#define MAX_CHANNEL_NUMBER 165
+
+#define IEEE80211_SOFTMAC_SCAN_TIME 100 /* (HZ / 2) */
+#define IEEE80211_SOFTMAC_ASSOC_RETRY_TIME (HZ * 2)
+
+#define CRC_LENGTH 4U
+
+#define MAX_WPA_IE_LEN 64
+
+#define NETWORK_EMPTY_ESSID (1 << 0)
+#define NETWORK_HAS_OFDM (1 << 1)
+#define NETWORK_HAS_CCK (1 << 2)
+
struct ieee80211_wmm_ac_param {
u8 ac_aci_acm_aifsn;
u8 ac_ecwmin_ecwmax;
@@ -703,23 +639,82 @@ struct ieee80211_wmm_tspec_elem {
u16 medium_time;
}__attribute__((packed));
+enum eap_type {
+ EAP_PACKET = 0,
+ EAPOL_START,
+ EAPOL_LOGOFF,
+ EAPOL_KEY,
+ EAPOL_ENCAP_ASF_ALERT
+};
+
+static const char *eap_types[] = {
+ [EAP_PACKET] = "EAP-Packet",
+ [EAPOL_START] = "EAPOL-Start",
+ [EAPOL_LOGOFF] = "EAPOL-Logoff",
+ [EAPOL_KEY] = "EAPOL-Key",
+ [EAPOL_ENCAP_ASF_ALERT] = "EAPOL-Encap-ASF-Alert"
+};
+
+static inline const char *eap_get_type(int type)
+{
+ return (type >= ARRAY_SIZE(eap_types)) ? "Unknown" : eap_types[type];
+}
+
+struct eapol {
+ u8 snap[6];
+ u16 ethertype;
+ u8 version;
+ u8 type;
+ u16 length;
+} __attribute__ ((packed));
+
+struct ieee80211_softmac_stats {
+ unsigned int rx_ass_ok;
+ unsigned int rx_ass_err;
+ unsigned int rx_probe_rq;
+ unsigned int tx_probe_rs;
+ unsigned int tx_beacons;
+ unsigned int rx_auth_rq;
+ unsigned int rx_auth_rs_ok;
+ unsigned int rx_auth_rs_err;
+ unsigned int tx_auth_rq;
+ unsigned int no_auth_rs;
+ unsigned int no_ass_rs;
+ unsigned int tx_ass_rq;
+ unsigned int rx_ass_rq;
+ unsigned int tx_probe_rq;
+ unsigned int reassoc;
+ unsigned int swtxstop;
+ unsigned int swtxawake;
+};
+
+#define BEACON_PROBE_SSID_ID_POSITION 12
+
+/*
+ * These are the data types that can make up management packets
+ *
+ u16 auth_algorithm;
+ u16 auth_sequence;
+ u16 beacon_interval;
+ u16 capability;
+ u8 current_ap[ETH_ALEN];
+ u16 listen_interval;
+ struct {
+ u16 association_id:14, reserved:2;
+ } __attribute__ ((packed));
+ u32 time_stamp[2];
+ u16 reason;
+ u16 status;
+*/
+
+#define IEEE80211_DEFAULT_TX_ESSID "Penguin"
+#define IEEE80211_DEFAULT_BASIC_RATE 10
+
enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
#define MAX_SP_Len (WMM_all_frame << 4)
#define IEEE80211_QOS_TID 0x0f
#define QOS_CTL_NOTCONTAIN_ACK (0x01 << 5)
-/* SWEEP TABLE ENTRIES NUMBER*/
-#define MAX_SWEEP_TAB_ENTRIES 42
-#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET 7
-/* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs
- * only use 8, and then use extended rates for the remaining supported
- * rates. Other APs, however, stick all of their supported rates on the
- * main rates information element... */
-#define MAX_RATES_LENGTH ((u8)12)
-#define MAX_RATES_EX_LENGTH ((u8)16)
-#define MAX_NETWORK_COUNT 128
-//#define MAX_CHANNEL_NUMBER 161
-#define MAX_CHANNEL_NUMBER 165 //YJ,modified,080625
#define MAX_IE_LEN 0xFF //+YJ,080625
typedef struct _CHANNEL_LIST{
@@ -727,23 +722,12 @@ typedef struct _CHANNEL_LIST{
u8 Len;
}CHANNEL_LIST, *PCHANNEL_LIST;
-#define IEEE80211_SOFTMAC_SCAN_TIME 100//400
-//(HZ / 2)
//by amy for ps
#define IEEE80211_WATCH_DOG_TIME 2000
//by amy for ps
//by amy for antenna
#define ANTENNA_DIVERSITY_TIMER_PERIOD 1000 // 1000 m
//by amy for antenna
-#define IEEE80211_SOFTMAC_ASSOC_RETRY_TIME (HZ * 2)
-
-#define CRC_LENGTH 4U
-
-#define MAX_WPA_IE_LEN 64
-
-#define NETWORK_EMPTY_ESSID (1<<0)
-#define NETWORK_HAS_OFDM (1<<1)
-#define NETWORK_HAS_CCK (1<<2)
#define IEEE80211_DTIM_MBCAST 4
#define IEEE80211_DTIM_UCAST 2
@@ -882,8 +866,6 @@ enum ieee80211_state {
#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
#define DEFAULT_FTS 2346
-#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
@@ -893,6 +875,19 @@ typedef struct tx_pending_t{
struct ieee80211_txb *txb;
}tx_pending_t;
+enum {
+ COUNTRY_CODE_FCC = 0,
+ COUNTRY_CODE_IC = 1,
+ COUNTRY_CODE_ETSI = 2,
+ COUNTRY_CODE_SPAIN = 3,
+ COUNTRY_CODE_FRANCE = 4,
+ COUNTRY_CODE_MKK = 5,
+ COUNTRY_CODE_MKK1 = 6,
+ COUNTRY_CODE_ISRAEL = 7,
+ COUNTRY_CODE_TELEC = 8,
+ COUNTRY_CODE_GLOBAL_DOMAIN = 9,
+ COUNTRY_CODE_WORLD_WIDE_13_INDEX = 10
+};
struct ieee80211_device {
struct net_device *dev;
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 10/10] Staging: rtl8187se/ieee80211: convert MMIE_TYPE_* defines to enums
2009-07-13 18:01 [PATCH 00/10] Stagging: rtl8187se updates Bartlomiej Zolnierkiewicz
` (8 preceding siblings ...)
2009-07-13 18:02 ` [PATCH 09/10] Staging: rtl8187se/ieee80211: ieee80211.h reorderings Bartlomiej Zolnierkiewicz
@ 2009-07-13 18:02 ` Bartlomiej Zolnierkiewicz
9 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-13 18:02 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtl8187se/ieee80211: convert MMIE_TYPE_* defines to enums
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/staging/rtl8187se/ieee80211/ieee80211.h | 28 ++++++++++++------------
1 file changed, 15 insertions(+), 13 deletions(-)
Index: b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
===================================================================
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -457,19 +457,21 @@ Total: 28-2340 bytes
*/
/* Management Frame Information Element Types */
-#define MFIE_TYPE_SSID 0
-#define MFIE_TYPE_RATES 1
-#define MFIE_TYPE_FH_SET 2
-#define MFIE_TYPE_DS_SET 3
-#define MFIE_TYPE_CF_SET 4
-#define MFIE_TYPE_TIM 5
-#define MFIE_TYPE_IBSS_SET 6
-#define MFIE_TYPE_COUNTRY 7 //+YJ,080625
-#define MFIE_TYPE_CHALLENGE 16
-#define MFIE_TYPE_ERP 42
-#define MFIE_TYPE_RSN 48
-#define MFIE_TYPE_RATES_EX 50
-#define MFIE_TYPE_GENERIC 221
+enum {
+ MFIE_TYPE_SSID = 0,
+ MFIE_TYPE_RATES = 1,
+ MFIE_TYPE_FH_SET = 2,
+ MFIE_TYPE_DS_SET = 3,
+ MFIE_TYPE_CF_SET = 4,
+ MFIE_TYPE_TIM = 5,
+ MFIE_TYPE_IBSS_SET = 6,
+ MFIE_TYPE_COUNTRY = 7,
+ MFIE_TYPE_CHALLENGE = 16,
+ MFIE_TYPE_ERP = 42,
+ MFIE_TYPE_RSN = 48,
+ MFIE_TYPE_RATES_EX = 50,
+ MFIE_TYPE_GENERIC = 221,
+};
struct ieee80211_header_data {
u16 frame_ctl;
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-07-13 17:55 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-13 18:01 [PATCH 00/10] Stagging: rtl8187se updates Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 01/10] Staging: rtl8187se/ieee80211: remove OPENSUSE_SLED ifdefs Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 02/10] Staging: rtl8187se/ieee80211: remove FEDORACORE_9 ifdef Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 03/10] Staging: rtl8187se/ieee80211: remove NOT_YET ifdefs Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 04/10] Staging: rtl8187se: remove ENABLE_IPS ifdefs Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 05/10] Staging: rtl8187se: rename struct ieee80211_hdr to struct ieee80211_hdr_4addr Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 06/10] Staging: rtl8187se: rename struct ieee80211_hdr_3addr_qos to struct ieee80211_hdr_3addrqos Bartlomiej Zolnierkiewicz
2009-07-13 18:01 ` [PATCH 07/10] Staging: rtl8187se: rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos Bartlomiej Zolnierkiewicz
2009-07-13 18:02 ` [PATCH 08/10] Staging: rtl8187se/ieee80211: switch to use <linux/ieee80211.h> Bartlomiej Zolnierkiewicz
2009-07-13 18:02 ` [PATCH 09/10] Staging: rtl8187se/ieee80211: ieee80211.h reorderings Bartlomiej Zolnierkiewicz
2009-07-13 18:02 ` [PATCH 10/10] Staging: rtl8187se/ieee80211: convert MMIE_TYPE_* defines to enums Bartlomiej Zolnierkiewicz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.