Commit 61ead61f authored by Teodora Baluta's avatar Teodora Baluta Committed by Greg Kroah-Hartman

staging: rtl8187se: fix checkpatch space and tab warnings

This patch fixes checkpatch issues regarding space and tab like:

WARNING: please, no spaces at the start of a line
ERROR: code indent should use tabs where possible
WARNING: suspect code indent for conditional statements (2, 4)
ERROR: space required before the open parenthesis '('
ERROR: space required after that ',' (ctx:VxO)
Signed-off-by: default avatarTeodora Baluta <teobaluta@gmail.com>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f70c8a91
...@@ -279,12 +279,12 @@ ieee80211_classify(struct sk_buff *skb, struct ieee80211_network *network) ...@@ -279,12 +279,12 @@ ieee80211_classify(struct sk_buff *skb, struct ieee80211_network *network)
struct ether_header *eh = (struct ether_header *)skb->data; struct ether_header *eh = (struct ether_header *)skb->data;
unsigned int wme_UP = 0; unsigned int wme_UP = 0;
if(!network->QoS_Enable) { if (!network->QoS_Enable) {
skb->priority = 0; skb->priority = 0;
return(wme_UP); return(wme_UP);
} }
if(eh->ether_type == __constant_htons(ETHERTYPE_IP)) { if (eh->ether_type == __constant_htons(ETHERTYPE_IP)) {
const struct iphdr *ih = (struct iphdr *)(skb->data + \ const struct iphdr *ih = (struct iphdr *)(skb->data + \
sizeof(struct ether_header)); sizeof(struct ether_header));
wme_UP = (ih->tos >> 5)&0x07; wme_UP = (ih->tos >> 5)&0x07;
...@@ -295,7 +295,7 @@ ieee80211_classify(struct sk_buff *skb, struct ieee80211_network *network) ...@@ -295,7 +295,7 @@ ieee80211_classify(struct sk_buff *skb, struct ieee80211_network *network)
#endif #endif
u32 tag = vlan_tx_tag_get(skb); u32 tag = vlan_tx_tag_get(skb);
wme_UP = (tag >> VLAN_PRI_SHIFT) & VLAN_PRI_MASK; wme_UP = (tag >> VLAN_PRI_SHIFT) & VLAN_PRI_MASK;
} else if(ETH_P_PAE == ntohs(((struct ethhdr *)skb->data)->h_proto)) { } else if (ETH_P_PAE == ntohs(((struct ethhdr *)skb->data)->h_proto)) {
wme_UP = 7; wme_UP = 7;
} }
...@@ -331,15 +331,17 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, ...@@ -331,15 +331,17 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
* If there is no driver handler to take the TXB, don't bother * If there is no driver handler to take the TXB, don't bother
* creating it... * creating it...
*/ */
if ((!ieee->hard_start_xmit && !(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE))|| if ((!ieee->hard_start_xmit &&
((!ieee->softmac_data_hard_start_xmit && (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)))) { !(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)) ||
((!ieee->softmac_data_hard_start_xmit &&
(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)))) {
printk(KERN_WARNING "%s: No xmit handler.\n", printk(KERN_WARNING "%s: No xmit handler.\n",
ieee->dev->name); ieee->dev->name);
goto success; goto success;
} }
ieee80211_classify(skb,&ieee->current_network); ieee80211_classify(skb,&ieee->current_network);
if(likely(ieee->raw_tx == 0)){ if (likely(ieee->raw_tx == 0)){
if (unlikely(skb->len < SNAP_SIZE + sizeof(u16))) { if (unlikely(skb->len < SNAP_SIZE + sizeof(u16))) {
printk(KERN_WARNING "%s: skb too small (%d).\n", printk(KERN_WARNING "%s: skb too small (%d).\n",
...@@ -379,7 +381,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, ...@@ -379,7 +381,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
/* Determine total amount of storage required for TXB packets */ /* Determine total amount of storage required for TXB packets */
bytes = skb->len + SNAP_SIZE + sizeof(u16); bytes = skb->len + SNAP_SIZE + sizeof(u16);
if(ieee->current_network.QoS_Enable) { if (ieee->current_network.QoS_Enable) {
if (encrypt) if (encrypt)
fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_DATA | fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_DATA |
IEEE80211_FCTL_WEP; IEEE80211_FCTL_WEP;
...@@ -490,7 +492,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, ...@@ -490,7 +492,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
/* The last fragment takes the remaining length */ /* The last fragment takes the remaining length */
bytes = bytes_last_frag; bytes = bytes_last_frag;
} }
if(ieee->current_network.QoS_Enable) { if (ieee->current_network.QoS_Enable) {
/* /*
* add 1 only indicate to corresponding seq number * add 1 only indicate to corresponding seq number
* control 2006/7/12 * control 2006/7/12
...@@ -536,7 +538,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, ...@@ -536,7 +538,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
else else
ieee->seq_ctrl[0]++; ieee->seq_ctrl[0]++;
} }
}else{ } else {
if (unlikely(skb->len < sizeof(struct ieee80211_hdr_3addr))) { if (unlikely(skb->len < sizeof(struct ieee80211_hdr_3addr))) {
printk(KERN_WARNING "%s: skb too small (%d).\n", printk(KERN_WARNING "%s: skb too small (%d).\n",
ieee->dev->name, skb->len); ieee->dev->name, skb->len);
...@@ -544,7 +546,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, ...@@ -544,7 +546,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
} }
txb = ieee80211_alloc_txb(1, skb->len, GFP_ATOMIC); txb = ieee80211_alloc_txb(1, skb->len, GFP_ATOMIC);
if(!txb){ if (!txb) {
printk(KERN_WARNING "%s: Could not allocate TXB\n", printk(KERN_WARNING "%s: Could not allocate TXB\n",
ieee->dev->name); ieee->dev->name);
goto failed; goto failed;
...@@ -552,16 +554,16 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, ...@@ -552,16 +554,16 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
txb->encrypted = 0; txb->encrypted = 0;
txb->payload_size = skb->len; txb->payload_size = skb->len;
memcpy(skb_put(txb->fragments[0],skb->len), skb->data, skb->len); memcpy(skb_put(txb->fragments[0], skb->len), skb->data, skb->len);
} }
success: success:
spin_unlock_irqrestore(&ieee->lock, flags); spin_unlock_irqrestore(&ieee->lock, flags);
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
if (txb) { if (txb) {
if (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE){ if (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE) {
ieee80211_softmac_xmit(txb, ieee); ieee80211_softmac_xmit(txb, ieee);
}else{ } else {
if ((*ieee->hard_start_xmit)(txb, dev) == 0) { if ((*ieee->hard_start_xmit)(txb, dev) == 0) {
stats->tx_packets++; stats->tx_packets++;
stats->tx_bytes += txb->payload_size; stats->tx_bytes += txb->payload_size;
......
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