Commit 7ec3ff69 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Greg Kroah-Hartman

staging: rtl8712: ieee80211.c: Remove leading p from variable names

Remove leading p from the names of the following pointer variables:
- pregistrypriv
- pdev_network
- pie
- pbuf.
Issue found with Coccinelle.
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 313cca24
...@@ -156,13 +156,13 @@ static uint r8712_get_rateset_len(u8 *rateset) ...@@ -156,13 +156,13 @@ static uint r8712_get_rateset_len(u8 *rateset)
return i; return i;
} }
int r8712_generate_ie(struct registry_priv *pregistrypriv) int r8712_generate_ie(struct registry_priv *registrypriv)
{ {
int rate_len; int rate_len;
uint sz = 0; uint sz = 0;
struct wlan_bssid_ex *pdev_network = &pregistrypriv->dev_network; struct wlan_bssid_ex *dev_network = &registrypriv->dev_network;
u8 *ie = pdev_network->IEs; u8 *ie = dev_network->IEs;
u16 beaconPeriod = (u16)pdev_network->Configuration.BeaconPeriod; u16 beaconPeriod = (u16)dev_network->Configuration.BeaconPeriod;
/*timestamp will be inserted by hardware*/ /*timestamp will be inserted by hardware*/
sz += 8; sz += 8;
...@@ -174,65 +174,65 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv) ...@@ -174,65 +174,65 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv)
/*capability info*/ /*capability info*/
*(u16 *)ie = 0; *(u16 *)ie = 0;
*(__le16 *)ie |= cpu_to_le16(cap_IBSS); *(__le16 *)ie |= cpu_to_le16(cap_IBSS);
if (pregistrypriv->preamble == PREAMBLE_SHORT) if (registrypriv->preamble == PREAMBLE_SHORT)
*(__le16 *)ie |= cpu_to_le16(cap_ShortPremble); *(__le16 *)ie |= cpu_to_le16(cap_ShortPremble);
if (pdev_network->Privacy) if (dev_network->Privacy)
*(__le16 *)ie |= cpu_to_le16(cap_Privacy); *(__le16 *)ie |= cpu_to_le16(cap_Privacy);
sz += 2; sz += 2;
ie += 2; ie += 2;
/*SSID*/ /*SSID*/
ie = r8712_set_ie(ie, _SSID_IE_, pdev_network->Ssid.SsidLength, ie = r8712_set_ie(ie, _SSID_IE_, dev_network->Ssid.SsidLength,
pdev_network->Ssid.Ssid, &sz); dev_network->Ssid.Ssid, &sz);
/*supported rates*/ /*supported rates*/
set_supported_rate(pdev_network->rates, pregistrypriv->wireless_mode); set_supported_rate(dev_network->rates, registrypriv->wireless_mode);
rate_len = r8712_get_rateset_len(pdev_network->rates); rate_len = r8712_get_rateset_len(dev_network->rates);
if (rate_len > 8) { if (rate_len > 8) {
ie = r8712_set_ie(ie, _SUPPORTEDRATES_IE_, 8, ie = r8712_set_ie(ie, _SUPPORTEDRATES_IE_, 8,
pdev_network->rates, &sz); dev_network->rates, &sz);
ie = r8712_set_ie(ie, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), ie = r8712_set_ie(ie, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8),
(pdev_network->rates + 8), &sz); (dev_network->rates + 8), &sz);
} else { } else {
ie = r8712_set_ie(ie, _SUPPORTEDRATES_IE_, ie = r8712_set_ie(ie, _SUPPORTEDRATES_IE_,
rate_len, pdev_network->rates, &sz); rate_len, dev_network->rates, &sz);
} }
/*DS parameter set*/ /*DS parameter set*/
ie = r8712_set_ie(ie, _DSSET_IE_, 1, ie = r8712_set_ie(ie, _DSSET_IE_, 1,
(u8 *)&pdev_network->Configuration.DSConfig, &sz); (u8 *)&dev_network->Configuration.DSConfig, &sz);
/*IBSS Parameter Set*/ /*IBSS Parameter Set*/
ie = r8712_set_ie(ie, _IBSS_PARA_IE_, 2, ie = r8712_set_ie(ie, _IBSS_PARA_IE_, 2,
(u8 *)&pdev_network->Configuration.ATIMWindow, &sz); (u8 *)&dev_network->Configuration.ATIMWindow, &sz);
return sz; return sz;
} }
unsigned char *r8712_get_wpa_ie(unsigned char *pie, uint *wpa_ie_len, int limit) unsigned char *r8712_get_wpa_ie(unsigned char *ie, uint *wpa_ie_len, int limit)
{ {
u32 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 *buf = ie;
while (1) { while (1) {
pbuf = r8712_get_ie(pbuf, _WPA_IE_ID_, &len, limit); buf = r8712_get_ie(buf, _WPA_IE_ID_, &len, limit);
if (pbuf) { if (buf) {
/*check if oui matches...*/ /*check if oui matches...*/
if (memcmp((pbuf + 2), wpa_oui_type, if (memcmp((buf + 2), wpa_oui_type,
sizeof(wpa_oui_type))) sizeof(wpa_oui_type)))
goto check_next_ie; goto check_next_ie;
/*check version...*/ /*check version...*/
memcpy((u8 *)&val16, (pbuf + 6), sizeof(val16)); memcpy((u8 *)&val16, (buf + 6), sizeof(val16));
le16_to_cpus(&val16); le16_to_cpus(&val16);
if (val16 != 0x0001) if (val16 != 0x0001)
goto check_next_ie; goto check_next_ie;
*wpa_ie_len = *(pbuf + 1); *wpa_ie_len = *(buf + 1);
return pbuf; return buf;
} }
*wpa_ie_len = 0; *wpa_ie_len = 0;
return NULL; return NULL;
check_next_ie: check_next_ie:
limit = limit - (pbuf - pie) - 2 - len; limit = limit - (buf - ie) - 2 - len;
if (limit <= 0) if (limit <= 0)
break; break;
pbuf += (2 + len); buf += (2 + len);
} }
*wpa_ie_len = 0; *wpa_ie_len = 0;
return NULL; return NULL;
......
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