staging: r8723au: Fix sparse warnings in core/rtw_ap.c
authorLarry Finger <Larry.Finger@lwfinger.net>
Sat, 26 Apr 2014 16:55:18 +0000 (18:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Apr 2014 17:16:17 +0000 (10:16 -0700)
The following warnings are fixed:

drivers/staging/rtl8723au/core/rtw_ap.c:79:23: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/core/rtw_ap.c:79:23:    expected unsigned short [unsigned] [usertype] tim_bitmap_le
drivers/staging/rtl8723au/core/rtw_ap.c:79:23:    got restricted __le16 [usertype] <noident>
drivers/staging/rtl8723au/core/rtw_ap.c:1441:37: warning: restricted __le16 degrades to integer

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_ap.c

index 7459825..23be15c 100644 (file)
@@ -73,7 +73,7 @@ static void update_BCNTIM(struct rtw_adapter *padapter)
        struct wlan_bssid_ex *pnetwork_mlmeext = &pmlmeinfo->network;
        unsigned char *pie = pnetwork_mlmeext->IEs;
        u8 *p, *dst_ie, *premainder_ie = NULL, *pbackup_remainder_ie = NULL;
-       u16 tim_bitmap_le;
+       __le16 tim_bitmap_le;
        uint offset, tmp_len, tim_ielen, tim_ie_offset, remainder_ielen;
 
        tim_bitmap_le = cpu_to_le16(pstapriv->tim_bitmap);
@@ -1439,8 +1439,9 @@ static int rtw_ht_operation_update(struct rtw_adapter *padapter)
        if (pmlmepriv->num_sta_no_ht ||
            (pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT))
                new_op_mode = OP_MODE_MIXED;
-       else if ((phtpriv_ap->ht_cap.cap_info & IEEE80211_HT_CAP_SUP_WIDTH_20_40)
-                && pmlmepriv->num_sta_ht_20mhz)
+       else if ((le16_to_cpu(phtpriv_ap->ht_cap.cap_info) &
+                 IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
+                pmlmepriv->num_sta_ht_20mhz)
                new_op_mode = OP_MODE_20MHZ_HT_STA_ASSOCED;
        else if (pmlmepriv->olbc_ht)
                new_op_mode = OP_MODE_MAY_BE_LEGACY_STAS;