From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Larry Finger <Larry.Finger@lwfinger.net>,
Florian Schilhabel <florian.c.schilhabel@googlemail.com>,
Jes Sorensen <Jes.Sorensen@redhat.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: [PATCH 5/8] rtl8192u: align local ieee80211_wmm_ac_param struct fields with global
Date: Mon, 27 Apr 2015 01:25:38 -0400 [thread overview]
Message-ID: <1430112341-21402-6-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1430112341-21402-1-git-send-email-paul.gortmaker@windriver.com>
The <linux/ieee80211.h> and this local file both have a struct of the
same name. They also have the same field sizes and generally the
same fields, as can be seen here:
~/git/linux-head$ git grep -A4 'struct ieee80211_wmm_ac_param {'
drivers/staging/rtl8192u/ieee80211/ieee80211.h:struct ieee80211_wmm_ac_param {
drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_aci_acm_aifsn;
drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_ecwmin_ecwmax;
drivers/staging/rtl8192u/ieee80211/ieee80211.h- u16 ac_txop_limit;
drivers/staging/rtl8192u/ieee80211/ieee80211.h-};
--
include/linux/ieee80211.h:struct ieee80211_wmm_ac_param {
include/linux/ieee80211.h- u8 aci_aifsn; /* AIFSN, ACM, ACI */
include/linux/ieee80211.h- u8 cw; /* ECWmin, ECWmax (CW = 2^ECW - 1) */
include/linux/ieee80211.h- __le16 txop_limit;
include/linux/ieee80211.h-} __packed;
~/git/linux-head$
Here we just align the local field names with the main system one. Then
we can add an include of the system one and delete the local copy in one
smooth step in a follow-on commit.
Not that the replacement:
for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_aci_acm_aifsn/aci_aifsn/g' $i ; done
for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_ecwmin_ecwmax/cw/g' $i ; done
for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_txop_limit/txop_limit/g' $i ; done
implicitly shows that only one of the three fields is currently used.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/staging/rtl8192u/ieee80211/ieee80211.h | 6 +++---
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index f6db98c7824c..14ef5e193f2e 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -1277,9 +1277,9 @@ struct ieee80211_tim_parameters {
//#else
struct ieee80211_wmm_ac_param {
- u8 ac_aci_acm_aifsn;
- u8 ac_ecwmin_ecwmax;
- u16 ac_txop_limit;
+ u8 aci_aifsn;
+ u8 cw;
+ u16 txop_limit;
};
struct ieee80211_wmm_ts_info {
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index e833687c7371..b374088c5ff8 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -2366,10 +2366,10 @@ static inline void update_network(struct ieee80211_network *dst,
/* dst->last_associate is not overwritten */
dst->wmm_info = src->wmm_info; //sure to exist in beacon or probe response frame.
- if (src->wmm_param[0].ac_aci_acm_aifsn|| \
- src->wmm_param[1].ac_aci_acm_aifsn|| \
- src->wmm_param[2].ac_aci_acm_aifsn|| \
- src->wmm_param[3].ac_aci_acm_aifsn) {
+ if (src->wmm_param[0].aci_aifsn|| \
+ src->wmm_param[1].aci_aifsn|| \
+ src->wmm_param[2].aci_aifsn|| \
+ src->wmm_param[3].aci_aifsn) {
memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN);
}
//dst->QoS_Enable = src->QoS_Enable;
--
2.2.1
next prev parent reply other threads:[~2015-04-27 5:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 5:25 [PATCH 0/8] staging/rtl8xxx: delete ieee80211 constant duplication Paul Gortmaker
2015-04-27 5:25 ` [PATCH 1/8] rtl8188eu: don't duplicate ieee80211 constants for status/reason Paul Gortmaker
2015-04-27 5:25 ` [PATCH 2/8] rtl8712: " Paul Gortmaker
2015-04-27 5:25 ` [PATCH 3/8] rtl8192u: don't trample on <linux/ieee80211.h> struct namespace Paul Gortmaker
2015-04-30 13:52 ` Jes Sorensen
2015-04-30 14:22 ` Paul Gortmaker
2015-04-30 14:30 ` Jes Sorensen
2015-04-27 5:25 ` [PATCH 4/8] rtl8192u: promote auth_mode to a full 8 bits Paul Gortmaker
2015-04-27 5:25 ` Paul Gortmaker [this message]
2015-04-27 5:25 ` [PATCH 6/8] rtl8192u: don't duplicate ieee80211 constants for status/auth/reason Paul Gortmaker
2015-04-27 5:25 ` [PATCH 7/8] rtl8192u: delete another embedded instance of generic reason codes Paul Gortmaker
2015-04-27 5:25 ` [PATCH 8/8] rtl8192e: delete local copy of iee80211 " Paul Gortmaker
2015-04-27 17:12 ` [PATCH 0/8] staging/rtl8xxx: delete ieee80211 constant duplication Larry Finger
2015-06-17 16:32 ` Jakub Sitnicki
2015-06-17 18:01 ` Larry Finger
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=1430112341-21402-6-git-send-email-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=Jes.Sorensen@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=florian.c.schilhabel@googlemail.com \
--cc=gregkh@linuxfoundation.org \
--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