[PATCH 13/43] staging: rtl8723au: rtw_generate_ie23a(): update network info as well as IE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>

We need to make sure to update the network info as well as the IE
array.

Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
---
 drivers/staging/rtl8723au/core/rtw_ieee80211.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_ieee80211.c b/drivers/staging/rtl8723au/core/rtw_ieee80211.c
index efad6f8..f235ae0 100644
--- a/drivers/staging/rtl8723au/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723au/core/rtw_ieee80211.c
@@ -351,8 +351,9 @@ int rtw_generate_ie23a(struct registry_priv *pregistrypriv)
 	int	sz = 0, rateLen;
 	struct wlan_bssid_ex*	pdev_network = &pregistrypriv->dev_network;
 	u8*	ie = pdev_network->IEs;
+	u16 cap;
 
-
+	pdev_network->tsf = 0;
 
 	/* timestamp will be inserted by hardware */
 	sz += 8;
@@ -368,13 +369,20 @@ int rtw_generate_ie23a(struct registry_priv *pregistrypriv)
 	*(u16*)ie = 0;
 
 	*(u16*)ie |= cpu_to_le16(WLAN_CAPABILITY_IBSS);
+	cap = WLAN_CAPABILITY_IBSS;
 
-	if (pregistrypriv->preamble == PREAMBLE_SHORT)
+	if (pregistrypriv->preamble == PREAMBLE_SHORT) {
 		*(u16*)ie |= cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE);
+		cap |= WLAN_CAPABILITY_SHORT_PREAMBLE;
+	}
 
-	if (pdev_network->Privacy)
+	if (pdev_network->Privacy) {
 		*(u16*)ie |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY);
+		cap |= WLAN_CAPABILITY_PRIVACY;
+
+	}
 
+	pdev_network->capability = cap;
 	sz += 2;
 	ie += 2;
 
-- 
1.9.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux