Re: [PATCH] ath10k: Enable Factory Test Mode for WCN3990

2019-02-11 Thread Kalle Valo
Rakesh Pillai  wrote:

> The support to put WCN3990 firmware into Factory
> test mode is not present currently. The WCN3990
> firmware can operate in Factory test mode based
> on the mode it receives in the wlan enable message
> from the host driver.
> 
> When the host driver is started in testmode send
> the operating mode as UTF mode, to the WCN3990
> firmware, in the wlan enable message to start the
> firmware in Factory test mode.
> 
> Tested on: WCN3990
> Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1.
> 
> Signed-off-by: Rakesh Pillai 
> Reviewed-by: Brian Norris 
> Signed-off-by: Kalle Valo 

Patch applied to ath-next branch of ath.git, thanks.

3c545a25939c ath10k: enable Factory Test Mode for WCN3990

-- 
https://patchwork.kernel.org/patch/10579559/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH] ath10k: Enable Factory Test Mode for WCN3990

2019-02-08 Thread Rakesh Pillai

Hi Kalle,
I have checked the patch, and it is fine.

Thanks,
Rakesh Pillai.


On 2019-02-08 19:46, Kalle Valo wrote:

Rakesh Pillai  wrote:


The support to put WCN3990 firmware into Factory
test mode is not present currently. The WCN3990
firmware can operate in Factory test mode based
on the mode it receives in the wlan enable message
from the host driver.

When the host driver is started in testmode send
the operating mode as UTF mode, to the WCN3990
firmware, in the wlan enable message to start the
firmware in Factory test mode.

Tested on: WCN3990
Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1.

Signed-off-by: Rakesh Pillai 
Reviewed-by: Brian Norris 
Signed-off-by: Kalle Valo 


I was able to apply with 3-way merge but please double check the 
results:


https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending=ef562f95826f412c14f59ca916ff55931bed0813

Applying: ath10k: Enable Factory Test Mode for WCN3990
Using index info to reconstruct a base tree...
M   drivers/net/wireless/ath/ath10k/ahb.c
M   drivers/net/wireless/ath/ath10k/core.c
M   drivers/net/wireless/ath/ath10k/hif.h
M   drivers/net/wireless/ath/ath10k/mac.c
M   drivers/net/wireless/ath/ath10k/pci.c
M   drivers/net/wireless/ath/ath10k/sdio.c
M   drivers/net/wireless/ath/ath10k/snoc.c
M   drivers/net/wireless/ath/ath10k/usb.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/net/wireless/ath/ath10k/usb.c
Auto-merging drivers/net/wireless/ath/ath10k/snoc.c
Auto-merging drivers/net/wireless/ath/ath10k/sdio.c
Auto-merging drivers/net/wireless/ath/ath10k/pci.c
Auto-merging drivers/net/wireless/ath/ath10k/mac.c
Auto-merging drivers/net/wireless/ath/ath10k/hif.h
Auto-merging drivers/net/wireless/ath/ath10k/core.c
Auto-merging drivers/net/wireless/ath/ath10k/ahb.c


___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH] ath10k: Enable Factory Test Mode for WCN3990

2019-02-08 Thread Kalle Valo
Rakesh Pillai  wrote:

> The support to put WCN3990 firmware into Factory
> test mode is not present currently. The WCN3990
> firmware can operate in Factory test mode based
> on the mode it receives in the wlan enable message
> from the host driver.
> 
> When the host driver is started in testmode send
> the operating mode as UTF mode, to the WCN3990
> firmware, in the wlan enable message to start the
> firmware in Factory test mode.
> 
> Tested on: WCN3990
> Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1.
> 
> Signed-off-by: Rakesh Pillai 
> Reviewed-by: Brian Norris 
> Signed-off-by: Kalle Valo 

I was able to apply with 3-way merge but please double check the results:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending=ef562f95826f412c14f59ca916ff55931bed0813

Applying: ath10k: Enable Factory Test Mode for WCN3990
Using index info to reconstruct a base tree...
M   drivers/net/wireless/ath/ath10k/ahb.c
M   drivers/net/wireless/ath/ath10k/core.c
M   drivers/net/wireless/ath/ath10k/hif.h
M   drivers/net/wireless/ath/ath10k/mac.c
M   drivers/net/wireless/ath/ath10k/pci.c
M   drivers/net/wireless/ath/ath10k/sdio.c
M   drivers/net/wireless/ath/ath10k/snoc.c
M   drivers/net/wireless/ath/ath10k/usb.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/net/wireless/ath/ath10k/usb.c
Auto-merging drivers/net/wireless/ath/ath10k/snoc.c
Auto-merging drivers/net/wireless/ath/ath10k/sdio.c
Auto-merging drivers/net/wireless/ath/ath10k/pci.c
Auto-merging drivers/net/wireless/ath/ath10k/mac.c
Auto-merging drivers/net/wireless/ath/ath10k/hif.h
Auto-merging drivers/net/wireless/ath/ath10k/core.c
Auto-merging drivers/net/wireless/ath/ath10k/ahb.c

