mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 15:15:47 +00:00
[MAC80211]: make assoc_ap a flag
The sta_info.assoc_ap value is used as a flag, move it into flags. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
52aa944a18
commit
c9ee23dfac
3 changed files with 4 additions and 6 deletions
|
@ -1279,8 +1279,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
sta->dev = dev;
|
sta->dev = dev;
|
||||||
sta->flags |= WLAN_STA_AUTH | WLAN_STA_ASSOC;
|
sta->flags |= WLAN_STA_AUTH | WLAN_STA_ASSOC | WLAN_STA_ASSOC_AP;
|
||||||
sta->assoc_ap = 1;
|
|
||||||
|
|
||||||
rates = 0;
|
rates = 0;
|
||||||
mode = local->oper_hw_mode;
|
mode = local->oper_hw_mode;
|
||||||
|
|
|
@ -1398,7 +1398,7 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
|
||||||
skb = rx.skb;
|
skb = rx.skb;
|
||||||
|
|
||||||
skb_push(skb, radiotap_len);
|
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)) {
|
!local->iff_promiscs && !is_multicast_ether_addr(hdr->addr1)) {
|
||||||
rx.flags |= IEEE80211_TXRXD_RXRA_MATCH;
|
rx.flags |= IEEE80211_TXRXD_RXRA_MATCH;
|
||||||
ieee80211_invoke_rx_handlers(local, local->rx_handlers, &rx,
|
ieee80211_invoke_rx_handlers(local, local->rx_handlers, &rx,
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
* send and receive non-IEEE 802.1X frames
|
* send and receive non-IEEE 802.1X frames
|
||||||
*/
|
*/
|
||||||
#define WLAN_STA_SHORT_PREAMBLE BIT(7)
|
#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_WME BIT(9)
|
||||||
#define WLAN_STA_WDS BIT(27)
|
#define WLAN_STA_WDS BIT(27)
|
||||||
|
|
||||||
|
@ -90,9 +92,6 @@ struct sta_info {
|
||||||
int channel_use;
|
int channel_use;
|
||||||
int channel_use_raw;
|
int channel_use_raw;
|
||||||
|
|
||||||
int assoc_ap; /* whether this is an AP that we are
|
|
||||||
* associated with as a client */
|
|
||||||
|
|
||||||
#ifdef CONFIG_MAC80211_DEBUG_COUNTERS
|
#ifdef CONFIG_MAC80211_DEBUG_COUNTERS
|
||||||
unsigned int wme_rx_queue[NUM_RX_DATA_QUEUES];
|
unsigned int wme_rx_queue[NUM_RX_DATA_QUEUES];
|
||||||
unsigned int wme_tx_queue[NUM_RX_DATA_QUEUES];
|
unsigned int wme_tx_queue[NUM_RX_DATA_QUEUES];
|
||||||
|
|
Loading…
Reference in a new issue