From 98a9d7c86ef2ff6df10008dbb93a8139a79a9f33 Mon Sep 17 00:00:00 2001 From: Dmitry Tarnyagin Date: Mon, 10 Oct 2011 15:14:07 +0200 Subject: cw1200: Syncing ALK and GLK tracks. Change-Id: I111ab2cb92dc5fad3eb8938ceb76b7db715b54cc Signed-off-by: Dmitry Tarnyagin Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33545 Reviewed-by: Bartosz MARKOWSKI Reviewed-by: Philippe LANGLAIS --- drivers/staging/cw1200/main.c | 4 +++- drivers/staging/cw1200/pm.c | 18 ++++++++++-------- drivers/staging/cw1200/queue.c | 3 ++- drivers/staging/cw1200/sta.c | 4 +++- drivers/staging/cw1200/txrx.c | 7 ++++++- drivers/staging/cw1200/wsm.c | 4 ++-- 6 files changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/staging/cw1200/main.c b/drivers/staging/cw1200/main.c index 94398fb222f..d4c9da00214 100644 --- a/drivers/staging/cw1200/main.c +++ b/drivers/staging/cw1200/main.c @@ -264,8 +264,8 @@ struct ieee80211_hw *cw1200_init_common(size_t priv_data_len) /* Aggregation is fully controlled by firmware. * Do not need any support from the mac80211 stack */ /* IEEE80211_HW_AMPDU_AGGREGATION | */ - IEEE80211_HW_SUPPORTS_P2P_PS | #if defined(CONFIG_CW1200_USE_STE_EXTENSIONS) + IEEE80211_HW_SUPPORTS_P2P_PS | IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS | IEEE80211_HW_SUPPORTS_CQM_TX_FAIL | #endif /* CONFIG_CW1200_USE_STE_EXTENSIONS */ @@ -283,7 +283,9 @@ struct ieee80211_hw *cw1200_init_common(size_t priv_data_len) WIPHY_WOWLAN_DISCONNECT; hw->wiphy->wowlan.n_patterns = 0; +#if defined(CONFIG_CW1200_USE_STE_EXTENSIONS) hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; +#endif /* CONFIG_CW1200_USE_STE_EXTENSIONS */ hw->channel_change_time = 1000; /* TODO: find actual value */ /* priv->beacon_req_id = cpu_to_le32(0); */ diff --git a/drivers/staging/cw1200/pm.c b/drivers/staging/cw1200/pm.c index 7b2ba504cb2..7c1a957de3e 100644 --- a/drivers/staging/cw1200/pm.c +++ b/drivers/staging/cw1200/pm.c @@ -79,7 +79,7 @@ static void cw1200_pm_deinit_common(struct cw1200_pm_state *pm) #ifdef CONFIG_WAKELOCK int cw1200_pm_init(struct cw1200_pm_state *pm, - struct cw1200_common *priv) + struct cw1200_common *priv) { int ret = cw1200_pm_init_common(pm, priv); if (!ret) @@ -110,14 +110,15 @@ void cw1200_pm_stay_awake(struct cw1200_pm_state *pm, #else /* CONFIG_WAKELOCK */ -static void cw1200_pm_stay_awake_tmo(unsigned long) +static void cw1200_pm_stay_awake_tmo(unsigned long arg) { } -int cw1200_pm_init(struct cw1200_pm_state *pm) +int cw1200_pm_init(struct cw1200_pm_state *pm, + struct cw1200_common *priv) { - int ret = cw1200_pm_init_common(pm); - if (!ret) + int ret = cw1200_pm_init_common(pm, priv); + if (!ret) { init_timer(&pm->stay_awake); pm->stay_awake.data = (unsigned long)pm; pm->stay_awake.function = cw1200_pm_stay_awake_tmo; @@ -128,6 +129,7 @@ int cw1200_pm_init(struct cw1200_pm_state *pm) void cw1200_pm_deinit(struct cw1200_pm_state *pm) { del_timer_sync(&pm->stay_awake); + cw1200_pm_deinit_common(pm); } void cw1200_pm_stay_awake(struct cw1200_pm_state *pm, @@ -199,9 +201,9 @@ int cw1200_wow_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) int ret; #ifndef CONFIG_WAKELOCK - spin_lock_bh(&pm->lock); - ret = timer_pending(&pm->stay_awake); - spin_unlock_bh(&pm->lock); + spin_lock_bh(&pm_state->lock); + ret = timer_pending(&pm_state->stay_awake); + spin_unlock_bh(&pm_state->lock); if (ret) return -EAGAIN; #endif diff --git a/drivers/staging/cw1200/queue.c b/drivers/staging/cw1200/queue.c index d19f87acf4d..12152d33684 100644 --- a/drivers/staging/cw1200/queue.c +++ b/drivers/staging/cw1200/queue.c @@ -9,7 +9,8 @@ * published by the Free Software Foundation. */ -#include "net/mac80211.h" +#include +#include #include "queue.h" #include "cw1200.h" #include "debug.h" diff --git a/drivers/staging/cw1200/sta.c b/drivers/staging/cw1200/sta.c index ddc73e45744..2ddbc1aa2b0 100644 --- a/drivers/staging/cw1200/sta.c +++ b/drivers/staging/cw1200/sta.c @@ -322,6 +322,7 @@ int cw1200_config(struct ieee80211_hw *dev, u32 changed) cw1200_set_pm(priv, &priv->powersave_mode); } +#if defined(CONFIG_CW1200_USE_STE_EXTENSIONS) if (changed & IEEE80211_CONF_CHANGE_P2P_PS) { struct wsm_p2p_ps_modeinfo *modeinfo; modeinfo = &priv->p2p_ps_modeinfo; @@ -361,10 +362,11 @@ int cw1200_config(struct ieee80211_hw *dev, u32 changed) DUMP_PREFIX_NONE, (u8 *)modeinfo, sizeof(*modeinfo)); -#endif +#endif /* CONFIG_CW1200_STA_DEBUG */ WARN_ON(wsm_set_p2p_ps_modeinfo(priv, modeinfo)); } } +#endif /* CONFIG_CW1200_USE_STE_EXTENSIONS */ if (changed & IEEE80211_CONF_CHANGE_MONITOR) { /* TBD: It looks like it's transparent diff --git a/drivers/staging/cw1200/txrx.c b/drivers/staging/cw1200/txrx.c index 109ea2a0286..d49f5dce09e 100644 --- a/drivers/staging/cw1200/txrx.c +++ b/drivers/staging/cw1200/txrx.c @@ -417,9 +417,11 @@ cw1200_tx_h_calc_link_ids(struct cw1200_common *priv, priv->link_id_db[t->txpriv.raw_link_id - 1].timestamp = jiffies; +#if defined(CONFIG_CW1200_USE_STE_EXTENSIONS) if (t->tx_info->control.sta && (t->tx_info->control.sta->uapsd_queues & BIT(t->queue))) t->txpriv.link_id = CW1200_LINK_ID_UAPSD; +#endif /* CONFIG_CW1200_USE_STE_EXTENSIONS */ return 0; } @@ -742,9 +744,11 @@ void cw1200_tx(struct ieee80211_hw *dev, struct sk_buff *skb) } spin_unlock_bh(&priv->ps_state_lock); +#if defined(CONFIG_CW1200_USE_STE_EXTENSIONS) if (tid_update) ieee80211_sta_set_buffered(t.tx_info->control.sta, t.txpriv.tid, true); +#endif /* CONFIG_CW1200_USE_STE_EXTENSIONS */ cw1200_bh_wakeup(priv); @@ -912,6 +916,7 @@ void cw1200_tx_confirm_cb(struct cw1200_common *priv, static void cw1200_notify_buffered_tx(struct cw1200_common *priv, struct sk_buff *skb, int link_id, int tid) { +#if defined(CONFIG_CW1200_USE_STE_EXTENSIONS) struct ieee80211_sta *sta; struct ieee80211_hdr *hdr; u8 *buffered; @@ -935,7 +940,7 @@ static void cw1200_notify_buffered_tx(struct cw1200_common *priv, rcu_read_unlock(); } } - +#endif /* CONFIG_CW1200_USE_STE_EXTENSIONS */ } void cw1200_skb_dtor(struct cw1200_common *priv, diff --git a/drivers/staging/cw1200/wsm.c b/drivers/staging/cw1200/wsm.c index f279b5a310d..19f87bed526 100644 --- a/drivers/staging/cw1200/wsm.c +++ b/drivers/staging/cw1200/wsm.c @@ -1565,7 +1565,7 @@ int wsm_get_tx(struct cw1200_common *priv, u8 **data, { struct wsm_tx *wsm = NULL; struct ieee80211_tx_info *tx_info; - struct cw1200_queue *queue; + struct cw1200_queue *queue = NULL; u32 tx_allowed_mask = 0; const struct cw1200_txpriv *txpriv = NULL; /* @@ -1577,7 +1577,7 @@ int wsm_get_tx(struct cw1200_common *priv, u8 **data, int count = 0; /* More is used only for broadcasts. */ - bool more; + bool more = false; if (priv->wsm_cmd.ptr) { ++count; -- cgit v1.2.3