summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/r8192U_core.c
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2015-04-27 01:25:36 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-08 09:24:13 +0200
commit5c2918a5ba83c3805f96490de07aee36c16a27b6 (patch)
tree6a19ccd22935511ace13a926a5565d43d471943b /drivers/staging/rtl8192u/r8192U_core.c
parentf9c40f143c257c2f3a7e90914e160f1a50f54f49 (diff)
downloadlinux-5c2918a5ba83c3805f96490de07aee36c16a27b6.tar.bz2
rtl8192u: don't trample on <linux/ieee80211.h> struct namespace
In order to start reducing the duplicated code/constants/macros in this driver, we need to include <linux/ieee80211.h> to provide the defacto versions. However this driver has structs with the same name as the ones in the main include, so namespace collision prevents us from doing step #1. Since the structs actually differ in their respective fields, we can't simply delete the local ones without impacting the runtime; a conversion to use the global ones can be considered at a later date if desired. Rename the ones here with a vendor specific prefix so that we won't have the namespace collision, and hence can continue on with the cleanup. Automated conversion done with: for i in `find . -name '*.[ch]'` ; do \ sed -i 's/struct ieee80211_hdr/struct rtl_80211_hdr/g' $i ; \ done Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/r8192U_core.c')
-rw-r--r--drivers/staging/rtl8192u/r8192U_core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 134332234ab9..b852396d21e6 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -3711,10 +3711,10 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
static u32 slide_beacon_adc_pwdb_index, slide_beacon_adc_pwdb_statistics;
static u32 last_beacon_adc_pwdb;
- struct ieee80211_hdr_3addr *hdr;
+ struct rtl_80211_hdr_3addr *hdr;
u16 sc;
unsigned int frag, seq;
- hdr = (struct ieee80211_hdr_3addr *)buffer;
+ hdr = (struct rtl_80211_hdr_3addr *)buffer;
sc = le16_to_cpu(hdr->seq_ctl);
frag = WLAN_GET_SEQ_FRAG(sc);
seq = WLAN_GET_SEQ_SEQ(sc);
@@ -4205,7 +4205,7 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
bool bpacket_match_bssid, bpacket_toself;
bool bPacketBeacon = false, bToSelfBA = false;
static struct ieee80211_rx_stats previous_stats;
- struct ieee80211_hdr_3addr *hdr;//by amy
+ struct rtl_80211_hdr_3addr *hdr;//by amy
u16 fc, type;
// Get Signal Quality for only RX data queue (but not command queue)
@@ -4216,7 +4216,7 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
/* Get MAC frame start address. */
tmp_buf = (u8 *)skb->data;
- hdr = (struct ieee80211_hdr_3addr *)tmp_buf;
+ hdr = (struct rtl_80211_hdr_3addr *)tmp_buf;
fc = le16_to_cpu(hdr->frame_ctl);
type = WLAN_FC_GET_TYPE(fc);
praddr = hdr->addr1;
@@ -4487,7 +4487,7 @@ static void rtl8192_rx_nomal(struct sk_buff *skb)
.freq = IEEE80211_24GHZ_BAND,
};
u32 rx_pkt_len = 0;
- struct ieee80211_hdr_1addr *ieee80211_hdr = NULL;
+ struct rtl_80211_hdr_1addr *ieee80211_hdr = NULL;
bool unicast_packet = false;
/* 20 is for ps-poll */
@@ -4500,7 +4500,7 @@ static void rtl8192_rx_nomal(struct sk_buff *skb)
skb_trim(skb, skb->len - 4/*sCrcLng*/);
rx_pkt_len = skb->len;
- ieee80211_hdr = (struct ieee80211_hdr_1addr *)skb->data;
+ ieee80211_hdr = (struct rtl_80211_hdr_1addr *)skb->data;
unicast_packet = false;
if (is_broadcast_ether_addr(ieee80211_hdr->addr1)) {
//TODO