提交 6e92b416 编写于 作者: L Luciano Coelho 提交者: John W. Linville

wl1271: implement dco itrim parameters setting

Newer firmwares require the dco itrim parameters to be set during
initialization.  This patch implements the new ACX function and calls it.
Signed-off-by: NLuciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 ac9b40fa
...@@ -390,6 +390,35 @@ int wl1271_acx_rts_threshold(struct wl1271 *wl, u16 rts_threshold) ...@@ -390,6 +390,35 @@ int wl1271_acx_rts_threshold(struct wl1271 *wl, u16 rts_threshold)
return ret; return ret;
} }
int wl1271_acx_dco_itrim_params(struct wl1271 *wl)
{
struct acx_dco_itrim_params *dco;
struct conf_itrim_settings *c = &wl->conf.itrim;
int ret;
wl1271_debug(DEBUG_ACX, "acx dco itrim parameters");
dco = kzalloc(sizeof(*dco), GFP_KERNEL);
if (!dco) {
ret = -ENOMEM;
goto out;
}
dco->enable = c->enable;
dco->timeout = cpu_to_le32(c->timeout);
ret = wl1271_cmd_configure(wl, ACX_SET_DCO_ITRIM_PARAMS,
dco, sizeof(*dco));
if (ret < 0) {
wl1271_warning("failed to set dco itrim parameters: %d", ret);
goto out;
}
out:
kfree(dco);
return ret;
}
int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter) int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter)
{ {
struct acx_beacon_filter_option *beacon_filter = NULL; struct acx_beacon_filter_option *beacon_filter = NULL;
......
...@@ -434,6 +434,14 @@ struct acx_smart_reflex_config_params { ...@@ -434,6 +434,14 @@ struct acx_smart_reflex_config_params {
struct smart_reflex_err_table error_table[3]; struct smart_reflex_err_table error_table[3];
} __attribute__ ((packed)); } __attribute__ ((packed));
struct acx_dco_itrim_params {
struct acx_header header;
u8 enable;
u8 padding[3];
__le32 timeout;
} __attribute__ ((packed));
#define PTA_ANTENNA_TYPE_DEF (0) #define PTA_ANTENNA_TYPE_DEF (0)
#define PTA_BT_HP_MAXTIME_DEF (2000) #define PTA_BT_HP_MAXTIME_DEF (2000)
#define PTA_WLAN_HP_MAX_TIME_DEF (5000) #define PTA_WLAN_HP_MAX_TIME_DEF (5000)
...@@ -1029,6 +1037,7 @@ enum { ...@@ -1029,6 +1037,7 @@ enum {
ACX_SET_SMART_REFLEX_DEBUG = 0x005A, ACX_SET_SMART_REFLEX_DEBUG = 0x005A,
ACX_SET_SMART_REFLEX_STATE = 0x005B, ACX_SET_SMART_REFLEX_STATE = 0x005B,
ACX_SET_SMART_REFLEX_PARAMS = 0x005F, ACX_SET_SMART_REFLEX_PARAMS = 0x005F,
ACX_SET_DCO_ITRIM_PARAMS = 0x0061,
DOT11_RX_MSDU_LIFE_TIME = 0x1004, DOT11_RX_MSDU_LIFE_TIME = 0x1004,
DOT11_CUR_TX_PWR = 0x100D, DOT11_CUR_TX_PWR = 0x100D,
DOT11_RX_DOT11_MODE = 0x1012, DOT11_RX_DOT11_MODE = 0x1012,
...@@ -1056,6 +1065,7 @@ int wl1271_acx_group_address_tbl(struct wl1271 *wl, bool enable, ...@@ -1056,6 +1065,7 @@ int wl1271_acx_group_address_tbl(struct wl1271 *wl, bool enable,
void *mc_list, u32 mc_list_len); void *mc_list, u32 mc_list_len);
int wl1271_acx_service_period_timeout(struct wl1271 *wl); int wl1271_acx_service_period_timeout(struct wl1271 *wl);
int wl1271_acx_rts_threshold(struct wl1271 *wl, u16 rts_threshold); int wl1271_acx_rts_threshold(struct wl1271 *wl, u16 rts_threshold);
int wl1271_acx_dco_itrim_params(struct wl1271 *wl);
int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter); int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter);
int wl1271_acx_beacon_filter_table(struct wl1271 *wl); int wl1271_acx_beacon_filter_table(struct wl1271 *wl);
int wl1271_acx_conn_monit_params(struct wl1271 *wl); int wl1271_acx_conn_monit_params(struct wl1271 *wl);
......
...@@ -934,12 +934,21 @@ struct conf_init_settings { ...@@ -934,12 +934,21 @@ struct conf_init_settings {
}; };
struct conf_itrim_settings {
/* enable dco itrim */
u8 enable;
/* moderation timeout in microsecs from the last TX */
u32 timeout;
};
struct conf_drv_settings { struct conf_drv_settings {
struct conf_sg_settings sg; struct conf_sg_settings sg;
struct conf_rx_settings rx; struct conf_rx_settings rx;
struct conf_tx_settings tx; struct conf_tx_settings tx;
struct conf_conn_settings conn; struct conf_conn_settings conn;
struct conf_init_settings init; struct conf_init_settings init;
struct conf_itrim_settings itrim;
}; };
#endif #endif
...@@ -229,6 +229,10 @@ int wl1271_hw_init(struct wl1271 *wl) ...@@ -229,6 +229,10 @@ int wl1271_hw_init(struct wl1271 *wl)
if (ret < 0) if (ret < 0)
goto out_free_memmap; goto out_free_memmap;
ret = wl1271_acx_dco_itrim_params(wl);
if (ret < 0)
goto out_free_memmap;
/* Initialize connection monitoring thresholds */ /* Initialize connection monitoring thresholds */
ret = wl1271_acx_conn_monit_params(wl); ret = wl1271_acx_conn_monit_params(wl);
if (ret < 0) if (ret < 0)
......
...@@ -338,6 +338,10 @@ static struct conf_drv_settings default_conf = { ...@@ -338,6 +338,10 @@ static struct conf_drv_settings default_conf = {
.degraded_low_to_normal_threshold_5 = 0x00, .degraded_low_to_normal_threshold_5 = 0x00,
.degraded_normal_to_high_threshold_5 = 0x00 .degraded_normal_to_high_threshold_5 = 0x00
} }
},
.itrim = {
.enable = false,
.timeout = 50000,
} }
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册