Commit 2c333366 authored by Mike McCormack's avatar Mike McCormack Committed by John W. Linville

rtlwifi: Remove unnecessary indent

Signed-off-by: default avatarMike McCormack <mikem@ring3k.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1d34d108
...@@ -654,128 +654,114 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) ...@@ -654,128 +654,114 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
/*rx pkt */ /*rx pkt */
struct sk_buff *skb = rtlpci->rx_ring[rx_queue_idx].rx_buf[ struct sk_buff *skb = rtlpci->rx_ring[rx_queue_idx].rx_buf[
index]; index];
struct ieee80211_hdr *hdr;
__le16 fc;
struct sk_buff *new_skb = NULL;
own = (u8) rtlpriv->cfg->ops->get_desc((u8 *) pdesc, own = (u8) rtlpriv->cfg->ops->get_desc((u8 *) pdesc,
false, HW_DESC_OWN); false, HW_DESC_OWN);
if (own) { /*wait data to be filled by hardware */
/*wait data to be filled by hardware */ if (own)
break; break;
} else {
struct ieee80211_hdr *hdr;
__le16 fc;
struct sk_buff *new_skb = NULL;
rtlpriv->cfg->ops->query_rx_desc(hw, &stats,
&rx_status,
(u8 *) pdesc, skb);
new_skb = dev_alloc_skb(rtlpci->rxbuffersize);
if (unlikely(!new_skb)) {
RT_TRACE(rtlpriv, (COMP_INTR | COMP_RECV),
DBG_DMESG,
("can't alloc skb for rx\n"));
goto done;
}
pci_unmap_single(rtlpci->pdev, rtlpriv->cfg->ops->query_rx_desc(hw, &stats,
*((dma_addr_t *) skb->cb), &rx_status,
rtlpci->rxbuffersize, (u8 *) pdesc, skb);
PCI_DMA_FROMDEVICE);
new_skb = dev_alloc_skb(rtlpci->rxbuffersize);
if (unlikely(!new_skb)) {
RT_TRACE(rtlpriv, (COMP_INTR | COMP_RECV),
DBG_DMESG,
("can't alloc skb for rx\n"));
goto done;
}
skb_put(skb, rtlpriv->cfg->ops->get_desc((u8 *) pdesc, pci_unmap_single(rtlpci->pdev,
false, *((dma_addr_t *) skb->cb),
HW_DESC_RXPKT_LEN)); rtlpci->rxbuffersize,
skb_reserve(skb, PCI_DMA_FROMDEVICE);
stats.rx_drvinfo_size + stats.rx_bufshift);
/* skb_put(skb, rtlpriv->cfg->ops->get_desc((u8 *) pdesc, false,
*NOTICE This can not be use for mac80211, HW_DESC_RXPKT_LEN));
*this is done in mac80211 code, skb_reserve(skb, stats.rx_drvinfo_size + stats.rx_bufshift);
*if you done here sec DHCP will fail
*skb_trim(skb, skb->len - 4);
*/
hdr = rtl_get_hdr(skb); /*
fc = rtl_get_fc(skb); * NOTICE This can not be use for mac80211,
* this is done in mac80211 code,
* if you done here sec DHCP will fail
* skb_trim(skb, skb->len - 4);
*/
hdr = rtl_get_hdr(skb);
fc = rtl_get_fc(skb);
if (!stats.crc && !stats.hwerror) { if (!stats.crc && !stats.hwerror) {
memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, memcpy(IEEE80211_SKB_RXCB(skb), &rx_status,
sizeof(rx_status)); sizeof(rx_status));
if (is_broadcast_ether_addr(hdr->addr1)) { if (is_broadcast_ether_addr(hdr->addr1)) {
;/*TODO*/ ;/*TODO*/
} else if (is_multicast_ether_addr(hdr->addr1)) { } else if (is_multicast_ether_addr(hdr->addr1)) {
;/*TODO*/ ;/*TODO*/
} else { } else {
unicast = true; unicast = true;
rtlpriv->stats.rxbytesunicast += rtlpriv->stats.rxbytesunicast += skb->len;
skb->len; }
}
rtl_is_special_data(hw, skb, false); rtl_is_special_data(hw, skb, false);
if (ieee80211_is_data(fc)) { if (ieee80211_is_data(fc)) {
rtlpriv->cfg->ops->led_control(hw, rtlpriv->cfg->ops->led_control(hw, LED_CTL_RX);
LED_CTL_RX);
if (unicast) if (unicast)
rtlpriv->link_info. rtlpriv->link_info.num_rx_inperiod++;
num_rx_inperiod++; }
}
/* for sw lps */ /* for sw lps */
rtl_swlps_beacon(hw, (void *)skb->data, rtl_swlps_beacon(hw, (void *)skb->data, skb->len);
skb->len); rtl_recognize_peer(hw, (void *)skb->data, skb->len);
rtl_recognize_peer(hw, (void *)skb->data, if ((rtlpriv->mac80211.opmode == NL80211_IFTYPE_AP) &&
skb->len); (rtlpriv->rtlhal.current_bandtype ==
if ((rtlpriv->mac80211.opmode == BAND_ON_2_4G) &&
NL80211_IFTYPE_AP) && (ieee80211_is_beacon(fc) ||
(rtlpriv->rtlhal.current_bandtype == ieee80211_is_probe_resp(fc))) {
BAND_ON_2_4G) && dev_kfree_skb_any(skb);
(ieee80211_is_beacon(fc) || } else {
ieee80211_is_probe_resp(fc))) { if (unlikely(!rtl_action_proc(hw, skb,
false))) {
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
} else { } else {
if (unlikely(!rtl_action_proc(hw, skb, struct sk_buff *uskb = NULL;
false))) { u8 *pdata;
dev_kfree_skb_any(skb); uskb = dev_alloc_skb(skb->len + 128);
} else { memcpy(IEEE80211_SKB_RXCB(uskb),
struct sk_buff *uskb = NULL; &rx_status, sizeof(rx_status));
u8 *pdata; pdata = (u8 *)skb_put(uskb, skb->len);
uskb = dev_alloc_skb(skb->len memcpy(pdata, skb->data, skb->len);
+ 128); dev_kfree_skb_any(skb);
memcpy(IEEE80211_SKB_RXCB(uskb),
&rx_status, ieee80211_rx_irqsafe(hw, uskb);
sizeof(rx_status));
pdata = (u8 *)skb_put(uskb,
skb->len);
memcpy(pdata, skb->data,
skb->len);
dev_kfree_skb_any(skb);
ieee80211_rx_irqsafe(hw, uskb);
}
} }
} else {
dev_kfree_skb_any(skb);
} }
} else {
dev_kfree_skb_any(skb);
}
if (((rtlpriv->link_info.num_rx_inperiod + if (((rtlpriv->link_info.num_rx_inperiod +
rtlpriv->link_info.num_tx_inperiod) > 8) || rtlpriv->link_info.num_tx_inperiod) > 8) ||
(rtlpriv->link_info.num_rx_inperiod > 2)) { (rtlpriv->link_info.num_rx_inperiod > 2)) {
tasklet_schedule(&rtlpriv->works.ips_leave_tasklet); tasklet_schedule(&rtlpriv->works.ips_leave_tasklet);
} }
skb = new_skb; skb = new_skb;
rtlpci->rx_ring[rx_queue_idx].rx_buf[index] = skb; rtlpci->rx_ring[rx_queue_idx].rx_buf[index] = skb;
*((dma_addr_t *) skb->cb) = *((dma_addr_t *) skb->cb) =
pci_map_single(rtlpci->pdev, skb_tail_pointer(skb), pci_map_single(rtlpci->pdev, skb_tail_pointer(skb),
rtlpci->rxbuffersize, rtlpci->rxbuffersize,
PCI_DMA_FROMDEVICE); PCI_DMA_FROMDEVICE);
}
done: done:
bufferaddress = (*((dma_addr_t *)skb->cb)); bufferaddress = (*((dma_addr_t *)skb->cb));
tmp_one = 1; tmp_one = 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