summaryrefslogtreecommitdiff
path: root/drivers/staging/cw1200/ap.c
diff options
context:
space:
mode:
authorDmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>2011-10-04 18:17:07 +0200
committerPhilippe LANGLAIS <philippe.langlais@stericsson.com>2011-10-13 10:22:31 +0200
commit981db2f065cbba810c39290ac8906c2ae68f3b6b (patch)
tree0c32a119a87623dcc6d2bdcb1e6ae4df799aa1cb /drivers/staging/cw1200/ap.c
parent9f9e9c3ff112d6ba5b1723a8ae1f67450d7091b1 (diff)
cw1200: cw1200_sta_notify implementation was removed by mistake.
Asleep map in the driver was not updated. Bug was introduced by following commit: "cw1200: Adaptation to U-APSD/AP support as on Thu, Sep 22, 2011". ST-Ericsson ID: 360749 Change-Id: I5005a91f20ebc182e92f13f94510fa16fd7846ae Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33539 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Diffstat (limited to 'drivers/staging/cw1200/ap.c')
-rwxr-xr-xdrivers/staging/cw1200/ap.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/drivers/staging/cw1200/ap.c b/drivers/staging/cw1200/ap.c
index 0e0947a4482..5e7177f85cf 100755
--- a/drivers/staging/cw1200/ap.c
+++ b/drivers/staging/cw1200/ap.c
@@ -80,10 +80,35 @@ int cw1200_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
return 0;
}
-void cw1200_sta_notify(struct ieee80211_hw *dev, struct ieee80211_vif *vif,
- enum sta_notify_cmd notify_cmd,
- struct ieee80211_sta *sta)
+static void __cw1200_sta_notify(struct ieee80211_hw *dev,
+ struct ieee80211_vif *vif,
+ enum sta_notify_cmd notify_cmd,
+ struct ieee80211_sta *sta)
{
+ struct cw1200_common *priv = dev->priv;
+ struct cw1200_sta_priv *sta_priv =
+ (struct cw1200_sta_priv *)&sta->drv_priv;
+ u32 bit = BIT(sta_priv->link_id);
+
+ spin_lock_bh(&priv->buffered_multicasts_lock);
+ switch (notify_cmd) {
+ case STA_NOTIFY_SLEEP:
+ if (priv->buffered_multicasts &&
+ !priv->sta_asleep_mask)
+ queue_work(priv->workqueue,
+ &priv->multicast_start_work);
+ priv->sta_asleep_mask |= bit;
+ break;
+ case STA_NOTIFY_AWAKE:
+ priv->sta_asleep_mask &= ~bit;
+ if (priv->tx_multicast &&
+ !priv->sta_asleep_mask)
+ queue_work(priv->workqueue,
+ &priv->multicast_stop_work);
+ cw1200_bh_wakeup(priv);
+ break;
+ }
+ spin_unlock_bh(&priv->buffered_multicasts_lock);
}
static void __cw1200_ps_notify(struct cw1200_common *priv,
@@ -96,7 +121,7 @@ static void __cw1200_ps_notify(struct cw1200_common *priv,
priv->link_id_db[link_id - 1].ps = ps;
if (sta) {
- cw1200_sta_notify(priv->hw, priv->vif,
+ __cw1200_sta_notify(priv->hw, priv->vif,
ps ? STA_NOTIFY_SLEEP : STA_NOTIFY_AWAKE, sta);
ieee80211_sta_ps_transition_ni(sta, ps);
}