[OPW,kernel,v2,1/2] Staging: rtl8192e: Revert one previous commit
diff mbox

Message ID 27545ed1e8dbf87374d7354012bbf9a67abb41ea.1414590539.git.vthakkar1994@gmail.com
State New, archived
Headers show

Commit Message

Vaishali Thakkar Oct. 29, 2014, 2 p.m. UTC
This patch reverts commit  450246465a76 ("Staging: rtl8192e:
Fix incorrect type in assignment in rtl819x_BAProc.c") as it is
changing code and introducing bug to skip the endian conversion.
Here, tmp variable is used to hold the endian-corrected values
and network-data requires fixed endianness.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
---
Changes Since v2:
   Separated a patch in 2 patches

 drivers/staging/rtl8192e/rtl819x_BAProc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Patch
diff mbox

diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 6da5784..946c1dc 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -115,14 +115,14 @@  static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst,
 
 	if (ACT_ADDBARSP == type) {
 		RT_TRACE(COMP_DBG, "====>to send ADDBARSP\n");
-		tmp = StatusCode;
+		tmp = cpu_to_le16(StatusCode);
 		memcpy(tag, (u8 *)&tmp, 2);
 		tag += 2;
 	}
-	tmp = pBA->BaParamSet.shortData;
+	tmp = cpu_to_le16(pBA->BaParamSet.shortData);
 	memcpy(tag, (u8 *)&tmp, 2);
 	tag += 2;
-	tmp = pBA->BaTimeoutValue;
+	tmp = cpu_to_le16(pBA->BaTimeoutValue);
 	memcpy(tag, (u8 *)&tmp, 2);
 	tag += 2;
 
@@ -178,10 +178,10 @@  static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
 	*tag++ = ACT_CAT_BA;
 	*tag++ = ACT_DELBA;
 
-	tmp = DelbaParamSet.shortData;
+	tmp = cpu_to_le16(DelbaParamSet.shortData);
 	memcpy(tag, (u8 *)&tmp, 2);
 	tag += 2;
-	tmp = ReasonCode;
+	tmp = cpu_to_le16(ReasonCode);
 	memcpy(tag, (u8 *)&tmp, 2);
 	tag += 2;