Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170969
b: refs/heads/master
c: 11f70f9
h: refs/heads/master
i:
  170967: eb403fc
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Oct 27, 2009
1 parent 7355005 commit 8be3b06
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 3 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: eb5b28d021a1b96050f7af46e9140eb0051cc6d8
refs/heads/master: 11f70f9715f0d8f99eac42d69689e8df15283fea
30 changes: 30 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,3 +1062,33 @@ int wl1271_acx_smart_reflex(struct wl1271 *wl)
return ret;

}

int wl1271_acx_bet_enable(struct wl1271 *wl, bool enable)
{
struct wl1271_acx_bet_enable *acx = NULL;
int ret = 0;

wl1271_debug(DEBUG_ACX, "acx bet enable");

if (enable && wl->conf.conn.bet_enable == CONF_BET_MODE_DISABLE)
goto out;

acx = kzalloc(sizeof(*acx), GFP_KERNEL);
if (!acx) {
ret = -ENOMEM;
goto out;
}

acx->enable = enable ? CONF_BET_MODE_ENABLE : CONF_BET_MODE_DISABLE;
acx->max_consecutive = wl->conf.conn.bet_max_consecutive;

ret = wl1271_cmd_configure(wl, ACX_BET_ENABLE, acx, sizeof(*acx));
if (ret < 0) {
wl1271_warning("acx bet enable failed: %d", ret);
goto out;
}

out:
kfree(acx);
return ret;
}
12 changes: 11 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_acx.h
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,15 @@ struct wl1271_acx_rx_config_opt {
u8 reserved;
} __attribute__ ((packed));


struct wl1271_acx_bet_enable {
struct acx_header header;

u8 enable;
u8 max_consecutive;
u8 padding[2];
} __attribute__ ((packed));

enum {
ACX_WAKE_UP_CONDITIONS = 0x0002,
ACX_MEM_CFG = 0x0003,
Expand Down Expand Up @@ -1043,7 +1052,7 @@ int wl1271_acx_aid(struct wl1271 *wl, u16 aid);
int wl1271_acx_event_mbox_mask(struct wl1271 *wl, u32 event_mask);
int wl1271_acx_set_preamble(struct wl1271 *wl, enum acx_preamble_type preamble);
int wl1271_acx_cts_protect(struct wl1271 *wl,
enum acx_ctsprotect_type ctsprotect);
enum acx_ctsprotect_type ctsprotect);
int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats);
int wl1271_acx_rate_policies(struct wl1271 *wl, u32 enabled_rates);
int wl1271_acx_ac_cfg(struct wl1271 *wl);
Expand All @@ -1054,5 +1063,6 @@ int wl1271_acx_mem_cfg(struct wl1271 *wl);
int wl1271_acx_init_mem_config(struct wl1271 *wl);
int wl1271_acx_init_rx_interrupt(struct wl1271 *wl);
int wl1271_acx_smart_reflex(struct wl1271 *wl);
int wl1271_acx_bet_enable(struct wl1271 *wl, bool enable);

#endif /* __WL1271_ACX_H__ */
23 changes: 23 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,11 @@ enum conf_bcn_filt_mode {
CONF_BCN_FILT_MODE_ENABLED = 1
};

enum conf_bet_mode {
CONF_BET_MODE_DISABLE = 0,
CONF_BET_MODE_ENABLE = 1,
};

struct conf_conn_settings {
/*
* Firmware wakeup conditions configuration. The host may set only
Expand Down Expand Up @@ -689,6 +694,24 @@ struct conf_conn_settings {
* Configuration of signal average weights.
*/
struct conf_sig_weights sig_weights;

/*
* Specifies if beacon early termination procedure is enabled or
* disabled.
*
* Range: CONF_BET_MODE_*
*/
u8 bet_enable;

/*
* Specifies the maximum number of consecutive beacons that may be
* early terminated. After this number is reached at least one full
* beacon must be correctly received in FW before beacon ET
* resumes.
*
* Range 0 - 255
*/
u8 bet_max_consecutive;
};

#define CONF_SR_ERR_TBL_MAX_VALUES 14
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ static struct conf_drv_settings default_conf = {
.rssi_pkt_avg_weight = 10,
.snr_bcn_avg_weight = 10,
.snr_pkt_avg_weight = 10
}
},
.bet_enable = CONF_BET_MODE_ENABLE,
.bet_max_consecutive = 100
},
.init = {
.sr_err_tbl = {
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ int wl1271_ps_set_mode(struct wl1271 *wl, enum wl1271_cmd_ps_mode mode)
if (ret < 0)
return ret;

/* enable beacon early termination */
ret = wl1271_acx_bet_enable(wl, true);
if (ret < 0)
return ret;

ret = wl1271_cmd_ps_mode(wl, STATION_POWER_SAVE_MODE);
if (ret < 0)
return ret;
Expand All @@ -147,6 +152,11 @@ int wl1271_ps_set_mode(struct wl1271 *wl, enum wl1271_cmd_ps_mode mode)
if (ret < 0)
return ret;

/* disable beacon early termination */
ret = wl1271_acx_bet_enable(wl, false);
if (ret < 0)
return ret;

/* disable beacon filtering */
ret = wl1271_acx_beacon_filter_opt(wl, false);
if (ret < 0)
Expand Down

0 comments on commit 8be3b06

Please sign in to comment.