[PATCH 3/3] Use SMSM bus to send data frames
Eugene Krasnikov
k.eugene.e at gmail.com
Tue Jul 9 04:50:25 EDT 2013
> + /*
> + * When connected and trying to send data frame chip can be in sleep
> + * mode and writing to the register will not wake up the chip. Instead
> + * notify chip about new frame through SMSM bus.
> + */
> + if (wcn->pw_state == WCN36XX_BMPS) {
> + smsm_change_state(SMSM_APPS_STATE,
> + 0,
> + WCN36XX_SMSM_WLAN_TX_RINGS_EMPTY |
> + WCN36XX_SMSM_WLAN_TX_ENABLE);
> + } else {
> + /* indicate End Of Packet and generate interrupt on descriptor
> + * done.
> + */
> + wcn36xx_dxe_write_register(wcn,
> + ch->reg_ctrl, ch->def_ctrl);
> + }
> return 0;
Do not we need to do both smsm call and write to the register?
2013/7/9 <dreamfly281 at gmail.com>:
> From: Yanbo Li <yanbol at qti.qualcomm.com>
>
> In connected state driver will enter BMPS mode and chip
> can go to suspend. When driver will try to send a frame
> chip can sleep at that time so wake it up through SMSM
> bus.
>
> Reset the power state when return from the suspend mode
>
> Signed-off-by: Yanbo Li <yanbol at qti.qualcomm.com>
> Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
> ---
> dxe.c | 20 +++++++++++++++++---
> main.c | 4 ++--
> 2 files changed, 19 insertions(+), 5 deletions(-)
>
> diff --git a/dxe.c b/dxe.c
> index 5e0dd89..0d9e26b 100644
> --- a/dxe.c
> +++ b/dxe.c
> @@ -590,9 +590,23 @@ int wcn36xx_dxe_tx_frame(struct wcn36xx *wcn,
> /* Move the head of the ring to the next empty descriptor */
> ch->head_blk_ctl = ctl->next;
>
> - /* indicate End Of Packet and generate interrupt on descriptor done */
> - wcn36xx_dxe_write_register(wcn,
> - ch->reg_ctrl, ch->def_ctrl);
> + /*
> + * When connected and trying to send data frame chip can be in sleep
> + * mode and writing to the register will not wake up the chip. Instead
> + * notify chip about new frame through SMSM bus.
> + */
> + if (wcn->pw_state == WCN36XX_BMPS) {
> + smsm_change_state(SMSM_APPS_STATE,
> + 0,
> + WCN36XX_SMSM_WLAN_TX_RINGS_EMPTY |
> + WCN36XX_SMSM_WLAN_TX_ENABLE);
> + } else {
> + /* indicate End Of Packet and generate interrupt on descriptor
> + * done.
> + */
> + wcn36xx_dxe_write_register(wcn,
> + ch->reg_ctrl, ch->def_ctrl);
> + }
> return 0;
> }
> int wcn36xx_dxe_init(struct wcn36xx *wcn)
> diff --git a/main.c b/main.c
> index b59a885..4457979 100644
> --- a/main.c
> +++ b/main.c
> @@ -741,8 +741,8 @@ static int wcn36xx_resume(struct ieee80211_hw *hw)
> wcn36xx_dbg(WCN36XX_DBG_MAC, "mac resume");
>
> wcn->is_suspended = false;
> - if (wcn->aid > 0)
> - wcn36xx_smd_exit_bmps(wcn);
> + if (wcn->pw_state == WCN36XX_BMPS)
> + wcn36xx_pmc_exit_bmps_state(wcn);
>
> if (wcn->is_con_lost_pending) {
> wcn36xx_dbg(WCN36XX_DBG_MAC, "report connection lost");
> --
> 1.7.9.5
>
--
Best regards,
Eugene
More information about the wcn36xx
mailing list