staging: rtl8723au: Make sparse happy - make rtw_get_beacon_interval23a_from_ie retur...
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sat, 26 Apr 2014 16:55:43 +0000 (18:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Apr 2014 17:16:21 +0000 (10:16 -0700)
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
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/include/rtw_mlme.h

index 23be15cc76bcf6c95dbbba1abc1da6df3fe29afe..be8b0e893dacda0b15d66f376e29e69a9e5a7f1a 100644 (file)
@@ -791,6 +791,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
        u8 *pHT_caps_ie = NULL;
        u8 *pHT_info_ie = NULL;
        struct sta_info *psta = NULL;
+       __le16 *pbeacon;
        u16 cap, ht_cap = false;
        uint ie_len = 0;
        int group_cipher, pairwise_cipher;
@@ -838,8 +839,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
 
        /* beacon interval */
        /* ie + 8;  8: TimeStamp, 2: Beacon Interval 2:Capability */
-       p = rtw_get_beacon_interval23a_from_ie(ie);
-       pbss_network->Configuration.BeaconPeriod = get_unaligned_le16(p);
+       pbeacon = rtw_get_beacon_interval23a_from_ie(ie);
+       pbss_network->Configuration.BeaconPeriod = get_unaligned_le16(pbeacon);
 
        /* capability */
        cap = get_unaligned_le16(ie);
index dd42d4f5e7f104428ad06091619e40f2b05b2289..7e37929abf5c92716c3bf04e9d0eccd864212348 100644 (file)
@@ -347,9 +347,9 @@ u16 rtw_get_capability23a(struct wlan_bssid_ex *bss)
        return le16_to_cpu(val);
 }
 
-u8 *rtw_get_beacon_interval23a_from_ie(u8 *ie)
+__le16 *rtw_get_beacon_interval23a_from_ie(u8 *ie)
 {
-       return ie + 8;
+       return (__le16 *)(ie + 8);
 }
 
 int rtw_init_mlme_priv23a (struct rtw_adapter *padapter)
index 55242c2f6636f2e631d21e4bd4cc456f91a5aa1f..9689feea41c32ddd1cf30f78266b318631c8ce8c 100644 (file)
@@ -470,7 +470,7 @@ int rtw_if_up23a(struct rtw_adapter *padapter);
 int rtw_linked_check(struct rtw_adapter *padapter);
 
 __le16 *rtw_get_capability23a_from_ie(u8 *ie);
-u8 *rtw_get_beacon_interval23a_from_ie(u8 *ie);
+__le16 *rtw_get_beacon_interval23a_from_ie(u8 *ie);
 
 
 void rtw_joinbss_reset23a(struct rtw_adapter *padapter);