Search Linux Wireless

[PATCH 10/12] mac80211: make assoc_ap a flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The sta_info.assoc_ap value is used as a flag, move it
into flags.

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
Acked-by: Michael Wu <flamingice@xxxxxxxxxxxx>

---
 net/mac80211/ieee80211_sta.c |    3 +--
 net/mac80211/rx.c            |    2 +-
 net/mac80211/sta_info.h      |    4 ++--
 3 files changed, 4 insertions(+), 5 deletions(-)

--- wireless-dev.orig/net/mac80211/ieee80211_sta.c	2007-08-28 17:52:41.384622115 +0200
+++ wireless-dev/net/mac80211/ieee80211_sta.c	2007-08-28 17:53:26.094622115 +0200
@@ -1733,8 +1733,7 @@ static void ieee80211_rx_mgmt_assoc_resp
 	}
 
 	sta->dev = dev;
-	sta->flags |= WLAN_STA_AUTH | WLAN_STA_ASSOC;
-	sta->assoc_ap = 1;
+	sta->flags |= WLAN_STA_AUTH | WLAN_STA_ASSOC | WLAN_STA_ASSOC_AP;
 
 	rates = 0;
 	mode = local->oper_hw_mode;
--- wireless-dev.orig/net/mac80211/rx.c	2007-08-28 17:53:22.524622115 +0200
+++ wireless-dev/net/mac80211/rx.c	2007-08-28 17:53:26.094622115 +0200
@@ -1546,7 +1546,7 @@ void __ieee80211_rx(struct ieee80211_hw 
 	skb = rx.skb;
 
 	skb_push(skb, radiotap_len);
-	if (sta && !sta->assoc_ap && !(sta->flags & WLAN_STA_WDS) &&
+	if (sta && !(sta->flags & (WLAN_STA_WDS | WLAN_STA_ASSOC_AP)) &&
 	    !local->iff_promiscs && !is_multicast_ether_addr(hdr->addr1)) {
 		rx.flags |= IEEE80211_TXRXD_RXRA_MATCH;
 		ieee80211_invoke_rx_handlers(local, local->rx_handlers, &rx,
--- wireless-dev.orig/net/mac80211/sta_info.h	2007-08-28 17:52:41.444622115 +0200
+++ wireless-dev/net/mac80211/sta_info.h	2007-08-28 17:53:26.094622115 +0200
@@ -26,6 +26,8 @@
 				    * send and receive non-IEEE 802.1X frames
 				    */
 #define WLAN_STA_SHORT_PREAMBLE BIT(7)
+/* whether this is an AP that we are associated with as a client */
+#define WLAN_STA_ASSOC_AP BIT(8)
 #define WLAN_STA_WME BIT(9)
 #define WLAN_STA_HT  BIT(10)
 #define WLAN_STA_WDS BIT(27)
@@ -91,8 +93,6 @@ struct sta_info {
 	int channel_use;
 	int channel_use_raw;
 
-	unsigned int assoc_ap:1; /* whether this is an AP that we are
-				  * associated with as a client */
 	unsigned int dls_sta:1; /* whether this stations is a DLS peer of us */
 
 #define DLS_STATUS_OK		0

-- 

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux