staging: rtl8723au: rtw_check_beacon_data23a(): Make len unsigned int
Making len unsigned int fixes a warning caused by smatch getting confused that len could be negative. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
17979959ba
commit
8282aeb63f
|
@ -783,7 +783,8 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
|
|||
update_bmc_sta(padapter);
|
||||
}
|
||||
|
||||
int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf, int len)
|
||||
int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
|
||||
unsigned int len)
|
||||
{
|
||||
int ret = _SUCCESS;
|
||||
u8 *p;
|
||||
|
@ -819,7 +820,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf, int len)
|
|||
if (!check_fwstate(pmlmepriv, WIFI_AP_STATE))
|
||||
return _FAIL;
|
||||
|
||||
if (len>MAX_IE_SZ)
|
||||
if (len > MAX_IE_SZ)
|
||||
return _FAIL;
|
||||
|
||||
pbss_network->IELength = len;
|
||||
|
|
|
@ -32,7 +32,7 @@ void update_beacon23a(struct rtw_adapter *padapter, u8 ie_id, u8 *oui, u8 tx);
|
|||
void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_level);
|
||||
void expire_timeout_chk23a(struct rtw_adapter *padapter);
|
||||
void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info *psta);
|
||||
int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf, int len);
|
||||
int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf, unsigned int len);
|
||||
void rtw_ap_restore_network(struct rtw_adapter *padapter);
|
||||
void rtw_set_macaddr_acl23a(struct rtw_adapter *padapter, int mode);
|
||||
int rtw_acl_add_sta23a(struct rtw_adapter *padapter, u8 *addr);
|
||||
|
|
Loading…
Reference in New Issue