-- 
https://patchwork.kernel.org/patch/10579559/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH] ath10k: Enable Factory Test Mode for WCN3990

2019-02-07 Thread Kalle Valo
Brian Norris  writes:

> On Wed, Aug 29, 2018 at 12:30:38PM +0530, Rakesh Pillai wrote:
>> The support to put WCN3990 firmware into Factory
>> test mode is not present currently. The WCN3990
>> firmware can operate in Factory test mode based
>> on the mode it receives in the wlan enable message
>> from the host driver.
>> 
>> When the host driver is started in testmode send
>> the operating mode as UTF mode, to the WCN3990
>> firmware, in the wlan enable message to start the
>> firmware in Factory test mode.
>> 
>> Tested on: WCN3990
>> Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1.
>> 
>> Signed-off-by: Rakesh Pillai 
>> ---
>>  drivers/net/wireless/ath/ath10k/ahb.c  |  3 ++-
>>  drivers/net/wireless/ath/ath10k/core.c |  2 +-
>>  drivers/net/wireless/ath/ath10k/hif.h  |  7 ---
>>  drivers/net/wireless/ath/ath10k/mac.c  |  2 +-
>>  drivers/net/wireless/ath/ath10k/pci.c  |  3 ++-
>>  drivers/net/wireless/ath/ath10k/sdio.c |  3 ++-
>>  drivers/net/wireless/ath/ath10k/snoc.c | 20 
>>  drivers/net/wireless/ath/ath10k/testmode.c |  2 +-
>>  drivers/net/wireless/ath/ath10k/usb.c  |  3 ++-
>>  9 files changed, 31 insertions(+), 14 deletions(-)
>
> What ever happened here? I'm told this is useful, but I see no comments
> and it's marked Deferred in patchwork:
>
> https://patchwork.kernel.org/patch/10579559/

Not sure, I guess it just got accidentally hidden with other patches.
It's in new state now.

> FWIW, it looks OK to me:
>
> Reviewed-by: Brian Norris 

Thanks!

-- 
Kalle Valo

___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH] ath10k: Enable Factory Test Mode for WCN3990

2019-02-04 Thread Brian Norris
On Wed, Aug 29, 2018 at 12:30:38PM +0530, Rakesh Pillai wrote:
> The support to put WCN3990 firmware into Factory
> test mode is not present currently. The WCN3990
> firmware can operate in Factory test mode based
> on the mode it receives in the wlan enable message
> from the host driver.
> 
> When the host driver is started in testmode send
> the operating mode as UTF mode, to the WCN3990
> firmware, in the wlan enable message to start the
> firmware in Factory test mode.
> 
> Tested on: WCN3990
> Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1.
> 
> Signed-off-by: Rakesh Pillai 
> ---
>  drivers/net/wireless/ath/ath10k/ahb.c  |  3 ++-
>  drivers/net/wireless/ath/ath10k/core.c |  2 +-
>  drivers/net/wireless/ath/ath10k/hif.h  |  7 ---
>  drivers/net/wireless/ath/ath10k/mac.c  |  2 +-
>  drivers/net/wireless/ath/ath10k/pci.c  |  3 ++-
>  drivers/net/wireless/ath/ath10k/sdio.c |  3 ++-
>  drivers/net/wireless/ath/ath10k/snoc.c | 20 
>  drivers/net/wireless/ath/ath10k/testmode.c |  2 +-
>  drivers/net/wireless/ath/ath10k/usb.c  |  3 ++-
>  9 files changed, 31 insertions(+), 14 deletions(-)

What ever happened here? I'm told this is useful, but I see no comments
and it's marked Deferred in patchwork:

https://patchwork.kernel.org/patch/10579559/

FWIW, it looks OK to me:

Reviewed-by: Brian Norris 

___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


[PATCH] ath10k: Enable Factory Test Mode for WCN3990

2018-08-29 Thread Rakesh Pillai
The support to put WCN3990 firmware into Factory
test mode is not present currently. The WCN3990
firmware can operate in Factory test mode based
on the mode it receives in the wlan enable message
from the host driver.

When the host driver is started in testmode send
the operating mode as UTF mode, to the WCN3990
firmware, in the wlan enable message to start the
firmware in Factory test mode.

Tested on: WCN3990
Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1.

