Commit 12d6d1e3 authored by Ana Rey's avatar Ana Rey Committed by Peter P Waskiewicz Jr

staging: rtl8187se: Fix pointer declarations in ieee80211/ieee80211_softmac.c

Fix pointer declarations as the codingStyle of the kernel recommends in
ieee80211/ieee80211_softmac.c

Fix checkpatch.pl errors:
ERROR: "foo* bar" should be "foo *bar"
ERROR: "(foo*)" should be "(foo *)"
Signed-off-by: default avatarAna Rey <anarey@gmail.com>
Signed-off-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
parent 687b5495
...@@ -651,7 +651,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, ...@@ -651,7 +651,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee,
struct sk_buff *skb; struct sk_buff *skb;
int encrypt; int encrypt;
int atim_len, erp_len; int atim_len, erp_len;
struct ieee80211_crypt_data* crypt; struct ieee80211_crypt_data *crypt;
char *ssid = ieee->current_network.ssid; char *ssid = ieee->current_network.ssid;
int ssid_len = ieee->current_network.ssid_len; int ssid_len = ieee->current_network.ssid_len;
...@@ -685,7 +685,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, ...@@ -685,7 +685,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee,
if (!skb) if (!skb)
return NULL; return NULL;
beacon_buf = (struct ieee80211_probe_response*) skb_put(skb, beacon_size); beacon_buf = (struct ieee80211_probe_response *) skb_put(skb, beacon_size);
memcpy(beacon_buf->header.addr1, dest, ETH_ALEN); memcpy(beacon_buf->header.addr1, dest, ETH_ALEN);
memcpy(beacon_buf->header.addr2, ieee->dev->dev_addr, ETH_ALEN); memcpy(beacon_buf->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
...@@ -714,7 +714,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, ...@@ -714,7 +714,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee,
beacon_buf->info_element.id = MFIE_TYPE_SSID; beacon_buf->info_element.id = MFIE_TYPE_SSID;
beacon_buf->info_element.len = ssid_len; beacon_buf->info_element.len = ssid_len;
tag = (u8*) beacon_buf->info_element.data; tag = (u8 *) beacon_buf->info_element.data;
memcpy(tag, ssid, ssid_len); memcpy(tag, ssid, ssid_len);
...@@ -732,7 +732,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, ...@@ -732,7 +732,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee,
if (atim_len) { if (atim_len) {
*(tag++) = MFIE_TYPE_IBSS_SET; *(tag++) = MFIE_TYPE_IBSS_SET;
*(tag++) = 2; *(tag++) = 2;
*((u16*)(tag)) = cpu_to_le16(ieee->current_network.atim_window); *((u16 *)(tag)) = cpu_to_le16(ieee->current_network.atim_window);
tag += 2; tag += 2;
} }
...@@ -768,9 +768,9 @@ static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee, ...@@ -768,9 +768,9 @@ static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee,
u8 *dest) u8 *dest)
{ {
struct sk_buff *skb; struct sk_buff *skb;
u8* tag; u8 *tag;
struct ieee80211_crypt_data* crypt; struct ieee80211_crypt_data *crypt;
struct ieee80211_assoc_response_frame *assoc; struct ieee80211_assoc_response_frame *assoc;
short encrypt; short encrypt;
...@@ -812,7 +812,7 @@ static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee, ...@@ -812,7 +812,7 @@ static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee,
else else
ieee->assoc_id++; ieee->assoc_id++;
tag = (u8*) skb_put(skb, rate_len); tag = (u8 *) skb_put(skb, rate_len);
ieee80211_MFIE_Brate(ieee, &tag); ieee80211_MFIE_Brate(ieee, &tag);
ieee80211_MFIE_Grate(ieee, &tag); ieee80211_MFIE_Grate(ieee, &tag);
...@@ -849,14 +849,14 @@ static struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee, ...@@ -849,14 +849,14 @@ static struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee,
static struct sk_buff *ieee80211_null_func(struct ieee80211_device *ieee, short pwr) static struct sk_buff *ieee80211_null_func(struct ieee80211_device *ieee, short pwr)
{ {
struct sk_buff *skb; struct sk_buff *skb;
struct ieee80211_hdr_3addr* hdr; struct ieee80211_hdr_3addr *hdr;
skb = dev_alloc_skb(sizeof(struct ieee80211_hdr_3addr)); skb = dev_alloc_skb(sizeof(struct ieee80211_hdr_3addr));
if (!skb) if (!skb)
return NULL; return NULL;
hdr = (struct ieee80211_hdr_3addr*)skb_put(skb, sizeof(struct ieee80211_hdr_3addr)); hdr = (struct ieee80211_hdr_3addr *)skb_put(skb, sizeof(struct ieee80211_hdr_3addr));
memcpy(hdr->addr1, ieee->current_network.bssid, ETH_ALEN); memcpy(hdr->addr1, ieee->current_network.bssid, ETH_ALEN);
memcpy(hdr->addr2, ieee->dev->dev_addr, ETH_ALEN); memcpy(hdr->addr2, ieee->dev->dev_addr, ETH_ALEN);
...@@ -1090,7 +1090,7 @@ static void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee, u8 *chal ...@@ -1090,7 +1090,7 @@ static void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee, u8 *chal
static void ieee80211_associate_step2(struct ieee80211_device *ieee) static void ieee80211_associate_step2(struct ieee80211_device *ieee)
{ {
struct sk_buff* skb; struct sk_buff *skb;
struct ieee80211_network *beacon = &ieee->current_network; struct ieee80211_network *beacon = &ieee->current_network;
del_timer_sync(&ieee->associate_timer); del_timer_sync(&ieee->associate_timer);
...@@ -1272,7 +1272,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8 **challenge, int *chlen) ...@@ -1272,7 +1272,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8 **challenge, int *chlen)
return 0xcafe; return 0xcafe;
} }
*challenge = NULL; *challenge = NULL;
a = (struct ieee80211_authentication*) skb->data; a = (struct ieee80211_authentication *) skb->data;
if (skb->len > (sizeof(struct ieee80211_authentication) + 3)) { if (skb->len > (sizeof(struct ieee80211_authentication) + 3)) {
t = skb->data + sizeof(struct ieee80211_authentication); t = skb->data + sizeof(struct ieee80211_authentication);
...@@ -1294,7 +1294,7 @@ static int auth_rq_parse(struct sk_buff *skb, u8 *dest) ...@@ -1294,7 +1294,7 @@ static int auth_rq_parse(struct sk_buff *skb, u8 *dest)
IEEE80211_DEBUG_MGMT("invalid len in auth request: %d\n", skb->len); IEEE80211_DEBUG_MGMT("invalid len in auth request: %d\n", skb->len);
return -1; return -1;
} }
a = (struct ieee80211_authentication*) skb->data; a = (struct ieee80211_authentication *) skb->data;
memcpy(dest, a->header.addr2, ETH_ALEN); memcpy(dest, a->header.addr2, ETH_ALEN);
...@@ -1320,7 +1320,7 @@ static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb, ...@@ -1320,7 +1320,7 @@ static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
memcpy(src, header->addr2, ETH_ALEN); memcpy(src, header->addr2, ETH_ALEN);
skbend = (u8*)skb->data + skb->len; skbend = (u8 *)skb->data + skb->len;
tag = skb->data + sizeof(struct ieee80211_hdr_3addr); tag = skb->data + sizeof(struct ieee80211_hdr_3addr);
...@@ -1356,7 +1356,7 @@ static int assoc_rq_parse(struct sk_buff *skb, u8 *dest) ...@@ -1356,7 +1356,7 @@ static int assoc_rq_parse(struct sk_buff *skb, u8 *dest)
return -1; return -1;
} }
a = (struct ieee80211_assoc_request_frame*) skb->data; a = (struct ieee80211_assoc_request_frame *) skb->data;
memcpy(dest, a->header.addr2, ETH_ALEN); memcpy(dest, a->header.addr2, ETH_ALEN);
...@@ -1371,7 +1371,7 @@ static inline u16 assoc_parse(struct sk_buff *skb, int *aid) ...@@ -1371,7 +1371,7 @@ static inline u16 assoc_parse(struct sk_buff *skb, int *aid)
return 0xcafe; return 0xcafe;
} }
a = (struct ieee80211_assoc_response_frame*) skb->data; a = (struct ieee80211_assoc_response_frame *) skb->data;
*aid = le16_to_cpu(a->aid) & 0x3fff; *aid = le16_to_cpu(a->aid) & 0x3fff;
return le16_to_cpu(a->status); return le16_to_cpu(a->status);
} }
...@@ -1573,7 +1573,7 @@ inline int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, ...@@ -1573,7 +1573,7 @@ inline int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee,
{ {
struct ieee80211_hdr_3addr *header = (struct ieee80211_hdr_3addr *) skb->data; struct ieee80211_hdr_3addr *header = (struct ieee80211_hdr_3addr *) skb->data;
u16 errcode; u16 errcode;
u8* challenge = NULL; u8 *challenge = NULL;
int chlen = 0; int chlen = 0;
int aid = 0; int aid = 0;
struct ieee80211_assoc_response_frame *assoc_resp; struct ieee80211_assoc_response_frame *assoc_resp;
...@@ -1611,9 +1611,9 @@ inline int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, ...@@ -1611,9 +1611,9 @@ inline int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee,
if (1 == rx_stats->nic_type) if (1 == rx_stats->nic_type)
goto associate_complete; goto associate_complete;
assoc_resp = (struct ieee80211_assoc_response_frame*)skb->data; assoc_resp = (struct ieee80211_assoc_response_frame *)skb->data;
info_element = &assoc_resp->info_element; info_element = &assoc_resp->info_element;
left = skb->len - ((void*)info_element - (void*)assoc_resp); left = skb->len - ((void *)info_element - (void *)assoc_resp);
while (left >= sizeof(struct ieee80211_info_element_hdr)) { while (left >= sizeof(struct ieee80211_info_element_hdr)) {
if (sizeof(struct ieee80211_info_element_hdr) + info_element->len > left) { if (sizeof(struct ieee80211_info_element_hdr) + info_element->len > left) {
...@@ -1632,7 +1632,7 @@ inline int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, ...@@ -1632,7 +1632,7 @@ inline int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee,
/* Not care about version at present. /* Not care about version at present.
* WMM Parameter Element. * WMM Parameter Element.
*/ */
memcpy(ieee->current_network.wmm_param, (u8*)(info_element->data\ memcpy(ieee->current_network.wmm_param, (u8 *)(info_element->data\
+ 8), (info_element->len - 8)); + 8), (info_element->len - 8));
if (((ieee->current_network.wmm_info^info_element->data[6])& \ if (((ieee->current_network.wmm_info^info_element->data[6])& \
...@@ -2302,12 +2302,12 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee) ...@@ -2302,12 +2302,12 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
ieee->wq = create_workqueue(DRV_NAME); ieee->wq = create_workqueue(DRV_NAME);
INIT_DELAYED_WORK(&ieee->start_ibss_wq, (void*) ieee80211_start_ibss_wq); INIT_DELAYED_WORK(&ieee->start_ibss_wq, (void *) ieee80211_start_ibss_wq);
INIT_WORK(&ieee->associate_complete_wq, (void*) ieee80211_associate_complete_wq); INIT_WORK(&ieee->associate_complete_wq, (void *) ieee80211_associate_complete_wq);
INIT_WORK(&ieee->associate_procedure_wq, (void*) ieee80211_associate_procedure_wq); INIT_WORK(&ieee->associate_procedure_wq, (void *) ieee80211_associate_procedure_wq);
INIT_DELAYED_WORK(&ieee->softmac_scan_wq, (void*) ieee80211_softmac_scan_wq); INIT_DELAYED_WORK(&ieee->softmac_scan_wq, (void *) ieee80211_softmac_scan_wq);
INIT_DELAYED_WORK(&ieee->associate_retry_wq, (void*) ieee80211_associate_retry_wq); INIT_DELAYED_WORK(&ieee->associate_retry_wq, (void *) ieee80211_associate_retry_wq);
INIT_WORK(&ieee->wx_sync_scan_wq, (void*) ieee80211_wx_sync_scan_wq); INIT_WORK(&ieee->wx_sync_scan_wq, (void *) ieee80211_wx_sync_scan_wq);
sema_init(&ieee->wx_sem, 1); sema_init(&ieee->wx_sem, 1);
sema_init(&ieee->scan_sem, 1); sema_init(&ieee->scan_sem, 1);
......
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