Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314846
b: refs/heads/master
c: 66340e5
h: refs/heads/master
v: v3
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Jun 21, 2012
1 parent c98b88e commit d47e5b6
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 6 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: 26b5858a67e4316ecd8159e2c0dc5591ef68226a
refs/heads/master: 66340e5b259bd7ca67cf0ca079dd3997fa198d4b
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ti/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ static struct wlcore_conf wl12xx_conf = {
.forced_ps = false,
.keep_alive_interval = 55000,
.max_listen_interval = 20,
.sta_sleep_auth = WL1271_PSM_ILLEGAL,
},
.itrim = {
.enable = false,
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ti/wl18xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ static struct wlcore_conf wl18xx_conf = {
.forced_ps = false,
.keep_alive_interval = 55000,
.max_listen_interval = 20,
.sta_sleep_auth = WL1271_PSM_ILLEGAL,
},
.itrim = {
.enable = false,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/ti/wlcore/acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int wl1271_acx_sleep_auth(struct wl1271 *wl, u8 sleep_auth)
struct acx_sleep_auth *auth;
int ret;

wl1271_debug(DEBUG_ACX, "acx sleep auth");
wl1271_debug(DEBUG_ACX, "acx sleep auth %d", sleep_auth);

auth = kzalloc(sizeof(*auth), GFP_KERNEL);
if (!auth) {
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/ti/wlcore/acx.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ enum wl1271_psm_mode {
WL1271_PSM_ELP = 2,

WL1271_PSM_MAX = WL1271_PSM_ELP,

/* illegal out of band value of PSM mode */
WL1271_PSM_ILLEGAL = 0xff
};

struct acx_sleep_auth {
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/net/wireless/ti/wlcore/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,12 @@ struct conf_conn_settings {
* Range: u16
*/
u8 max_listen_interval;

/*
* Default sleep authorization for a new STA interface. This determines
* whether we can go to ELP.
*/
u8 sta_sleep_auth;
} __packed;

enum {
Expand Down Expand Up @@ -1276,7 +1282,7 @@ struct conf_hangover_settings {
* version, the two LSB are the lower driver's private conf
* version.
*/
#define WLCORE_CONF_VERSION (0x0001 << 16)
#define WLCORE_CONF_VERSION (0x0002 << 16)
#define WLCORE_CONF_MASK 0xffff0000
#define WLCORE_CONF_SIZE (sizeof(struct wlcore_conf_header) + \
sizeof(struct wlcore_conf))
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/net/wireless/ti/wlcore/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,13 @@ static ssize_t sleep_auth_write(struct file *file,

mutex_lock(&wl->mutex);

if (wl->state == WL1271_STATE_OFF)
wl->conf.conn.sta_sleep_auth = value;

if (wl->state == WL1271_STATE_OFF) {
/* this will show up on "read" in case we are off */
wl->sleep_auth = value;
goto out;
}

ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/net/wireless/ti/wlcore/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,13 @@ int wl1271_init_vif_specific(struct wl1271 *wl, struct ieee80211_vif *vif)
if (ret < 0)
return ret;
} else if (!wl->sta_count) {
if (wl->quirks & WLCORE_QUIRK_NO_ELP) {
u8 sta_auth = wl->conf.conn.sta_sleep_auth;
if (sta_auth != WL1271_PSM_ILLEGAL) {
/* Configure for power according to debugfs */
ret = wl1271_acx_sleep_auth(wl, sta_auth);
if (ret < 0)
return ret;
} else if (wl->quirks & WLCORE_QUIRK_NO_ELP) {
/* Configure for power always on */
ret = wl1271_acx_sleep_auth(wl, WL1271_PSM_CAM);
if (ret < 0)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5176,7 +5176,7 @@ struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size)
wl->channel_type = NL80211_CHAN_NO_HT;
wl->flags = 0;
wl->sg_enabled = true;
wl->sleep_auth = WL1271_PSM_CAM;
wl->sleep_auth = WL1271_PSM_ILLEGAL;
wl->hw_pg_ver = -1;
wl->ap_ps_map = 0;
wl->ap_fw_ps_map = 0;
Expand Down

0 comments on commit d47e5b6

Please sign in to comment.