Signed-off-by: Rakesh Pillai 
---
 drivers/net/wireless/ath/ath10k/ahb.c  |  3 ++-
 drivers/net/wireless/ath/ath10k/core.c |  2 +-
 drivers/net/wireless/ath/ath10k/hif.h  |  7 ---
 drivers/net/wireless/ath/ath10k/mac.c  |  2 +-
 drivers/net/wireless/ath/ath10k/pci.c  |  3 ++-
 drivers/net/wireless/ath/ath10k/sdio.c |  3 ++-
 drivers/net/wireless/ath/ath10k/snoc.c | 20 
 drivers/net/wireless/ath/ath10k/testmode.c |  2 +-
 drivers/net/wireless/ath/ath10k/usb.c  |  3 ++-
 9 files changed, 31 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/ahb.c 
b/drivers/net/wireless/ath/ath10k/ahb.c
index c9bd0e2..8c0e605 100644
--- a/drivers/net/wireless/ath/ath10k/ahb.c
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
@@ -661,7 +661,8 @@ static void ath10k_ahb_hif_stop(struct ath10k *ar)
napi_disable(>napi);
 }
 
-static int ath10k_ahb_hif_power_up(struct ath10k *ar)
+static int ath10k_ahb_hif_power_up(struct ath10k *ar,
+  enum ath10k_firmware_mode fw_mode)
 {
int ret;
 
diff --git a/drivers/net/wireless/ath/ath10k/core.c 
b/drivers/net/wireless/ath/ath10k/core.c
index 7ff70a6..fe6169d 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -2515,7 +2515,7 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
struct bmi_target_info target_info;
int ret = 0;
 
-   ret = ath10k_hif_power_up(ar);
+   ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL);
if (ret) {
ath10k_err(ar, "could not power on hif bus (%d)\n", ret);
return ret;
diff --git a/drivers/net/wireless/ath/ath10k/hif.h 
b/drivers/net/wireless/ath/ath10k/hif.h
index 1a59ea0..171fdd0 100644
--- a/drivers/net/wireless/ath/ath10k/hif.h
+++ b/drivers/net/wireless/ath/ath10k/hif.h
@@ -81,7 +81,7 @@ struct ath10k_hif_ops {
void (*write32)(struct ath10k *ar, u32 address, u32 value);
 
/* Power up the device and enter BMI transfer mode for FW download */
-   int (*power_up)(struct ath10k *ar);
+   int (*power_up)(struct ath10k *ar, enum ath10k_firmware_mode fw_mode);
 
/* Power down the device and free up resources. stop() must be called
 * before this if start() was called earlier
@@ -165,9 +165,10 @@ static inline u16 ath10k_hif_get_free_queue_number(struct 
ath10k *ar,
return ar->hif.ops->get_free_queue_number(ar, pipe_id);
 }
 
-static inline int ath10k_hif_power_up(struct ath10k *ar)
+static inline int ath10k_hif_power_up(struct ath10k *ar,
+ enum ath10k_firmware_mode fw_mode)
 {
-   return ar->hif.ops->power_up(ar);
+   return ar->hif.ops->power_up(ar, fw_mode);
 }
 
 static inline void ath10k_hif_power_down(struct ath10k *ar)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c 
b/drivers/net/wireless/ath/ath10k/mac.c
index 90f9372..155b720 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4654,7 +4654,7 @@ static int ath10k_start(struct ieee80211_hw *hw)
goto err;
}
 
-   ret = ath10k_hif_power_up(ar);
+   ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL);
if (ret) {
ath10k_err(ar, "Could not init hif: %d\n", ret);
goto err_off;
diff --git a/drivers/net/wireless/ath/ath10k/pci.c 
b/drivers/net/wireless/ath/ath10k/pci.c
index af2cf55..b867171 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2789,7 +2789,8 @@ static int ath10k_pci_chip_reset(struct ath10k *ar)
return ar_pci->pci_hard_reset(ar);
 }
 
-static int ath10k_pci_hif_power_up(struct ath10k *ar)
+static int ath10k_pci_hif_power_up(struct ath10k *ar,
+  enum ath10k_firmware_mode fw_mode)
 {
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
int ret;
diff --git a/drivers/net/wireless/ath/ath10k/sdio.c 
b/drivers/net/wireless/ath/ath10k/sdio.c
index 7f61591..90abfc6 100644
--- a/drivers/net/wireless/ath/ath10k/sdio.c
+++ b/drivers/net/wireless/ath/ath10k/sdio.c
@@ -1381,7 +1381,8 @@ static int ath10k_sdio_hif_disable_intrs(struct ath10k 
*ar)
return ret;
 }
 
-static int ath10k_sdio_hif_power_up(struct ath10k *ar)
+static int ath10k_sdio_hif_power_up(struct ath10k *ar,
+   enum ath10k_firmware_mode fw_mode)
 {
struct ath10k_sdio *ar_sdio =