Commit 62b1208e authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

mac80211: small tx code cleanup

It's really easier to read if it's not indented
as much, so invert the condition and rearrange
the code so the smaller chunk is indented instead.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d0b69609
...@@ -317,30 +317,30 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx) ...@@ -317,30 +317,30 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx)
if (!atomic_read(&tx->sdata->bss->num_sta_ps)) if (!atomic_read(&tx->sdata->bss->num_sta_ps))
return TX_CONTINUE; return TX_CONTINUE;
/* buffered in hardware */
if (!(tx->local->hw.flags & IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING)) {
info->flags |= IEEE80211_TX_CTL_SEND_AFTER_DTIM;
return TX_CONTINUE;
}
/* buffered in mac80211 */ /* buffered in mac80211 */
if (tx->local->hw.flags & IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING) { if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER)
if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) purge_old_ps_buffers(tx->local);
purge_old_ps_buffers(tx->local);
if (skb_queue_len(&tx->sdata->bss->ps_bc_buf) >= if (skb_queue_len(&tx->sdata->bss->ps_bc_buf) >= AP_MAX_BC_BUFFER) {
AP_MAX_BC_BUFFER) {
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
if (net_ratelimit()) { if (net_ratelimit())
printk(KERN_DEBUG "%s: BC TX buffer full - " printk(KERN_DEBUG "%s: BC TX buffer full - dropping the oldest frame\n",
"dropping the oldest frame\n", tx->dev->name);
tx->dev->name);
}
#endif #endif
dev_kfree_skb(skb_dequeue(&tx->sdata->bss->ps_bc_buf)); dev_kfree_skb(skb_dequeue(&tx->sdata->bss->ps_bc_buf));
} else } else
tx->local->total_ps_buffered++; tx->local->total_ps_buffered++;
skb_queue_tail(&tx->sdata->bss->ps_bc_buf, tx->skb);
return TX_QUEUED;
}
/* buffered in hardware */ skb_queue_tail(&tx->sdata->bss->ps_bc_buf, tx->skb);
info->flags |= IEEE80211_TX_CTL_SEND_AFTER_DTIM;
return TX_CONTINUE; return TX_QUEUED;
} }
static int ieee80211_use_mfp(__le16 fc, struct sta_info *sta, static int ieee80211_use_mfp(__le16 fc, struct sta_info *sta,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment