aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2010-01-14 14:13:47 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-14 18:16:57 -0500
commitb6b1ac69372da996f40863358df41ca77075b249 (patch)
tree5308805b70cedda843d20d6bb054d2d8c442a671
parenta0f2e0fca1e72c1de07e834be05b61d33842253e (diff)
Staging: r8187se: Fix compile error from wireless-testing commit 7044cc56
In wireless-testing, commit 7044cc56 added struct ieee80211_hdr_3addr to include/linux/ieee80211.h. This definition collides with one that is in the r8187se driver in staging. The conflict is resolved by changing r8187se to use the definition from include/linuc/ieee80211.h. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/staging/rtl8187se/ieee80211/ieee80211.h9
-rw-r--r--drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c24
-rw-r--r--drivers/staging/rtl8187se/r8180_core.c4
3 files changed, 14 insertions, 23 deletions
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index 3222c22152fb..462578703d07 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -482,15 +482,6 @@ struct ieee80211_header_data {
482 u16 seq_ctrl; 482 u16 seq_ctrl;
483}; 483};
484 484
485struct ieee80211_hdr_3addr {
486 u16 frame_ctl;
487 u16 duration_id;
488 u8 addr1[ETH_ALEN];
489 u8 addr2[ETH_ALEN];
490 u8 addr3[ETH_ALEN];
491 u16 seq_ctl;
492} __attribute__ ((packed));
493
494struct ieee80211_hdr_4addr { 485struct ieee80211_hdr_4addr {
495 u16 frame_ctl; 486 u16 frame_ctl;
496 u16 duration_id; 487 u16 duration_id;
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
index 334e4c7ec61b..cc9da3713526 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
@@ -203,7 +203,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
203 203
204 enqueue_mgmt(ieee,skb); 204 enqueue_mgmt(ieee,skb);
205 }else{ 205 }else{
206 header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0]<<4); 206 header->seq_ctrl = cpu_to_le16(ieee->seq_ctrl[0]<<4);
207 207
208 if (ieee->seq_ctrl[0] == 0xFFF) 208 if (ieee->seq_ctrl[0] == 0xFFF)
209 ieee->seq_ctrl[0] = 0; 209 ieee->seq_ctrl[0] = 0;
@@ -220,7 +220,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
220 spin_unlock_irqrestore(&ieee->lock, flags); 220 spin_unlock_irqrestore(&ieee->lock, flags);
221 spin_lock_irqsave(&ieee->mgmt_tx_lock, flags); 221 spin_lock_irqsave(&ieee->mgmt_tx_lock, flags);
222 222
223 header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4); 223 header->seq_ctrl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
224 224
225 if (ieee->seq_ctrl[0] == 0xFFF) 225 if (ieee->seq_ctrl[0] == 0xFFF)
226 ieee->seq_ctrl[0] = 0; 226 ieee->seq_ctrl[0] = 0;
@@ -246,7 +246,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *i
246 246
247 if(single){ 247 if(single){
248 248
249 header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4); 249 header->seq_ctrl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
250 250
251 if (ieee->seq_ctrl[0] == 0xFFF) 251 if (ieee->seq_ctrl[0] == 0xFFF)
252 ieee->seq_ctrl[0] = 0; 252 ieee->seq_ctrl[0] = 0;
@@ -259,7 +259,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *i
259 259
260 }else{ 260 }else{
261 261
262 header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4); 262 header->seq_ctrl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
263 263
264 if (ieee->seq_ctrl[0] == 0xFFF) 264 if (ieee->seq_ctrl[0] == 0xFFF)
265 ieee->seq_ctrl[0] = 0; 265 ieee->seq_ctrl[0] = 0;
@@ -287,7 +287,7 @@ inline struct sk_buff *ieee80211_disassociate_skb(
287 return NULL; 287 return NULL;
288 288
289 disass = (struct ieee80211_disassoc_frame *) skb_put(skb,sizeof(struct ieee80211_disassoc_frame)); 289 disass = (struct ieee80211_disassoc_frame *) skb_put(skb,sizeof(struct ieee80211_disassoc_frame));
290 disass->header.frame_ctl = cpu_to_le16(IEEE80211_STYPE_DISASSOC); 290 disass->header.frame_control = cpu_to_le16(IEEE80211_STYPE_DISASSOC);
291 disass->header.duration_id = 0; 291 disass->header.duration_id = 0;
292 292
293 memcpy(disass->header.addr1, beacon->bssid, ETH_ALEN); 293 memcpy(disass->header.addr1, beacon->bssid, ETH_ALEN);
@@ -905,7 +905,7 @@ struct sk_buff* ieee80211_assoc_resp(struct ieee80211_device *ieee, u8 *dest)
905 assoc = (struct ieee80211_assoc_response_frame *) 905 assoc = (struct ieee80211_assoc_response_frame *)
906 skb_put(skb,sizeof(struct ieee80211_assoc_response_frame)); 906 skb_put(skb,sizeof(struct ieee80211_assoc_response_frame));
907 907
908 assoc->header.frame_ctl = cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP); 908 assoc->header.frame_control = cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP);
909 memcpy(assoc->header.addr1, dest,ETH_ALEN); 909 memcpy(assoc->header.addr1, dest,ETH_ALEN);
910 memcpy(assoc->header.addr3, ieee->dev->dev_addr, ETH_ALEN); 910 memcpy(assoc->header.addr3, ieee->dev->dev_addr, ETH_ALEN);
911 memcpy(assoc->header.addr2, ieee->dev->dev_addr, ETH_ALEN); 911 memcpy(assoc->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
@@ -981,7 +981,7 @@ struct sk_buff* ieee80211_null_func(struct ieee80211_device *ieee,short pwr)
981 memcpy(hdr->addr2, ieee->dev->dev_addr, ETH_ALEN); 981 memcpy(hdr->addr2, ieee->dev->dev_addr, ETH_ALEN);
982 memcpy(hdr->addr3, ieee->current_network.bssid, ETH_ALEN); 982 memcpy(hdr->addr3, ieee->current_network.bssid, ETH_ALEN);
983 983
984 hdr->frame_ctl = cpu_to_le16(IEEE80211_FTYPE_DATA | 984 hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA |
985 IEEE80211_STYPE_NULLFUNC | IEEE80211_FCTL_TODS | 985 IEEE80211_STYPE_NULLFUNC | IEEE80211_FCTL_TODS |
986 (pwr ? IEEE80211_FCTL_PM:0)); 986 (pwr ? IEEE80211_FCTL_PM:0));
987 987
@@ -1084,7 +1084,7 @@ inline struct sk_buff *ieee80211_association_req(struct ieee80211_network *beaco
1084 skb_put(skb, sizeof(struct ieee80211_assoc_request_frame)); 1084 skb_put(skb, sizeof(struct ieee80211_assoc_request_frame));
1085 1085
1086 1086
1087 hdr->header.frame_ctl = IEEE80211_STYPE_ASSOC_REQ; 1087 hdr->header.frame_control = IEEE80211_STYPE_ASSOC_REQ;
1088 hdr->header.duration_id= 37; //FIXME 1088 hdr->header.duration_id= 37; //FIXME
1089 memcpy(hdr->header.addr1, beacon->bssid, ETH_ALEN); 1089 memcpy(hdr->header.addr1, beacon->bssid, ETH_ALEN);
1090 memcpy(hdr->header.addr2, ieee->dev->dev_addr, ETH_ALEN); 1090 memcpy(hdr->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
@@ -1786,11 +1786,11 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
1786 1786
1787 tasklet_schedule(&ieee->ps_task); 1787 tasklet_schedule(&ieee->ps_task);
1788 1788
1789 if(WLAN_FC_GET_STYPE(header->frame_ctl) != IEEE80211_STYPE_PROBE_RESP && 1789 if (WLAN_FC_GET_STYPE(header->frame_control) != IEEE80211_STYPE_PROBE_RESP &&
1790 WLAN_FC_GET_STYPE(header->frame_ctl) != IEEE80211_STYPE_BEACON) 1790 WLAN_FC_GET_STYPE(header->frame_control) != IEEE80211_STYPE_BEACON)
1791 ieee->last_rx_ps_time = jiffies; 1791 ieee->last_rx_ps_time = jiffies;
1792 1792
1793 switch (WLAN_FC_GET_STYPE(header->frame_ctl)) { 1793 switch (WLAN_FC_GET_STYPE(header->frame_control)) {
1794 1794
1795 case IEEE80211_STYPE_ASSOC_RESP: 1795 case IEEE80211_STYPE_ASSOC_RESP:
1796 case IEEE80211_STYPE_REASSOC_RESP: 1796 case IEEE80211_STYPE_REASSOC_RESP:
@@ -2064,7 +2064,7 @@ void ieee80211_wake_queue(struct ieee80211_device *ieee)
2064 2064
2065 header = (struct ieee80211_hdr_3addr *) skb->data; 2065 header = (struct ieee80211_hdr_3addr *) skb->data;
2066 2066
2067 header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4); 2067 header->seq_ctrl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
2068 2068
2069 if (ieee->seq_ctrl[0] == 0xFFF) 2069 if (ieee->seq_ctrl[0] == 0xFFF)
2070 ieee->seq_ctrl[0] = 0; 2070 ieee->seq_ctrl[0] = 0;
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 53e654d0d4fa..7788bc42e9b4 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -1909,7 +1909,7 @@ rate)
1909 struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); 1909 struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
1910 int mode; 1910 int mode;
1911 struct ieee80211_hdr_3addr *h = (struct ieee80211_hdr_3addr *) skb->data; 1911 struct ieee80211_hdr_3addr *h = (struct ieee80211_hdr_3addr *) skb->data;
1912 short morefrag = (h->frame_ctl) & IEEE80211_FCTL_MOREFRAGS; 1912 short morefrag = (h->frame_control) & IEEE80211_FCTL_MOREFRAGS;
1913 unsigned long flags; 1913 unsigned long flags;
1914 int priority; 1914 int priority;
1915 1915
@@ -2177,7 +2177,7 @@ short rtl8180_tx(struct net_device *dev, u8* txbuf, int len, int priority,
2177 TxDescDuration = ThisFrameTime + aSifsTime + AckTime; 2177 TxDescDuration = ThisFrameTime + aSifsTime + AckTime;
2178 } 2178 }
2179 2179
2180 if(!(frag_hdr->frame_ctl & IEEE80211_FCTL_MOREFRAGS)) { //no more fragment 2180 if (!(frag_hdr->frame_control & IEEE80211_FCTL_MOREFRAGS)) {
2181 // ThisFrame-ACK. 2181 // ThisFrame-ACK.
2182 Duration = aSifsTime + AckTime; 2182 Duration = aSifsTime + AckTime;
2183 } else { // One or more fragments remained. 2183 } else { // One or more fragments remained.