linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: wilc1000: Fix bssid buffer offset in Txq
@ 2017-11-03  8:56 Aditya Shankar
  2017-11-04  6:20 ` Dan Carpenter
  2017-11-16 10:52 ` Claudiu Beznea
  0 siblings, 2 replies; 3+ messages in thread
From: Aditya Shankar @ 2017-11-03  8:56 UTC (permalink / raw)
  To: linux-wireless
  Cc: ganesh.krishna, gregkh, devel, Aditya Shankar, stable, Aditya Shankar

Commit 46949b48568b ("staging: wilc1000: New cfg packet
format in handle_set_wfi_drv_handler") updated the frame
format sent from host to the firmware. The code to update
the bssid offset in the new frame was part of a second
patch in the series which did not make it in and thus
causes connection problems after associating to an AP.

This fix adds the proper offset of the bssid value in the
Tx queue buffer to fix the connection issues.

Fixes: Commit 46949b48568b ("staging: wilc1000: New cfg packet format in handle_set_wfi_drv_handler")
Cc: stable@vger.kernel.org
Signed-off-by: Aditya Shankar <Aditya.Shankar@microchip.com>
---
 drivers/staging/wilc1000/wilc_wlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 9addef1..f49dfa8 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -714,7 +714,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
 					char *bssid = ((struct tx_complete_data *)(tqe->priv))->bssid;
 
 					buffer_offset = ETH_ETHERNET_HDR_OFFSET;
-					memcpy(&txb[offset + 4], bssid, 6);
+					memcpy(&txb[offset + 8], bssid, 6);
 				} else {
 					buffer_offset = HOST_HDR_OFFSET;
 				}
-- 
2.7.4

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

* Re: [PATCH] staging: wilc1000: Fix bssid buffer offset in Txq
  2017-11-03  8:56 [PATCH] staging: wilc1000: Fix bssid buffer offset in Txq Aditya Shankar
@ 2017-11-04  6:20 ` Dan Carpenter
  2017-11-16 10:52 ` Claudiu Beznea
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2017-11-04  6:20 UTC (permalink / raw)
  To: Aditya Shankar; +Cc: linux-wireless, devel, ganesh.krishna, stable, gregkh

This driver really needs proper structs and datatypes so this doesn't
happen again and so that you and Colin stop reverting each other's

	*pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 8) & 0xFF);

assignments:

regards,
dan carpenter

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

* Re: [PATCH] staging: wilc1000: Fix bssid buffer offset in Txq
  2017-11-03  8:56 [PATCH] staging: wilc1000: Fix bssid buffer offset in Txq Aditya Shankar
  2017-11-04  6:20 ` Dan Carpenter
@ 2017-11-16 10:52 ` Claudiu Beznea
  1 sibling, 0 replies; 3+ messages in thread
From: Claudiu Beznea @ 2017-11-16 10:52 UTC (permalink / raw)
  To: Aditya Shankar, linux-wireless; +Cc: devel, ganesh.krishna, stable, gregkh

Hi Aditya,

My problem is fixed with this patch. WILC1000 connects to AP,
IP is retrieved from DHCP server and ping works. You can add my

Tested-by: Claudiu Beznea <claudiu.beznea@microchip.com>

Thanks,
Claudiu

On 03.11.2017 10:56, Aditya Shankar wrote:
> Commit 46949b48568b ("staging: wilc1000: New cfg packet
> format in handle_set_wfi_drv_handler") updated the frame
> format sent from host to the firmware. The code to update
> the bssid offset in the new frame was part of a second
> patch in the series which did not make it in and thus
> causes connection problems after associating to an AP.
> 
> This fix adds the proper offset of the bssid value in the
> Tx queue buffer to fix the connection issues.
> 
> Fixes: Commit 46949b48568b ("staging: wilc1000: New cfg packet format in handle_set_wfi_drv_handler")
> Cc: stable@vger.kernel.org
> Signed-off-by: Aditya Shankar <Aditya.Shankar@microchip.com>
> ---
>  drivers/staging/wilc1000/wilc_wlan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
> index 9addef1..f49dfa8 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.c
> +++ b/drivers/staging/wilc1000/wilc_wlan.c
> @@ -714,7 +714,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
>  					char *bssid = ((struct tx_complete_data *)(tqe->priv))->bssid;
>  
>  					buffer_offset = ETH_ETHERNET_HDR_OFFSET;
> -					memcpy(&txb[offset + 4], bssid, 6);
> +					memcpy(&txb[offset + 8], bssid, 6);
>  				} else {
>  					buffer_offset = HOST_HDR_OFFSET;
>  				}
> 

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

end of thread, other threads:[~2017-11-16 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03  8:56 [PATCH] staging: wilc1000: Fix bssid buffer offset in Txq Aditya Shankar
2017-11-04  6:20 ` Dan Carpenter
2017-11-16 10:52 ` Claudiu Beznea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).