Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] wl12xx: call extended radio parameters for wl127x AP mode
@ 2011-12-13  9:39 Luciano Coelho
  2011-12-15  8:53 ` Luciano Coelho
  0 siblings, 1 reply; 2+ messages in thread
From: Luciano Coelho @ 2011-12-13  9:39 UTC (permalink / raw)
  To: linux-wireless; +Cc: coelho

We need to set the extended radio parameters for wl127x only.
Currently, we were only calling this command with wl127x STA mode, but
we should also do it for AP mode.

Move the call to the extended radio paramaters to the common hw_init
and use a single if for the chip type to do everything at once.

Signed-off-by: Luciano Coelho <coelho@ti.com>
---
 drivers/net/wireless/wl12xx/init.c |   31 +++++++++++++++----------------
 1 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c
index 88891cd..7662514 100644
--- a/drivers/net/wireless/wl12xx/init.c
+++ b/drivers/net/wireless/wl12xx/init.c
@@ -328,12 +328,6 @@ static int wl1271_sta_hw_init(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 {
 	int ret;
 
-	if (wl->chip.id != CHIP_ID_1283_PG20) {
-		ret = wl1271_cmd_ext_radio_parms(wl);
-		if (ret < 0)
-			return ret;
-	}
-
 	/* PS config */
 	ret = wl12xx_acx_config_ps(wl, wlvif);
 	if (ret < 0)
@@ -659,19 +653,24 @@ int wl1271_hw_init(struct wl1271 *wl)
 {
 	int ret;
 
-	if (wl->chip.id == CHIP_ID_1283_PG20)
+	if (wl->chip.id == CHIP_ID_1283_PG20) {
 		ret = wl128x_cmd_general_parms(wl);
-	else
-		ret = wl1271_cmd_general_parms(wl);
-	if (ret < 0)
-		return ret;
-
-	if (wl->chip.id == CHIP_ID_1283_PG20)
+		if (ret < 0)
+			return ret;
 		ret = wl128x_cmd_radio_parms(wl);
-	else
+		if (ret < 0)
+			return ret;
+	} else {
+		ret = wl1271_cmd_general_parms(wl);
+		if (ret < 0)
+			return ret;
 		ret = wl1271_cmd_radio_parms(wl);
-	if (ret < 0)
-		return ret;
+		if (ret < 0)
+			return ret;
+		ret = wl1271_cmd_ext_radio_parms(wl);
+		if (ret < 0)
+			return ret;
+	}
 
 	/* Chip-specific init */
 	ret = wl1271_chip_specific_init(wl);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] wl12xx: call extended radio parameters for wl127x AP mode
  2011-12-13  9:39 [PATCH] wl12xx: call extended radio parameters for wl127x AP mode Luciano Coelho
@ 2011-12-15  8:53 ` Luciano Coelho
  0 siblings, 0 replies; 2+ messages in thread
From: Luciano Coelho @ 2011-12-15  8:53 UTC (permalink / raw)
  To: linux-wireless

On Tue, 2011-12-13 at 11:39 +0200, Luciano Coelho wrote: 
> We need to set the extended radio parameters for wl127x only.
> Currently, we were only calling this command with wl127x STA mode, but
> we should also do it for AP mode.
> 
> Move the call to the extended radio paramaters to the common hw_init
> and use a single if for the chip type to do everything at once.
> 
> Signed-off-by: Luciano Coelho <coelho@ti.com>
> ---

Applied.

-- 
Cheers,
Luca.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-15  8:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-13  9:39 [PATCH] wl12xx: call extended radio parameters for wl127x AP mode Luciano Coelho
2011-12-15  8:53 ` Luciano Coelho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox