staging: rtl8192e: Fix big-endian warning
authorLarry Finger <Larry.Finger@lwfinger.net>
Fri, 24 Jun 2011 22:02:54 +0000 (17:02 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Jul 2011 02:59:48 +0000 (19:59 -0700)
When compiling the rtl8192e driver from staging on a big-endian
architecture, the following warning results:

  CC [M]  drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.o
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c: In function 'ieee80211_probe_resp':
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c:781: warning: value computed is not used

The warning is due to misuse of cpu_to_le16().

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c

index 45e3cc1eb17958d923b5eb4f20705a688d138fe5..60e9a09d93305c514bb466e14988635295dee0c3 100644 (file)
@@ -777,7 +777,7 @@ static struct sk_buff* ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
                cpu_to_le16(ieee->current_network.capability & WLAN_CAPABILITY_SHORT_PREAMBLE); //add short preamble here
 
        if(ieee->short_slot && (ieee->current_network.capability & WLAN_CAPABILITY_SHORT_SLOT))
-               cpu_to_le16((beacon_buf->capability |= WLAN_CAPABILITY_SHORT_SLOT));
+               beacon_buf->capability |= cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT);
 
        crypt = ieee->crypt[ieee->tx_keyidx];
        if (encrypt)