Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 166b2136 authored by Luciano Coelho's avatar Luciano Coelho
Browse files

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: default avatarLuciano Coelho <coelho@ti.com>
parent e87288f0
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -23,12 +23,14 @@
#include "../wlcore/cmd.h"
#include "../wlcore/cmd.h"
#include "../wlcore/debug.h"
#include "../wlcore/debug.h"


#include "wl12xx.h"
#include "cmd.h"
#include "cmd.h"


int wl1271_cmd_ext_radio_parms(struct wl1271 *wl)
int wl1271_cmd_ext_radio_parms(struct wl1271 *wl)
{
{
	struct wl1271_ext_radio_parms_cmd *ext_radio_parms;
	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;
	int ret;


	if (!wl->nvs)
	if (!wl->nvs)
+2 −0
Original line number Original line Diff line number Diff line
@@ -23,6 +23,8 @@
#ifndef __WL12XX_CMD_H__
#ifndef __WL12XX_CMD_H__
#define __WL12XX_CMD_H__
#define __WL12XX_CMD_H__


#include "conf.h"

#define TEST_CMD_INI_FILE_RADIO_PARAM       0x19
#define TEST_CMD_INI_FILE_RADIO_PARAM       0x19
#define TEST_CMD_INI_FILE_GENERAL_PARAM     0x1E
#define TEST_CMD_INI_FILE_GENERAL_PARAM     0x1E


+49 −0
Original line number Original line Diff line number Diff line
/*
 * 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__ */
+1 −13
Original line number Original line Diff line number Diff line
@@ -35,6 +35,7 @@
#include "../wlcore/io.h"
#include "../wlcore/io.h"
#include "../wlcore/boot.h"
#include "../wlcore/boot.h"


#include "wl12xx.h"
#include "reg.h"
#include "reg.h"
#include "cmd.h"
#include "cmd.h"
#include "acx.h"
#include "acx.h"
@@ -278,16 +279,6 @@ static struct wlcore_conf wl12xx_conf = {
		.rssi_threshold			= -90,
		.rssi_threshold			= -90,
		.snr_threshold			= 0,
		.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 = {
	.ht = {
		.rx_ba_win_size = 8,
		.rx_ba_win_size = 8,
		.tx_ba_win_size = 64,
		.tx_ba_win_size = 64,
@@ -1266,9 +1257,6 @@ static struct wlcore_ops wl12xx_ops = {
	.get_mac		= wl12xx_get_mac,
	.get_mac		= wl12xx_get_mac,
};
};


struct wl12xx_priv {
};

static int __devinit wl12xx_probe(struct platform_device *pdev)
static int __devinit wl12xx_probe(struct platform_device *pdev)
{
{
	struct wl1271 *wl;
	struct wl1271 *wl;
+31 −0
Original line number Original line Diff line number Diff line
/*
 * 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__ */
Loading