rtl8180-0.21.patch
上传用户:fubang
上传日期:2009-06-18
资源大小:2071k
文件大小:3k
- Only in .: .r8180_core.o.d
- diff -ur ../rtl8180-0.21/ieee80211_tx.c ./ieee80211_tx.c
- --- ../rtl8180-0.21/ieee80211_tx.c 2005-04-12 21:02:17.000000000 +0000
- +++ ./ieee80211_tx.c 2005-10-12 17:38:19.000000000 +0000
- @@ -577,6 +577,14 @@
-
- spin_lock_irqsave(&ieee->lock,flags);
-
- + if (ieee->iw_mode == IW_MODE_MONITOR) {
- + ieee->func->hard_data_xmit(ieee->dev,skb,0);
- + dev_kfree_skb_any(skb);
- + ieee->stats.tx_packets++;
- + ieee->dev->trans_start = jiffies;
- + goto exit;
- + }
- +
- if(ieee->queue_stop){
- IEEE80211DMESG("EE: IEEE hard_start_xmit invoked when kernel queue should be stopped");
- netif_stop_queue(ieee->dev);
- diff -ur ../rtl8180-0.21/r8180_core.c ./r8180_core.c
- --- ../rtl8180-0.21/r8180_core.c 2005-04-12 12:39:56.000000000 +0000
- +++ ./r8180_core.c 2005-10-12 17:42:25.000000000 +0000
- @@ -2204,11 +2204,12 @@
- void rtl8180_hard_data_xmit(struct net_device *dev,struct sk_buff *skb,short morefrag)
- {
- struct r8180_priv *priv = (struct r8180_priv *)dev->priv;
- - int mode;
- + int mode, priority = LOW_PRIORITY;
- //unsigned long flags;
-
- mode = priv->ieee80211->iw_mode;
- -
- + if( mode == IW_MODE_MONITOR )
- + priority = HI_PRIORITY;
-
- /*
- * This function doesn't require lock because we make
- @@ -2220,13 +2221,13 @@
- //spin_lock_irqsave(&priv->tx_lock,flags);
-
-
- - if (!check_nic_enought_desc(dev, LOW_PRIORITY)){
- + if (!check_nic_enought_desc(dev, priority)){
- DMESG("Error: no descriptor left by previous TX (avail %d) ",
- - get_curr_tx_free_desc(dev, LOW_PRIORITY));
- + get_curr_tx_free_desc(dev, priority));
- ieee80211_r8180_stop_queue(priv->ieee80211);
- }
- - rtl8180_tx(dev, (u32*)skb->data, skb->len, LOW_PRIORITY, morefrag,0);
- - if (!check_nic_enought_desc(dev, LOW_PRIORITY))
- + rtl8180_tx(dev, (u32*)skb->data, skb->len, priority, morefrag,0);
- + if (!check_nic_enought_desc(dev, priority))
- ieee80211_r8180_stop_queue(priv->ieee80211);
-
- //spin_unlock_irqrestore(&priv->tx_lock,flags);
- @@ -3411,10 +3412,18 @@
- if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
- rtl8180_IBSS_create(dev);
-
- -/* if (priv->ieee80211->iw_mode == IW_MODE_MONITOR){
- + if (priv->ieee80211->iw_mode == IW_MODE_MONITOR) {
- + priv->retry_rts = 0;
- + priv->retry_data = 0;
- + rtl8180_tx_enable(dev);
- +
- netif_carrier_on(dev);
- + if(netif_queue_stopped(dev))
- + netif_wake_queue(dev);
- + else
- + netif_start_queue(dev);
- }
- -*/
- +
- if (priv->ieee80211->iw_mode == IW_MODE_INFRA) {
-
- // rtl8180_tx_enable(dev);
- @@ -3608,8 +3617,7 @@
- pio_flags = (unsigned long)pci_resource_flags (pdev, 0);
-
- if (!(pio_flags & IORESOURCE_IO)) {
- - DMESG("%s: region #0 not a PIO resource, aborting",
- - pdev->slot_name);
- + DMESG("r8180: region #0 not a PIO resource, aborting");
- goto fail;
- }
-
- @@ -3629,8 +3637,7 @@
- pmem_flags = pci_resource_flags (pdev, 1);
-
- if (!(pmem_flags & IORESOURCE_MEM)) {
- - DMESG("%s: region #1 not a MMIO resource, aborting",
- - pdev->slot_name);
- + DMESG("r8180: region #1 not a MMIO resource, aborting");
- goto fail;
- }
-