aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2011-12-05 09:51:10 -0500
committerLuciano Coelho <coelho@ti.com>2012-04-12 01:44:01 -0400
commit166b213626067c3128e196a558a0cb318344b411 (patch)
tree75fc92db47a42c5a7eff43fdad94f6b2dfde2178 /drivers/net
parente87288f089d3ba1c10d2323c286f8145450fd250 (diff)
wlcore/wl12xx: move extended radio configuration parameters to wl12xx
The extended radio configuration parameters are only used by the wl127x chipsets, which are handled by the wl12xx driver. Move the rf configuration settings from wlcore to wl12xx. Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ti/wl12xx/cmd.c4
-rw-r--r--drivers/net/wireless/ti/wl12xx/cmd.h2
-rw-r--r--drivers/net/wireless/ti/wl12xx/conf.h49
-rw-r--r--drivers/net/wireless/ti/wl12xx/main.c14
-rw-r--r--drivers/net/wireless/ti/wl12xx/wl12xx.h31
-rw-r--r--drivers/net/wireless/ti/wlcore/conf.h21
6 files changed, 86 insertions, 35 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/cmd.c b/drivers/net/wireless/ti/wl12xx/cmd.c
index e46512d185a6..8ffaeb5f2147 100644
--- a/drivers/net/wireless/ti/wl12xx/cmd.c
+++ b/drivers/net/wireless/ti/wl12xx/cmd.c
@@ -23,12 +23,14 @@
23#include "../wlcore/cmd.h" 23#include "../wlcore/cmd.h"
24#include "../wlcore/debug.h" 24#include "../wlcore/debug.h"
25 25
26#include "wl12xx.h"
26#include "cmd.h" 27#include "cmd.h"
27 28
28int wl1271_cmd_ext_radio_parms(struct wl1271 *wl) 29int wl1271_cmd_ext_radio_parms(struct wl1271 *wl)
29{ 30{
30 struct wl1271_ext_radio_parms_cmd *ext_radio_parms; 31 struct wl1271_ext_radio_parms_cmd *ext_radio_parms;
31 struct conf_rf_settings *rf = &wl->conf.rf; 32 struct wl12xx_priv *priv = wl->priv;
33 struct wl12xx_conf_rf *rf = &priv->conf.rf;
32 int ret; 34 int ret;
33 35
34 if (!wl->nvs) 36 if (!wl->nvs)
diff --git a/drivers/net/wireless/ti/wl12xx/cmd.h b/drivers/net/wireless/ti/wl12xx/cmd.h
index ff458302ab04..140a0e8829d5 100644
--- a/drivers/net/wireless/ti/wl12xx/cmd.h
+++ b/drivers/net/wireless/ti/wl12xx/cmd.h
@@ -23,6 +23,8 @@
23#ifndef __WL12XX_CMD_H__ 23#ifndef __WL12XX_CMD_H__
24#define __WL12XX_CMD_H__ 24#define __WL12XX_CMD_H__
25 25
26#include "conf.h"
27
26#define TEST_CMD_INI_FILE_RADIO_PARAM 0x19 28#define TEST_CMD_INI_FILE_RADIO_PARAM 0x19
27#define TEST_CMD_INI_FILE_GENERAL_PARAM 0x1E 29#define TEST_CMD_INI_FILE_GENERAL_PARAM 0x1E
28 30
diff --git a/drivers/net/wireless/ti/wl12xx/conf.h b/drivers/net/wireless/ti/wl12xx/conf.h
new file mode 100644
index 000000000000..cb618b9e1bb8
--- /dev/null
+++ b/drivers/net/wireless/ti/wl12xx/conf.h
@@ -0,0 +1,49 @@
1/*
2 * This file is part of wl12xx
3 *
4 * Copyright (C) 2011 Texas Instruments Inc.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18 * 02110-1301 USA
19 *
20 */
21
22#ifndef __WL12XX_CONF_H__
23#define __WL12XX_CONF_H__
24
25/* these are number of channels on the band divided by two, rounded up */
26#define CONF_TX_PWR_COMPENSATION_LEN_2 7
27#define CONF_TX_PWR_COMPENSATION_LEN_5 18
28
29struct wl12xx_conf_rf {
30 /*
31 * Per channel power compensation for 2.4GHz
32 *
33 * Range: s8
34 */
35 u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2];
36
37 /*
38 * Per channel power compensation for 5GHz
39 *
40 * Range: s8
41 */
42 u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5];
43};
44
45struct wl12xx_priv_conf {
46 struct wl12xx_conf_rf rf;
47};
48
49#endif /* __WL12XX_CONF_H__ */
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index 242bb5f4e0fc..d9057f86c57f 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -35,6 +35,7 @@
35#include "../wlcore/io.h" 35#include "../wlcore/io.h"
36#include "../wlcore/boot.h" 36#include "../wlcore/boot.h"
37 37
38#include "wl12xx.h"
38#include "reg.h" 39#include "reg.h"
39#include "cmd.h" 40#include "cmd.h"
40#include "acx.h" 41#include "acx.h"
@@ -278,16 +279,6 @@ static struct wlcore_conf wl12xx_conf = {
278 .rssi_threshold = -90, 279 .rssi_threshold = -90,
279 .snr_threshold = 0, 280 .snr_threshold = 0,
280 }, 281 },
281 .rf = {
282 .tx_per_channel_power_compensation_2 = {
283 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
284 },
285 .tx_per_channel_power_compensation_5 = {
286 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
287 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
288 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
289 },
290 },
291 .ht = { 282 .ht = {
292 .rx_ba_win_size = 8, 283 .rx_ba_win_size = 8,
293 .tx_ba_win_size = 64, 284 .tx_ba_win_size = 64,
@@ -1266,9 +1257,6 @@ static struct wlcore_ops wl12xx_ops = {
1266 .get_mac = wl12xx_get_mac, 1257 .get_mac = wl12xx_get_mac,
1267}; 1258};
1268 1259
1269struct wl12xx_priv {
1270};
1271
1272static int __devinit wl12xx_probe(struct platform_device *pdev) 1260static int __devinit wl12xx_probe(struct platform_device *pdev)
1273{ 1261{
1274 struct wl1271 *wl; 1262 struct wl1271 *wl;
diff --git a/drivers/net/wireless/ti/wl12xx/wl12xx.h b/drivers/net/wireless/ti/wl12xx/wl12xx.h
new file mode 100644
index 000000000000..74cd332e23ef
--- /dev/null
+++ b/drivers/net/wireless/ti/wl12xx/wl12xx.h
@@ -0,0 +1,31 @@
1/*
2 * This file is part of wl12xx
3 *
4 * Copyright (C) 2011 Texas Instruments Inc.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18 * 02110-1301 USA
19 *
20 */
21
22#ifndef __WL12XX_PRIV_H__
23#define __WL12XX_PRIV_H__
24
25#include "conf.h"
26
27struct wl12xx_priv {
28 struct wl12xx_priv_conf conf;
29};
30
31#endif /* __WL12XX_PRIV_H__ */
diff --git a/drivers/net/wireless/ti/wlcore/conf.h b/drivers/net/wireless/ti/wlcore/conf.h
index 4e04e863ac02..aa2da451b988 100644
--- a/drivers/net/wireless/ti/wlcore/conf.h
+++ b/drivers/net/wireless/ti/wlcore/conf.h
@@ -1104,26 +1104,6 @@ struct conf_sched_scan_settings {
1104 s8 snr_threshold; 1104 s8 snr_threshold;
1105}; 1105};
1106 1106
1107/* these are number of channels on the band divided by two, rounded up */
1108#define CONF_TX_PWR_COMPENSATION_LEN_2 7
1109#define CONF_TX_PWR_COMPENSATION_LEN_5 18
1110
1111struct conf_rf_settings {
1112 /*
1113 * Per channel power compensation for 2.4GHz
1114 *
1115 * Range: s8
1116 */
1117 u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2];
1118
1119 /*
1120 * Per channel power compensation for 5GHz
1121 *
1122 * Range: s8
1123 */
1124 u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5];
1125};
1126
1127struct conf_ht_setting { 1107struct conf_ht_setting {
1128 u8 rx_ba_win_size; 1108 u8 rx_ba_win_size;
1129 u8 tx_ba_win_size; 1109 u8 tx_ba_win_size;
@@ -1282,7 +1262,6 @@ struct wlcore_conf {
1282 struct conf_roam_trigger_settings roam_trigger; 1262 struct conf_roam_trigger_settings roam_trigger;
1283 struct conf_scan_settings scan; 1263 struct conf_scan_settings scan;
1284 struct conf_sched_scan_settings sched_scan; 1264 struct conf_sched_scan_settings sched_scan;
1285 struct conf_rf_settings rf;
1286 struct conf_ht_setting ht; 1265 struct conf_ht_setting ht;
1287 struct conf_memory_settings mem_wl127x; 1266 struct conf_memory_settings mem_wl127x;
1288 struct conf_memory_settings mem_wl128x; 1267 struct conf_memory_settings mem_wl128x;