From: Larry Finger Date: Sat, 26 Apr 2014 16:55:18 +0000 (+0200) Subject: staging: r8723au: Fix sparse warnings in core/rtw_ap.c X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a96ae6f41c1208e4754be575cfa97566d3f7c55e;p=openwrt%2Fstaging%2Fblogic.git staging: r8723au: Fix sparse warnings in core/rtw_ap.c 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] drivers/staging/rtl8723au/core/rtw_ap.c:1441:37: warning: restricted __le16 degrades to integer Signed-off-by: Larry Finger Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c index 7459825c2abe..23be15cc76bc 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -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;