Commit 591968b2 authored by John Whitmore's avatar John Whitmore Committed by Greg Kroah-Hartman

staging:rtl8192u: Correct spacing before and after parenthesis - Style

Corrected coding style issues aroung opening and closed parenthesis.
Spaces, or blank line, removed from after '(' or before ')'
Signed-off-by: default avatarJohn Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eb2cbcc3
...@@ -263,7 +263,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee ...@@ -263,7 +263,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
/* check whether the managed packet queued greater than 5 */ /* check whether the managed packet queued greater than 5 */
if (!ieee->check_nic_enough_desc(ieee->dev, tcb_desc->queue_index) ||\ if (!ieee->check_nic_enough_desc(ieee->dev, tcb_desc->queue_index) ||\
(skb_queue_len(&ieee->skb_waitQ[tcb_desc->queue_index]) != 0) || \ (skb_queue_len(&ieee->skb_waitQ[tcb_desc->queue_index]) != 0) || \
(ieee->queue_stop) ) { (ieee->queue_stop)) {
/* insert the skb packet to the management queue */ /* insert the skb packet to the management queue */
/* as for the completion function, it does not need /* as for the completion function, it does not need
* to check it any more. * to check it any more.
...@@ -493,7 +493,7 @@ static void ieee80211_softmac_scan_wq(struct work_struct *work) ...@@ -493,7 +493,7 @@ static void ieee80211_softmac_scan_wq(struct work_struct *work)
} }
} }
} while (!channel_map[ieee->current_network.channel]); } while (!channel_map[ieee->current_network.channel]);
if (ieee->scanning == 0 ) if (ieee->scanning == 0)
goto out; goto out;
ieee->set_chan(ieee->dev, ieee->current_network.channel); ieee->set_chan(ieee->dev, ieee->current_network.channel);
if (channel_map[ieee->current_network.channel] == 1) if (channel_map[ieee->current_network.channel] == 1)
...@@ -584,7 +584,7 @@ EXPORT_SYMBOL(ieee80211_stop_scan); ...@@ -584,7 +584,7 @@ EXPORT_SYMBOL(ieee80211_stop_scan);
/* called with ieee->lock held */ /* called with ieee->lock held */
static void ieee80211_start_scan(struct ieee80211_device *ieee) static void ieee80211_start_scan(struct ieee80211_device *ieee)
{ {
if (IS_DOT11D_ENABLE(ieee) ) { if (IS_DOT11D_ENABLE(ieee)) {
if (IS_COUNTRY_IE_VALID(ieee)) if (IS_COUNTRY_IE_VALID(ieee))
RESET_CIE_WATCHDOG(ieee); RESET_CIE_WATCHDOG(ieee);
} }
...@@ -601,7 +601,7 @@ static void ieee80211_start_scan(struct ieee80211_device *ieee) ...@@ -601,7 +601,7 @@ static void ieee80211_start_scan(struct ieee80211_device *ieee)
/* called with wx_mutex held */ /* called with wx_mutex held */
void ieee80211_start_scan_syncro(struct ieee80211_device *ieee) void ieee80211_start_scan_syncro(struct ieee80211_device *ieee)
{ {
if (IS_DOT11D_ENABLE(ieee) ) { if (IS_DOT11D_ENABLE(ieee)) {
if (IS_COUNTRY_IE_VALID(ieee)) if (IS_COUNTRY_IE_VALID(ieee))
RESET_CIE_WATCHDOG(ieee); RESET_CIE_WATCHDOG(ieee);
} }
...@@ -728,9 +728,9 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d ...@@ -728,9 +728,9 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
return NULL; return NULL;
skb_reserve(skb, ieee->tx_headroom); skb_reserve(skb, ieee->tx_headroom);
beacon_buf = skb_put(skb, (beacon_size - ieee->tx_headroom)); beacon_buf = skb_put(skb, (beacon_size - ieee->tx_headroom));
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);
memcpy (beacon_buf->header.addr3, ieee->current_network.bssid, ETH_ALEN); memcpy(beacon_buf->header.addr3, ieee->current_network.bssid, ETH_ALEN);
beacon_buf->header.duration_id = 0; /* FIXME */ beacon_buf->header.duration_id = 0; /* FIXME */
beacon_buf->beacon_interval = beacon_buf->beacon_interval =
...@@ -973,7 +973,7 @@ ieee80211_association_req(struct ieee80211_network *beacon, ...@@ -973,7 +973,7 @@ ieee80211_association_req(struct ieee80211_network *beacon,
HTConstructCapabilityElement(ieee, ht_cap_buf, &ht_cap_len, encrypt); HTConstructCapabilityElement(ieee, ht_cap_buf, &ht_cap_len, encrypt);
if (ieee->pHTInfo->bCurrentRT2RTAggregation) { if (ieee->pHTInfo->bCurrentRT2RTAggregation) {
realtek_ie_buf = ieee->pHTInfo->szRT2RTAggBuffer; realtek_ie_buf = ieee->pHTInfo->szRT2RTAggBuffer;
realtek_ie_len = sizeof( ieee->pHTInfo->szRT2RTAggBuffer); realtek_ie_len = sizeof(ieee->pHTInfo->szRT2RTAggBuffer);
HTConstructRT2RTAggElement(ieee, realtek_ie_buf, &realtek_ie_len); HTConstructRT2RTAggElement(ieee, realtek_ie_buf, &realtek_ie_len);
} }
} }
...@@ -1033,7 +1033,7 @@ ieee80211_association_req(struct ieee80211_network *beacon, ...@@ -1033,7 +1033,7 @@ ieee80211_association_req(struct ieee80211_network *beacon,
memcpy(ieee->ap_mac_addr, beacon->bssid, ETH_ALEN);//for HW security, John memcpy(ieee->ap_mac_addr, beacon->bssid, ETH_ALEN);//for HW security, John
hdr->capability = cpu_to_le16(WLAN_CAPABILITY_BSS); hdr->capability = cpu_to_le16(WLAN_CAPABILITY_BSS);
if (beacon->capability & WLAN_CAPABILITY_PRIVACY ) if (beacon->capability & WLAN_CAPABILITY_PRIVACY)
hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY); hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY);
if (beacon->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) if (beacon->capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
...@@ -1237,7 +1237,7 @@ static void ieee80211_auth_challenge(struct ieee80211_device *ieee, ...@@ -1237,7 +1237,7 @@ static void ieee80211_auth_challenge(struct ieee80211_device *ieee,
IEEE80211_DEBUG_MGMT("Sending authentication challenge response\n"); IEEE80211_DEBUG_MGMT("Sending authentication challenge response\n");
ieee80211_encrypt_fragment(ieee, skb, sizeof(struct rtl_80211_hdr_3addr )); ieee80211_encrypt_fragment(ieee, skb, sizeof(struct rtl_80211_hdr_3addr));
softmac_mgmt_xmit(skb, ieee); softmac_mgmt_xmit(skb, ieee);
mod_timer(&ieee->associate_timer, jiffies + (HZ / 2)); mod_timer(&ieee->associate_timer, jiffies + (HZ / 2));
...@@ -1287,7 +1287,7 @@ static void ieee80211_associate_complete_wq(struct work_struct *work) ...@@ -1287,7 +1287,7 @@ static void ieee80211_associate_complete_wq(struct work_struct *work)
} }
ieee->LinkDetectInfo.SlotNum = 2 * (1 + ieee->current_network.beacon_interval / 500); ieee->LinkDetectInfo.SlotNum = 2 * (1 + ieee->current_network.beacon_interval / 500);
// To prevent the immediately calling watch_dog after association. // To prevent the immediately calling watch_dog after association.
if (ieee->LinkDetectInfo.NumRecvBcnInPeriod == 0 || ieee->LinkDetectInfo.NumRecvDataInPeriod == 0 ) { if (ieee->LinkDetectInfo.NumRecvBcnInPeriod == 0 || ieee->LinkDetectInfo.NumRecvDataInPeriod == 0) {
ieee->LinkDetectInfo.NumRecvBcnInPeriod = 1; ieee->LinkDetectInfo.NumRecvBcnInPeriod = 1;
ieee->LinkDetectInfo.NumRecvDataInPeriod = 1; ieee->LinkDetectInfo.NumRecvDataInPeriod = 1;
} }
...@@ -1367,13 +1367,13 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee ...@@ -1367,13 +1367,13 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
ssidmatch = (ieee->current_network.ssid_len == net->ssid_len) && ssidmatch = (ieee->current_network.ssid_len == net->ssid_len) &&
(!strncmp(ieee->current_network.ssid, net->ssid, net->ssid_len)); (!strncmp(ieee->current_network.ssid, net->ssid, net->ssid_len));
if ( /* if the user set the AP check if match. /* if the user set the AP check if match.
* if the network does not broadcast essid we check the user supplyed ANY essid * if the network does not broadcast essid we check the user supplyed ANY essid
* if the network does broadcast and the user does not set essid it is OK * if the network does broadcast and the user does not set essid it is OK
* if the network does broadcast and the user did set essid chech if essid match * if the network does broadcast and the user did set essid chech if essid match
*/ */
(apset && apmatch && if ((apset && apmatch &&
((ssidset && ssidbroad && ssidmatch) || (ssidbroad && !ssidset) || (!ssidbroad && ssidset)) ) || ((ssidset && ssidbroad && ssidmatch) || (ssidbroad && !ssidset) || (!ssidbroad && ssidset))) ||
/* if the ap is not set, check that the user set the bssid /* if the ap is not set, check that the user set the bssid
* and the network does broadcast and that those two bssid matches * and the network does broadcast and that those two bssid matches
*/ */
...@@ -1508,14 +1508,14 @@ static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb, ...@@ -1508,14 +1508,14 @@ static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
struct rtl_80211_hdr_3addr *header = struct rtl_80211_hdr_3addr *header =
(struct rtl_80211_hdr_3addr *)skb->data; (struct rtl_80211_hdr_3addr *)skb->data;
if (skb->len < sizeof (struct rtl_80211_hdr_3addr )) if (skb->len < sizeof(struct rtl_80211_hdr_3addr))
return -1; /* corrupted */ return -1; /* corrupted */
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 rtl_80211_hdr_3addr ); tag = skb->data + sizeof(struct rtl_80211_hdr_3addr);
while (tag + 1 < skbend) { while (tag + 1 < skbend) {
if (*tag == 0) { if (*tag == 0) {
...@@ -1660,7 +1660,7 @@ static short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h, ...@@ -1660,7 +1660,7 @@ static short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
ieee->last_rx_ps_time + msecs_to_jiffies(timeout))) ieee->last_rx_ps_time + msecs_to_jiffies(timeout)))
return 0; return 0;
if ((ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE ) && if ((ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE) &&
(ieee->mgmt_queue_tail != ieee->mgmt_queue_head)) (ieee->mgmt_queue_tail != ieee->mgmt_queue_head))
return 0; return 0;
...@@ -1931,11 +1931,9 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb, ...@@ -1931,11 +1931,9 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
} else { } else {
/* aid could not been allocated */ /* aid could not been allocated */
ieee->softmac_stats.rx_ass_err++; ieee->softmac_stats.rx_ass_err++;
printk( printk("Association response status code 0x%x\n",
"Association response status code 0x%x\n",
errcode); errcode);
IEEE80211_DEBUG_MGMT( IEEE80211_DEBUG_MGMT("Association response status code 0x%x\n",
"Association response status code 0x%x\n",
errcode); errcode);
if (ieee->AsocRetryCount < RT_ASOC_RETRY_LIMIT) if (ieee->AsocRetryCount < RT_ASOC_RETRY_LIMIT)
schedule_work(&ieee->associate_procedure_wq); schedule_work(&ieee->associate_procedure_wq);
...@@ -2060,8 +2058,7 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device * ...@@ -2060,8 +2058,7 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *
skb_queue_tail(&ieee->skb_waitQ[queue_index], txb->fragments[i]); skb_queue_tail(&ieee->skb_waitQ[queue_index], txb->fragments[i]);
#endif #endif
} else { } else {
ieee->softmac_data_hard_start_xmit( ieee->softmac_data_hard_start_xmit(txb->fragments[i],
txb->fragments[i],
ieee->dev, ieee->rate); ieee->dev, ieee->rate);
//ieee->stats.tx_packets++; //ieee->stats.tx_packets++;
//ieee->stats.tx_bytes += txb->fragments[i]->len; //ieee->stats.tx_bytes += txb->fragments[i]->len;
...@@ -2084,8 +2081,7 @@ static void ieee80211_resume_tx(struct ieee80211_device *ieee) ...@@ -2084,8 +2081,7 @@ static void ieee80211_resume_tx(struct ieee80211_device *ieee)
ieee->tx_pending.frag = i; ieee->tx_pending.frag = i;
return; return;
} else { } else {
ieee->softmac_data_hard_start_xmit( ieee->softmac_data_hard_start_xmit(ieee->tx_pending.txb->fragments[i],
ieee->tx_pending.txb->fragments[i],
ieee->dev, ieee->rate); ieee->dev, ieee->rate);
//(i+1)<ieee->tx_pending.txb->nr_frags); //(i+1)<ieee->tx_pending.txb->nr_frags);
ieee->stats.tx_packets++; ieee->stats.tx_packets++;
...@@ -2935,8 +2931,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee, ...@@ -2935,8 +2931,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
return ret; return ret;
} }
static inline struct sk_buff *ieee80211_disassociate_skb( static inline struct sk_buff *ieee80211_disassociate_skb(struct ieee80211_network *beacon,
struct ieee80211_network *beacon,
struct ieee80211_device *ieee, struct ieee80211_device *ieee,
u8 asRsn) u8 asRsn)
{ {
...@@ -2960,8 +2955,7 @@ static inline struct sk_buff *ieee80211_disassociate_skb( ...@@ -2960,8 +2955,7 @@ static inline struct sk_buff *ieee80211_disassociate_skb(
} }
void void
SendDisassociation( SendDisassociation(struct ieee80211_device *ieee,
struct ieee80211_device *ieee,
u8 *asSta, u8 *asSta,
u8 asRsn u8 asRsn
) )
......
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