From ec3eec8022300f28a4c5fe2025043628e680930a Mon Sep 17 00:00:00 2001 From: Luciano Coelho Date: Mon, 5 Dec 2011 16:51:10 +0200 Subject: [PATCH] --- yaml --- r: 300931 b: refs/heads/master c: 166b213626067c3128e196a558a0cb318344b411 h: refs/heads/master i: 300929: 949a027d91a4a89088214f378e53c2116bd25d19 300927: 4996065920e980383a6c8f83ee460eb51083a1b8 v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ti/wl12xx/cmd.c | 4 +- trunk/drivers/net/wireless/ti/wl12xx/cmd.h | 2 + trunk/drivers/net/wireless/ti/wl12xx/conf.h | 49 +++++++++++++++++++ trunk/drivers/net/wireless/ti/wl12xx/main.c | 14 +----- trunk/drivers/net/wireless/ti/wl12xx/wl12xx.h | 31 ++++++++++++ trunk/drivers/net/wireless/ti/wlcore/conf.h | 21 -------- 7 files changed, 87 insertions(+), 36 deletions(-) create mode 100644 trunk/drivers/net/wireless/ti/wl12xx/conf.h create mode 100644 trunk/drivers/net/wireless/ti/wl12xx/wl12xx.h diff --git a/[refs] b/[refs] index 5cac50deefe7..a2ad3e241599 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e87288f089d3ba1c10d2323c286f8145450fd250 +refs/heads/master: 166b213626067c3128e196a558a0cb318344b411 diff --git a/trunk/drivers/net/wireless/ti/wl12xx/cmd.c b/trunk/drivers/net/wireless/ti/wl12xx/cmd.c index e46512d185a6..8ffaeb5f2147 100644 --- a/trunk/drivers/net/wireless/ti/wl12xx/cmd.c +++ b/trunk/drivers/net/wireless/ti/wl12xx/cmd.c @@ -23,12 +23,14 @@ #include "../wlcore/cmd.h" #include "../wlcore/debug.h" +#include "wl12xx.h" #include "cmd.h" int wl1271_cmd_ext_radio_parms(struct wl1271 *wl) { struct wl1271_ext_radio_parms_cmd *ext_radio_parms; - struct conf_rf_settings *rf = &wl->conf.rf; + struct wl12xx_priv *priv = wl->priv; + struct wl12xx_conf_rf *rf = &priv->conf.rf; int ret; if (!wl->nvs) diff --git a/trunk/drivers/net/wireless/ti/wl12xx/cmd.h b/trunk/drivers/net/wireless/ti/wl12xx/cmd.h index ff458302ab04..140a0e8829d5 100644 --- a/trunk/drivers/net/wireless/ti/wl12xx/cmd.h +++ b/trunk/drivers/net/wireless/ti/wl12xx/cmd.h @@ -23,6 +23,8 @@ #ifndef __WL12XX_CMD_H__ #define __WL12XX_CMD_H__ +#include "conf.h" + #define TEST_CMD_INI_FILE_RADIO_PARAM 0x19 #define TEST_CMD_INI_FILE_GENERAL_PARAM 0x1E diff --git a/trunk/drivers/net/wireless/ti/wl12xx/conf.h b/trunk/drivers/net/wireless/ti/wl12xx/conf.h new file mode 100644 index 000000000000..cb618b9e1bb8 --- /dev/null +++ b/trunk/drivers/net/wireless/ti/wl12xx/conf.h @@ -0,0 +1,49 @@ +/* + * This file is part of wl12xx + * + * Copyright (C) 2011 Texas Instruments Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef __WL12XX_CONF_H__ +#define __WL12XX_CONF_H__ + +/* these are number of channels on the band divided by two, rounded up */ +#define CONF_TX_PWR_COMPENSATION_LEN_2 7 +#define CONF_TX_PWR_COMPENSATION_LEN_5 18 + +struct wl12xx_conf_rf { + /* + * Per channel power compensation for 2.4GHz + * + * Range: s8 + */ + u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2]; + + /* + * Per channel power compensation for 5GHz + * + * Range: s8 + */ + u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5]; +}; + +struct wl12xx_priv_conf { + struct wl12xx_conf_rf rf; +}; + +#endif /* __WL12XX_CONF_H__ */ diff --git a/trunk/drivers/net/wireless/ti/wl12xx/main.c b/trunk/drivers/net/wireless/ti/wl12xx/main.c index 242bb5f4e0fc..d9057f86c57f 100644 --- a/trunk/drivers/net/wireless/ti/wl12xx/main.c +++ b/trunk/drivers/net/wireless/ti/wl12xx/main.c @@ -35,6 +35,7 @@ #include "../wlcore/io.h" #include "../wlcore/boot.h" +#include "wl12xx.h" #include "reg.h" #include "cmd.h" #include "acx.h" @@ -278,16 +279,6 @@ static struct wlcore_conf wl12xx_conf = { .rssi_threshold = -90, .snr_threshold = 0, }, - .rf = { - .tx_per_channel_power_compensation_2 = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }, - .tx_per_channel_power_compensation_5 = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }, - }, .ht = { .rx_ba_win_size = 8, .tx_ba_win_size = 64, @@ -1266,9 +1257,6 @@ static struct wlcore_ops wl12xx_ops = { .get_mac = wl12xx_get_mac, }; -struct wl12xx_priv { -}; - static int __devinit wl12xx_probe(struct platform_device *pdev) { struct wl1271 *wl; diff --git a/trunk/drivers/net/wireless/ti/wl12xx/wl12xx.h b/trunk/drivers/net/wireless/ti/wl12xx/wl12xx.h new file mode 100644 index 000000000000..74cd332e23ef --- /dev/null +++ b/trunk/drivers/net/wireless/ti/wl12xx/wl12xx.h @@ -0,0 +1,31 @@ +/* + * This file is part of wl12xx + * + * Copyright (C) 2011 Texas Instruments Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef __WL12XX_PRIV_H__ +#define __WL12XX_PRIV_H__ + +#include "conf.h" + +struct wl12xx_priv { + struct wl12xx_priv_conf conf; +}; + +#endif /* __WL12XX_PRIV_H__ */ diff --git a/trunk/drivers/net/wireless/ti/wlcore/conf.h b/trunk/drivers/net/wireless/ti/wlcore/conf.h index 4e04e863ac02..aa2da451b988 100644 --- a/trunk/drivers/net/wireless/ti/wlcore/conf.h +++ b/trunk/drivers/net/wireless/ti/wlcore/conf.h @@ -1104,26 +1104,6 @@ struct conf_sched_scan_settings { s8 snr_threshold; }; -/* these are number of channels on the band divided by two, rounded up */ -#define CONF_TX_PWR_COMPENSATION_LEN_2 7 -#define CONF_TX_PWR_COMPENSATION_LEN_5 18 - -struct conf_rf_settings { - /* - * Per channel power compensation for 2.4GHz - * - * Range: s8 - */ - u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2]; - - /* - * Per channel power compensation for 5GHz - * - * Range: s8 - */ - u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5]; -}; - struct conf_ht_setting { u8 rx_ba_win_size; u8 tx_ba_win_size; @@ -1282,7 +1262,6 @@ struct wlcore_conf { struct conf_roam_trigger_settings roam_trigger; struct conf_scan_settings scan; struct conf_sched_scan_settings sched_scan; - struct conf_rf_settings rf; struct conf_ht_setting ht; struct conf_memory_settings mem_wl127x; struct conf_memory_settings mem_wl128x;