Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102793
b: refs/heads/master
c: 747cf5e
h: refs/heads/master
i:
  102791: 878293e
v: v3
  • Loading branch information
Tomas Winkler authored and John W. Linville committed Jun 3, 2008
1 parent add7a3e commit b0e833d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 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: 20ad4fd56255b455beb677dc097eb108d15f1d63
refs/heads/master: 747cf5e924a469a15a454b88a813236460b30975
16 changes: 7 additions & 9 deletions trunk/net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1947,7 +1947,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
struct ieee80211_local *local = hw_to_local(hw);
struct sk_buff *skb;
struct sk_buff *skb = NULL;
struct sta_info *sta;
ieee80211_tx_handler *handler;
struct ieee80211_tx_data tx;
Expand All @@ -1960,27 +1960,24 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,

sdata = vif_to_sdata(vif);
bdev = sdata->dev;

bss = &sdata->u.ap;

if (!bss)
return NULL;

rcu_read_lock();
beacon = rcu_dereference(bss->beacon);

if (sdata->vif.type != IEEE80211_IF_TYPE_AP || !beacon ||
!beacon->head) {
rcu_read_unlock();
return NULL;
}
if (sdata->vif.type != IEEE80211_IF_TYPE_AP || !beacon || !beacon->head)
goto out;

if (bss->dtim_count != 0)
return NULL; /* send buffered bc/mc only after DTIM beacon */
goto out; /* send buffered bc/mc only after DTIM beacon */

while (1) {
skb = skb_dequeue(&bss->ps_bc_buf);
if (!skb)
return NULL;
goto out;
local->total_ps_buffered--;

if (!skb_queue_empty(&bss->ps_bc_buf) && skb->len >= 2) {
Expand Down Expand Up @@ -2023,6 +2020,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
skb = NULL;
}

out:
rcu_read_unlock();

return skb;
Expand Down

0 comments on commit b0e833d

Please sign in to comment.