summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
diff options
context:
space:
mode:
authorHaneen Mohammed2015-03-25 06:07:06 +0100
committerGreg Kroah-Hartman2015-03-26 10:35:33 +0100
commitdde48b99d23f3f2e0f016d297801e4d5f13297fa (patch)
tree870ca0c4c3c0ca0bd51c745bb9ea37ec74800a12 /drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
parentStaging: lustre: Remove extern from function declaration (diff)
downloadkernel-qcow2-linux-dde48b99d23f3f2e0f016d297801e4d5f13297fa.tar.gz
kernel-qcow2-linux-dde48b99d23f3f2e0f016d297801e4d5f13297fa.tar.xz
kernel-qcow2-linux-dde48b99d23f3f2e0f016d297801e4d5f13297fa.zip
Staging: rtl8192u: Add space before open parenthesis
Space is required before the open parenthesis. This patch adds space after if to address that issue. This was done with the help of the following Coccinelle script: @r@ position p1,p2; @@ if@p1 (@p2 ...) { ... } @script:python@ p1 << r.p1; p2 << r.p2; @@ l1 = int (p1[0].line) l2 = int (p2[0].line) c1 = int (p1[0].column) c2 = int (p2[0].column) if (l2 == l1 and c1 + 2 != c2): cocci.include_match(False) @@ position r.p1,r.p2; @@ - if@p1 ( + if ( ...) { ... } Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c')
-rw-r--r--drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index 0a90450a295d..b4d09b21f8ec 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -608,12 +608,12 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
bool bMatchWinStart = false, bPktInBuf = false;
IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): Seq is %d,pTS->RxIndicateSeq is %d, WinSize is %d\n",__func__,SeqNum,pTS->RxIndicateSeq,WinSize);
/* Rx Reorder initialize condition.*/
- if(pTS->RxIndicateSeq == 0xffff) {
+ if (pTS->RxIndicateSeq == 0xffff) {
pTS->RxIndicateSeq = SeqNum;
}
/* Drop out the packet which SeqNum is smaller than WinStart */
- if(SN_LESS(SeqNum, pTS->RxIndicateSeq)) {
+ if (SN_LESS(SeqNum, pTS->RxIndicateSeq)) {
IEEE80211_DEBUG(IEEE80211_DL_REORDER,"Packet Drop! IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum);
pHTInfo->RxReorderDropCounter++;
@@ -716,7 +716,7 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
SN_EQUAL(pReorderEntry->SeqNum, pTS->RxIndicateSeq))
{
/* This protect buffer from overflow. */
- if(index >= REORDER_WIN_SIZE) {
+ if (index >= REORDER_WIN_SIZE) {
IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Buffer overflow!! \n");
bPktInBuf = true;
break;
@@ -740,7 +740,7 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
}
/* Handling pending timer. Set this timer to prevent from long time Rx buffering.*/
- if(index>0) {
+ if (index>0) {
// Cancel previous pending timer.
// del_timer_sync(&pTS->RxPktPendingTimer);
pTS->RxTimeoutIndicateSeq = 0xffff;
@@ -753,7 +753,7 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
ieee80211_indicate_packets(ieee, prxbIndicateArray, index);
}
- if(bPktInBuf && pTS->RxTimeoutIndicateSeq==0xffff) {
+ if (bPktInBuf && pTS->RxTimeoutIndicateSeq==0xffff) {
// Set new pending timer.
IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): SET rx timeout timer\n", __func__);
pTS->RxTimeoutIndicateSeq = pTS->RxIndicateSeq;
@@ -783,16 +783,16 @@ static u8 parse_subframe(struct sk_buff *skb,
/* just for debug purpose */
SeqNum = WLAN_GET_SEQ_SEQ(le16_to_cpu(hdr->seq_ctl));
- if((IEEE80211_QOS_HAS_SEQ(fc))&&\
+ if ((IEEE80211_QOS_HAS_SEQ(fc))&&\
(((frameqos *)(skb->data + IEEE80211_3ADDR_LEN))->field.reserved)) {
bIsAggregateFrame = true;
}
- if(IEEE80211_QOS_HAS_SEQ(fc)) {
+ if (IEEE80211_QOS_HAS_SEQ(fc)) {
LLCOffset += 2;
}
- if(rx_stats->bContainHTC) {
+ if (rx_stats->bContainHTC) {
LLCOffset += sHTCLng;
}
//printk("ChkLength = %d\n", LLCOffset);
@@ -826,7 +826,7 @@ static u8 parse_subframe(struct sk_buff *skb,
//==m==>change the length order
nSubframe_Length = (nSubframe_Length>>8) + (nSubframe_Length<<8);
- if(skb->len<(ETHERNET_HEADER_SIZE + nSubframe_Length)) {
+ if (skb->len<(ETHERNET_HEADER_SIZE + nSubframe_Length)) {
printk("%s: A-MSDU parse error!! pRfd->nTotalSubframe : %d\n",\
__func__, rxb->nr_subframes);
printk("%s: A-MSDU parse error!! Subframe Length: %d\n",__func__, nSubframe_Length);
@@ -852,19 +852,19 @@ static u8 parse_subframe(struct sk_buff *skb,
memcpy(data_ptr, skb->data, nSubframe_Length);
#endif
rxb->subframes[rxb->nr_subframes++] = sub_skb;
- if(rxb->nr_subframes >= MAX_SUBFRAME_COUNT) {
+ if (rxb->nr_subframes >= MAX_SUBFRAME_COUNT) {
IEEE80211_DEBUG_RX("ParseSubframe(): Too many Subframes! Packets dropped!\n");
break;
}
skb_pull(skb, nSubframe_Length);
- if(skb->len != 0) {
+ if (skb->len != 0) {
nPadding_Length = 4 - ((nSubframe_Length + ETHERNET_HEADER_SIZE) % 4);
- if(nPadding_Length == 4) {
+ if (nPadding_Length == 4) {
nPadding_Length = 0;
}
- if(skb->len < nPadding_Length) {
+ if (skb->len < nPadding_Length) {
return 0;
}
@@ -938,7 +938,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
frag = WLAN_GET_SEQ_FRAG(sc);
hdrlen = ieee80211_get_hdrlen(fc);
- if(HTCCheck(ieee, skb->data))
+ if (HTCCheck(ieee, skb->data))
{
if(net_ratelimit())
printk("find HTCControl\n");
@@ -1273,13 +1273,13 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
}
*/
//added by amy for reorder
- if(ieee->current_network.qos_data.active && IsQoSDataFrame(skb->data)
+ if (ieee->current_network.qos_data.active && IsQoSDataFrame(skb->data)
&& !is_multicast_ether_addr(hdr->addr1))
{
TID = Frame_QoSTID(skb->data);
SeqNum = WLAN_GET_SEQ_SEQ(sc);
GetTs(ieee,(PTS_COMMON_INFO *) &pTS,hdr->addr2,TID,RX_DIR,true);
- if(TID !=0 && TID !=3)
+ if (TID !=0 && TID !=3)
{
ieee->bis_any_nonbepkts = true;
}
@@ -1289,7 +1289,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
payload = skb->data + hdrlen;
//ethertype = (payload[6] << 8) | payload[7];
rxb = kmalloc(sizeof(struct ieee80211_rxb), GFP_ATOMIC);
- if(rxb == NULL)
+ if (rxb == NULL)
{
IEEE80211_DEBUG(IEEE80211_DL_ERR,"%s(): kmalloc rxb error\n",__func__);
goto rx_dropped;
@@ -1335,7 +1335,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
stats->rx_packets++;
stats->rx_bytes += sub_skb->len;
- if(is_multicast_ether_addr(dst)) {
+ if (is_multicast_ether_addr(dst)) {
stats->multicast++;
}
@@ -1589,14 +1589,14 @@ static inline void ieee80211_extract_country_ie(
u8 *addr2
)
{
- if(IS_DOT11D_ENABLE(ieee))
+ if (IS_DOT11D_ENABLE(ieee))
{
- if(info_element->len!= 0)
+ if (info_element->len!= 0)
{
memcpy(network->CountryIeBuf, info_element->data, info_element->len);
network->CountryIeLen = info_element->len;
- if(!IS_COUNTRY_IE_VALID(ieee))
+ if (!IS_COUNTRY_IE_VALID(ieee))
{
Dot11d_UpdateCountryIe(ieee, addr2, info_element->len, info_element->data);
}
@@ -1607,7 +1607,7 @@ static inline void ieee80211_extract_country_ie(
// some AP (e.g. Cisco 1242) don't include country IE in their
// probe response frame.
//
- if(IS_EQUAL_CIE_SRC(ieee, addr2) )
+ if (IS_EQUAL_CIE_SRC(ieee, addr2) )
{
UPDATE_CIE_WATCHDOG(ieee);
}
@@ -1887,7 +1887,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
//if(tmp_htcap_len !=0 || tmp_htinfo_len != 0)
{
- if((info_element->len >= 3 &&
+ if ((info_element->len >= 3 &&
info_element->data[0] == 0x00 &&
info_element->data[1] == 0x05 &&
info_element->data[2] == 0xb5) ||
@@ -1939,7 +1939,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
else
network->cisco_cap_exist = false;
//added by amy for LEAP of cisco
- if(info_element->len > 4 &&
+ if (info_element->len > 4 &&
info_element->data[0] == 0x00 &&
info_element->data[1] == 0x40 &&
info_element->data[2] == 0x96 &&
@@ -1975,7 +1975,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
network->bCcxRmEnable = false;
}
}
- if(info_element->len > 4 &&
+ if (info_element->len > 4 &&
info_element->data[0] == 0x00 &&
info_element->data[1] == 0x40 &&
info_element->data[2] == 0x96 &&
@@ -2295,7 +2295,7 @@ static inline void update_network(struct ieee80211_network *dst,
dst->rates_len = src->rates_len;
memcpy(dst->rates_ex, src->rates_ex, src->rates_ex_len);
dst->rates_ex_len = src->rates_ex_len;
- if(src->ssid_len > 0)
+ if (src->ssid_len > 0)
{
memset(dst->ssid, 0, dst->ssid_len);
dst->ssid_len = src->ssid_len;
@@ -2351,7 +2351,7 @@ static inline void update_network(struct ieee80211_network *dst,
dst->qos_data.param_count = src->qos_data.param_count;
}
- if(dst->qos_data.supported == 1) {
+ if (dst->qos_data.supported == 1) {
dst->QoS_Enable = 1;
if(dst->ssid_len)
IEEE80211_DEBUG_QOS
@@ -2366,7 +2366,7 @@ static inline void update_network(struct ieee80211_network *dst,
/* dst->last_associate is not overwritten */
dst->wmm_info = src->wmm_info; //sure to exist in beacon or probe response frame.
- if(src->wmm_param[0].ac_aci_acm_aifsn|| \
+ if (src->wmm_param[0].ac_aci_acm_aifsn|| \
src->wmm_param[1].ac_aci_acm_aifsn|| \
src->wmm_param[2].ac_aci_acm_aifsn|| \
src->wmm_param[3].ac_aci_acm_aifsn) {
@@ -2455,7 +2455,7 @@ static inline void ieee80211_process_probe_response(
if (!IsLegalChannel(ieee, network.channel))
return;
- if(ieee->bGlobalDomain)
+ if (ieee->bGlobalDomain)
{
if (WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP)
{
@@ -2471,7 +2471,7 @@ static inline void ieee80211_process_probe_response(
else
{
// Filter over channel ch12~14
- if(network.channel > 11)
+ if (network.channel > 11)
{
printk("GetScanInfo(): For Global Domain, filter probe response at channel(%d).\n", network.channel);
return;
@@ -2492,7 +2492,7 @@ static inline void ieee80211_process_probe_response(
else
{
// Filter over channel ch12~14
- if(network.channel > 14)
+ if (network.channel > 14)
{
printk("GetScanInfo(): For Global Domain, filter beacon at channel(%d).\n",network.channel);
return;
@@ -2513,9 +2513,9 @@ static inline void ieee80211_process_probe_response(
spin_lock_irqsave(&ieee->lock, flags);
- if(is_same_network(&ieee->current_network, &network, ieee)) {
+ if (is_same_network(&ieee->current_network, &network, ieee)) {
update_network(&ieee->current_network, &network);
- if((ieee->current_network.mode == IEEE_N_24G || ieee->current_network.mode == IEEE_G)
+ if ((ieee->current_network.mode == IEEE_N_24G || ieee->current_network.mode == IEEE_G)
&& ieee->current_network.berp_info_valid){
if(ieee->current_network.erp_value& ERP_UseProtection)
ieee->current_network.buseprotection = true;
@@ -2605,7 +2605,7 @@ static inline void ieee80211_process_probe_response(
spin_unlock_irqrestore(&ieee->lock, flags);
if (is_beacon(beacon->header.frame_ctl)&&is_same_network(&ieee->current_network, &network, ieee)&&\
(ieee->state == IEEE80211_LINKED)) {
- if(ieee->handle_beacon != NULL) {
+ if (ieee->handle_beacon != NULL) {
ieee->handle_beacon(ieee->dev,beacon,&ieee->current_network);
}
}