Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66787
b: refs/heads/master
c: 5391899
h: refs/heads/master
i:
  66785: e994412
  66783: 757c446
v: v3
  • Loading branch information
Johannes Berg authored and David S. Miller committed Oct 10, 2007
1 parent 5101938 commit 5a809eb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 50741ae05a4742cae99361f57d84b5f8d33822a4
refs/heads/master: 53918994b7c8c3bf0af5f641e1f299856799d883
12 changes: 6 additions & 6 deletions trunk/net/mac80211/ieee80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ static void ieee80211_configure_filter(struct ieee80211_local *local)
unsigned int changed_flags;
unsigned int new_flags = 0;

if (local->iff_promiscs)
if (atomic_read(&local->iff_promiscs))
new_flags |= FIF_PROMISC_IN_BSS;

if (local->iff_allmultis)
if (atomic_read(&local->iff_allmultis))
new_flags |= FIF_ALLMULTI;

if (local->monitors)
Expand Down Expand Up @@ -521,17 +521,17 @@ static void ieee80211_set_multicast_list(struct net_device *dev)

if (allmulti != sdata_allmulti) {
if (dev->flags & IFF_ALLMULTI)
local->iff_allmultis++;
atomic_inc(&local->iff_allmultis);
else
local->iff_allmultis--;
atomic_dec(&local->iff_allmultis);
sdata->flags ^= IEEE80211_SDATA_ALLMULTI;
}

if (promisc != sdata_promisc) {
if (dev->flags & IFF_PROMISC)
local->iff_promiscs++;
atomic_inc(&local->iff_promiscs);
else
local->iff_promiscs--;
atomic_dec(&local->iff_promiscs);
sdata->flags ^= IEEE80211_SDATA_PROMISC;
}

Expand Down
5 changes: 2 additions & 3 deletions trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,8 @@ struct ieee80211_local {
struct ieee80211_tx_stored_packet pending_packet[NUM_TX_DATA_QUEUES];
struct tasklet_struct tx_pending_tasklet;

int mc_count; /* total count of multicast entries in all interfaces */
int iff_allmultis, iff_promiscs;
/* number of interfaces with corresponding IFF_ flags */
/* number of interfaces with corresponding IFF_ flags */
atomic_t iff_allmultis, iff_promiscs;

struct rate_control_ref *rate_ctrl;

Expand Down
3 changes: 2 additions & 1 deletion trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,8 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
skb = rx.skb;

if (sta && !(sta->flags & (WLAN_STA_WDS | WLAN_STA_ASSOC_AP)) &&
!local->iff_promiscs && !is_multicast_ether_addr(hdr->addr1)) {
!atomic_read(&local->iff_promiscs) &&
!is_multicast_ether_addr(hdr->addr1)) {
rx.flags |= IEEE80211_TXRXD_RXRA_MATCH;
ieee80211_invoke_rx_handlers(local, local->rx_handlers, &rx,
rx.sta);
Expand Down

0 comments on commit 5a809eb

Please sign in to comment.