Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89919
b: refs/heads/master
c: 4a9a66e
h: refs/heads/master
i:
  89917: 07cc02f
  89915: ac7b6b5
  89911: 62c2063
  89903: 3cb3961
  89887: a7ded5e
  89855: 884b52d
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Feb 29, 2008
1 parent 7f613f3 commit 7d045ae
Show file tree
Hide file tree
Showing 4 changed files with 13 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: d007b7f42e2a3a2b95ef43e8cc1a3dfe66b19736
refs/heads/master: 4a9a66e9a87a8346129d557c7ec2303173318012
13 changes: 7 additions & 6 deletions trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ static void ap_sta_ps_start(struct net_device *dev, struct sta_info *sta)
if (sdata->bss)
atomic_inc(&sdata->bss->num_sta_ps);
sta->flags |= WLAN_STA_PS;
sta->pspoll = 0;
sta->flags &= ~WLAN_STA_PSPOLL;
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
printk(KERN_DEBUG "%s: STA %s aid %d enters power save mode\n",
dev->name, print_mac(mac, sta->addr), sta->aid);
Expand All @@ -598,8 +598,7 @@ static int ap_sta_ps_end(struct net_device *dev, struct sta_info *sta)
sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev);
if (sdata->bss)
atomic_dec(&sdata->bss->num_sta_ps);
sta->flags &= ~(WLAN_STA_PS | WLAN_STA_TIM);
sta->pspoll = 0;
sta->flags &= ~(WLAN_STA_PS | WLAN_STA_TIM | WLAN_STA_PSPOLL);
if (!skb_queue_empty(&sta->ps_tx_buf)) {
if (local->ops->set_tim)
local->ops->set_tim(local_to_hw(local), sta->aid, 0);
Expand Down Expand Up @@ -925,9 +924,11 @@ ieee80211_rx_h_ps_poll(struct ieee80211_txrx_data *rx)
struct ieee80211_hdr *hdr =
(struct ieee80211_hdr *) skb->data;

/* tell TX path to send one frame even though the STA may
* still remain is PS mode after this frame exchange */
rx->sta->pspoll = 1;
/*
* Tell TX path to send one frame even though the STA may
* still remain is PS mode after this frame exchange.
*/
rx->sta->flags |= WLAN_STA_PSPOLL;

#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
printk(KERN_DEBUG "STA %s aid %d: PS Poll (entries after %d)\n",
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/mac80211/sta_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* @WLAN_STA_ASSOC_AP: We're associated to that station, it is an AP.
* @WLAN_STA_WME: Station is a QoS-STA.
* @WLAN_STA_WDS: Station is one of our WDS peers.
* @WLAN_STA_PSPOLL: Station has just PS-polled us.
*/
enum ieee80211_sta_info_flags {
WLAN_STA_AUTH = 1<<0,
Expand All @@ -43,6 +44,7 @@ enum ieee80211_sta_info_flags {
WLAN_STA_ASSOC_AP = 1<<6,
WLAN_STA_WME = 1<<7,
WLAN_STA_WDS = 1<<8,
WLAN_STA_PSPOLL = 1<<9,
};

#define STA_TID_NUM 16
Expand Down Expand Up @@ -133,7 +135,6 @@ struct sta_info {

struct sk_buff_head ps_tx_buf; /* buffer of TX frames for station in
* power saving state */
int pspoll; /* whether STA has send a PS Poll frame */
struct sk_buff_head tx_filtered; /* buffer of TX frames that were
* already given to low-level driver,
* but were filtered */
Expand Down
5 changes: 3 additions & 2 deletions trunk/net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_txrx_data *tx)
(tx->fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP)))
return TX_CONTINUE;

if (unlikely((sta->flags & WLAN_STA_PS) && !sta->pspoll)) {
if (unlikely((sta->flags & WLAN_STA_PS) &&
!(sta->flags & WLAN_STA_PSPOLL))) {
struct ieee80211_tx_packet_data *pkt_data;
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
printk(KERN_DEBUG "STA %s aid %d: PS buffer (entries "
Expand Down Expand Up @@ -436,7 +437,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_txrx_data *tx)
print_mac(mac, sta->addr));
}
#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
sta->pspoll = 0;
sta->flags &= ~WLAN_STA_PSPOLL;

return TX_CONTINUE;
}
Expand Down

0 comments on commit 7d045ae

Please sign in to comment.