Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122487
b: refs/heads/master
c: 4571d3b
h: refs/heads/master
i:
  122485: e0b234b
  122483: cc5e1a7
  122479: f2c98cd
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Dec 5, 2008
1 parent d798896 commit da2f3b7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a163c6de452c0b321396caceac5d163949b4cf2
refs/heads/master: 4571d3bf87b76eae875283ff9f7243984b5ddcae
18 changes: 18 additions & 0 deletions trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,19 @@ enum sta_notify_cmd {
STA_NOTIFY_ADD, STA_NOTIFY_REMOVE
};

/**
* enum sta_notify_ps_cmd - sta power save notify command
*
* Used with the sta_notify_ps() callback in &struct ieee80211_ops to
* notify the driver if a station made a power state transition.
*
* @STA_NOTIFY_SLEEP: a station is now sleeping
* @STA_NOTIFY_AWAKE: a sleeping station woke up
*/
enum sta_notify_ps_cmd {
STA_NOTIFY_SLEEP, STA_NOTIFY_AWAKE,
};

/**
* enum ieee80211_tkip_key_type - get tkip key
*
Expand Down Expand Up @@ -1251,6 +1264,9 @@ enum ieee80211_ampdu_mlme_action {
* @sta_notify: Notifies low level driver about addition or removal
* of associated station or AP.
*
* @sta_ps_notify: Notifies low level driver about the power state transition
* of a associated station. Must be atomic.
*
* @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max),
* bursting) for a hardware TX queue.
*
Expand Down Expand Up @@ -1317,6 +1333,8 @@ struct ieee80211_ops {
int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value);
void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
enum sta_notify_cmd, struct ieee80211_sta *sta);
void (*sta_notify_ps)(struct ieee80211_hw *hw,
enum sta_notify_ps_cmd, struct ieee80211_sta *sta);
int (*conf_tx)(struct ieee80211_hw *hw, u16 queue,
const struct ieee80211_tx_queue_params *params);
int (*get_tx_stats)(struct ieee80211_hw *hw,
Expand Down
7 changes: 7 additions & 0 deletions trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,9 +654,13 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
static void ap_sta_ps_start(struct sta_info *sta)
{
struct ieee80211_sub_if_data *sdata = sta->sdata;
struct ieee80211_local *local = sdata->local;

atomic_inc(&sdata->bss->num_sta_ps);
set_and_clear_sta_flags(sta, WLAN_STA_PS, WLAN_STA_PSPOLL);
if (local->ops->sta_notify_ps)
local->ops->sta_notify_ps(local_to_hw(local), STA_NOTIFY_SLEEP,
&sta->sta);
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
printk(KERN_DEBUG "%s: STA %pM aid %d enters power save mode\n",
sdata->dev->name, sta->sta.addr, sta->sta.aid);
Expand All @@ -673,6 +677,9 @@ static int ap_sta_ps_end(struct sta_info *sta)
atomic_dec(&sdata->bss->num_sta_ps);

clear_sta_flags(sta, WLAN_STA_PS | WLAN_STA_PSPOLL);
if (local->ops->sta_notify_ps)
local->ops->sta_notify_ps(local_to_hw(local), STA_NOTIFY_AWAKE,
&sta->sta);

if (!skb_queue_empty(&sta->ps_tx_buf))
sta_info_clear_tim_bit(sta);
Expand Down

0 comments on commit da2f3b7

Please sign in to comment.