public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: "Greg Kroah-Hartman" <gregkh@suse.de>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 06/10] Staging: rtl8187se: rename struct ieee80211_hdr_3addr_qos to struct ieee80211_hdr_3addrqos
Date: Mon, 13 Jul 2009 20:01:51 +0200	[thread overview]
Message-ID: <20090713180151.15985.12457.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20090713180112.15985.88819.sendpatchset@localhost.localdomain>

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

  parent reply	other threads:[~2009-07-13 17:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Bartlomiej Zolnierkiewicz [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090713180151.15985.12457.sendpatchset@localhost.localdomain \
    --to=bzolnier@gmail.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox