Commit 74f15056 authored by Stefano Manni's avatar Stefano Manni Committed by Greg Kroah-Hartman

staging: rtl8712: make unsigned length for rtl8717_get{_wpa_, _wpa2_, _}ie

Fixed r8712_get_ie, r8712_get_wpa_ie, r8712_get_wpa2_ie
to have a length as unsigned int pointer instead of signed.

Sparse warnings:

drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27: warning: incorrect type in argument 3 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27:    expected signed int *len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27:    got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35: warning: incorrect type in argument 3 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35:    expected signed int *len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35:    got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67: warning: incorrect type in argument 3 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67:    expected signed int *len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67:    got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33: warning: incorrect type in argument 2 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33:    expected int *rsn_ie_len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33:    got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33: warning: incorrect type in argument 2 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33:    expected int *rsn_ie_len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33:    got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_mlme.c:1701:59: warning: incorrect type in argument 3 (different signedness)
drivers/staging/rtl8712/rtl871x_mlme.c:1701:59:    expected signed int *len
drivers/staging/rtl8712/rtl871x_mlme.c:1701:59:    got unsigned int *<noident>
Signed-off-by: default avatarStefano Manni <stefano.manni@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c318bb08
...@@ -107,7 +107,7 @@ u8 *r8712_set_ie(u8 *pbuf, sint index, uint len, u8 *source, uint *frlen) ...@@ -107,7 +107,7 @@ u8 *r8712_set_ie(u8 *pbuf, sint index, uint len, u8 *source, uint *frlen)
* index: the information element id index, limit is the limit for search * index: the information element id index, limit is the limit for search
* --------------------------------------------------------------------------- * ---------------------------------------------------------------------------
*/ */
u8 *r8712_get_ie(u8 *pbuf, sint index, sint *len, sint limit) u8 *r8712_get_ie(u8 *pbuf, sint index, uint *len, sint limit)
{ {
sint tmp, i; sint tmp, i;
u8 *p; u8 *p;
...@@ -211,9 +211,9 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv) ...@@ -211,9 +211,9 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv)
return sz; return sz;
} }
unsigned char *r8712_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit) unsigned char *r8712_get_wpa_ie(unsigned char *pie, uint *wpa_ie_len, int limit)
{ {
int len; u32 len;
u16 val16; u16 val16;
unsigned char wpa_oui_type[] = {0x00, 0x50, 0xf2, 0x01}; unsigned char wpa_oui_type[] = {0x00, 0x50, 0xf2, 0x01};
u8 *pbuf = pie; u8 *pbuf = pie;
...@@ -245,7 +245,7 @@ unsigned char *r8712_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit) ...@@ -245,7 +245,7 @@ unsigned char *r8712_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
return NULL; return NULL;
} }
unsigned char *r8712_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit) unsigned char *r8712_get_wpa2_ie(unsigned char *pie, uint *rsn_ie_len, int limit)
{ {
return r8712_get_ie(pie, _WPA2_IE_ID_, rsn_ie_len, limit); return r8712_get_ie(pie, _WPA2_IE_ID_, rsn_ie_len, limit);
} }
......
...@@ -738,9 +738,9 @@ static inline int ieee80211_get_hdrlen(u16 fc) ...@@ -738,9 +738,9 @@ static inline int ieee80211_get_hdrlen(u16 fc)
struct registry_priv; struct registry_priv;
u8 *r8712_set_ie(u8 *pbuf, sint index, uint len, u8 *source, uint *frlen); u8 *r8712_set_ie(u8 *pbuf, sint index, uint len, u8 *source, uint *frlen);
u8 *r8712_get_ie(u8 *pbuf, sint index, sint *len, sint limit); u8 *r8712_get_ie(u8 *pbuf, sint index, uint *len, sint limit);
unsigned char *r8712_get_wpa_ie(unsigned char *pie, int *rsn_ie_len, int limit); unsigned char *r8712_get_wpa_ie(unsigned char *pie, uint *rsn_ie_len, int limit);
unsigned char *r8712_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, unsigned char *r8712_get_wpa2_ie(unsigned char *pie, uint *rsn_ie_len,
int limit); int limit);
int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,
int *pairwise_cipher); int *pairwise_cipher);
......
...@@ -1725,7 +1725,8 @@ unsigned int r8712_restructure_ht_ie(struct _adapter *padapter, u8 *in_ie, ...@@ -1725,7 +1725,8 @@ unsigned int r8712_restructure_ht_ie(struct _adapter *padapter, u8 *in_ie,
static void update_ht_cap(struct _adapter *padapter, u8 *pie, uint ie_len) static void update_ht_cap(struct _adapter *padapter, u8 *pie, uint ie_len)
{ {
u8 *p, max_ampdu_sz; u8 *p, max_ampdu_sz;
int i, len; int i;
uint len;
struct sta_info *bmc_sta, *psta; struct sta_info *bmc_sta, *psta;
struct ieee80211_ht_cap *pht_capie; struct ieee80211_ht_cap *pht_capie;
struct recv_reorder_ctrl *preorder_ctrl; struct recv_reorder_ctrl *preorder_ctrl;
......
...@@ -717,7 +717,7 @@ void r8712_update_protection(struct _adapter *padapter, u8 *ie, uint ie_len) ...@@ -717,7 +717,7 @@ void r8712_update_protection(struct _adapter *padapter, u8 *ie, uint ie_len)
{ {
uint protection; uint protection;
u8 *perp; u8 *perp;
sint erp_len; uint erp_len;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct registry_priv *pregistrypriv = &padapter->registrypriv; struct registry_priv *pregistrypriv = &padapter->registrypriv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment