Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122664
b: refs/heads/master
c: 89fad57
h: refs/heads/master
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Dec 12, 2008
1 parent 5cd1934 commit 81d9d93
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 41 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: dd397dc9dddfa2149a1bbc9e52ac7d5630737cec
refs/heads/master: 89fad578a61810b7fdf8edd294890f3c0cde4390
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,10 @@ static void mac80211_hwsim_sta_notify(struct ieee80211_hw *hw,
case STA_NOTIFY_REMOVE:
hwsim_clear_sta_magic(sta);
break;
case STA_NOTIFY_SLEEP:
case STA_NOTIFY_AWAKE:
/* TODO: make good use of these flags */
break;
}
}

Expand Down
18 changes: 4 additions & 14 deletions trunk/drivers/net/wireless/p54/p54common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,19 +1051,6 @@ static int p54_sta_unlock(struct ieee80211_hw *dev, u8 *addr)
return 0;
}

static void p54_sta_notify_ps(struct ieee80211_hw *dev,
enum sta_notify_ps_cmd notify_cmd,
struct ieee80211_sta *sta)
{
switch (notify_cmd) {
case STA_NOTIFY_AWAKE:
p54_sta_unlock(dev, sta->addr);
break;
default:
break;
}
}

static void p54_sta_notify(struct ieee80211_hw *dev, struct ieee80211_vif *vif,
enum sta_notify_cmd notify_cmd,
struct ieee80211_sta *sta)
Expand All @@ -1076,6 +1063,10 @@ static void p54_sta_notify(struct ieee80211_hw *dev, struct ieee80211_vif *vif,
* need to buffer frames for this station anymore.
*/

p54_sta_unlock(dev, sta->addr);
break;
case STA_NOTIFY_AWAKE:
/* update the firmware's filter table */
p54_sta_unlock(dev, sta->addr);
break;
default:
Expand Down Expand Up @@ -2027,7 +2018,6 @@ static const struct ieee80211_ops p54_ops = {
.add_interface = p54_add_interface,
.remove_interface = p54_remove_interface,
.set_tim = p54_set_tim,
.sta_notify_ps = p54_sta_notify_ps,
.sta_notify = p54_sta_notify,
.set_key = p54_set_key,
.config = p54_config,
Expand Down
27 changes: 7 additions & 20 deletions trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -773,25 +773,16 @@ struct ieee80211_sta {
* enum sta_notify_cmd - sta notify command
*
* Used with the sta_notify() callback in &struct ieee80211_ops, this
* indicates addition and removal of a station to station table.
* indicates addition and removal of a station to station table,
* or if a associated station made a power state transition.
*
* @STA_NOTIFY_ADD: a station was added to the station table
* @STA_NOTIFY_REMOVE: a station being removed from the station table
*/
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 {
enum sta_notify_cmd {
STA_NOTIFY_ADD, STA_NOTIFY_REMOVE,
STA_NOTIFY_SLEEP, STA_NOTIFY_AWAKE,
};

Expand Down Expand Up @@ -1258,11 +1249,9 @@ enum ieee80211_ampdu_mlme_action {
*
* @set_rts_threshold: Configuration of RTS threshold (if device needs it)
*
* @sta_notify: Notifies low level driver about addition or removal of an
* associated station, AP, IBSS/WDS/mesh peer etc. Must be atomic.
*
* @sta_ps_notify: Notifies low level driver about the power state transition
* of a associated station. Must be atomic.
* @sta_notify: Notifies low level driver about addition, removal or power
* state transition of an associated station, AP, IBSS/WDS/mesh peer etc.
* 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 @@ -1329,8 +1318,6 @@ struct ieee80211_ops {
int (*set_rts_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
12 changes: 6 additions & 6 deletions trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,9 @@ static void ap_sta_ps_start(struct sta_info *sta)

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);
if (local->ops->sta_notify)
local->ops->sta_notify(local_to_hw(local), &sdata->vif,
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 @@ -677,9 +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 (local->ops->sta_notify)
local->ops->sta_notify(local_to_hw(local), &sdata->vif,
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 81d9d93

Please sign in to comment.