Commit 71c8d893 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

Staging: rtl8192e: fix an endian bug

Passing the high bits of "ratr_value" to rtl8192_config_rate() only
works on little endian systems.  We should be passing a u16 value.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 03e71d6b
...@@ -2128,10 +2128,11 @@ void rtl8192_update_ratr_table(struct net_device *dev) ...@@ -2128,10 +2128,11 @@ void rtl8192_update_ratr_table(struct net_device *dev)
struct rtllib_device *ieee = priv->rtllib; struct rtllib_device *ieee = priv->rtllib;
u8 *pMcsRate = ieee->dot11HTOperationalRateSet; u8 *pMcsRate = ieee->dot11HTOperationalRateSet;
u32 ratr_value = 0; u32 ratr_value = 0;
u16 rate_config = 0;
u8 rate_index = 0; u8 rate_index = 0;
rtl8192_config_rate(dev, (u16 *)(&ratr_value)); rtl8192_config_rate(dev, &rate_config);
ratr_value |= (*(u16 *)(pMcsRate)) << 12; ratr_value = rate_config | *pMcsRate << 12;
switch (ieee->mode) { switch (ieee->mode) {
case IEEE_A: case IEEE_A:
ratr_value &= 0x00000FF0; ratr_value &= 0x00000FF0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment