This source file includes following definitions.
- wcn36xx_pmc_enter_bmps_state
- wcn36xx_pmc_exit_bmps_state
- wcn36xx_enable_keep_alive_null_packet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
18
19 #include "wcn36xx.h"
20
21 int wcn36xx_pmc_enter_bmps_state(struct wcn36xx *wcn,
22 struct ieee80211_vif *vif)
23 {
24 int ret = 0;
25 struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
26
27 ret = wcn36xx_smd_enter_bmps(wcn, vif);
28 if (!ret) {
29 wcn36xx_dbg(WCN36XX_DBG_PMC, "Entered BMPS\n");
30 vif_priv->pw_state = WCN36XX_BMPS;
31 } else {
32
33
34
35
36
37 wcn36xx_err("Can not enter BMPS!\n");
38 }
39 return ret;
40 }
41
42 int wcn36xx_pmc_exit_bmps_state(struct wcn36xx *wcn,
43 struct ieee80211_vif *vif)
44 {
45 struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
46
47 if (WCN36XX_BMPS != vif_priv->pw_state) {
48
49 wcn36xx_dbg(WCN36XX_DBG_PMC,
50 "Not in BMPS mode, no need to exit\n");
51 return -EALREADY;
52 }
53 wcn36xx_smd_exit_bmps(wcn, vif);
54 vif_priv->pw_state = WCN36XX_FULL_POWER;
55 return 0;
56 }
57
58 int wcn36xx_enable_keep_alive_null_packet(struct wcn36xx *wcn,
59 struct ieee80211_vif *vif)
60 {
61 wcn36xx_dbg(WCN36XX_DBG_PMC, "%s\n", __func__);
62 return wcn36xx_smd_keep_alive_req(wcn, vif,
63 WCN36XX_HAL_KEEP_ALIVE_NULL_PKT);
64 }