| 1 |
Only in .: .r8180_core.o.d |
| 2 |
diff -ur ../rtl8180-0.21/ieee80211_tx.c ./ieee80211_tx.c |
| 3 |
--- ../rtl8180-0.21/ieee80211_tx.c 2005-04-12 21:02:17.000000000 +0000 |
| 4 |
+++ ./ieee80211_tx.c 2005-10-12 17:38:19.000000000 +0000 |
| 5 |
@@ -577,6 +577,14 @@ |
| 6 |
|
| 7 |
spin_lock_irqsave(&ieee->lock,flags); |
| 8 |
|
| 9 |
+ if (ieee->iw_mode == IW_MODE_MONITOR) { |
| 10 |
+ ieee->func->hard_data_xmit(ieee->dev,skb,0); |
| 11 |
+ dev_kfree_skb_any(skb); |
| 12 |
+ ieee->stats.tx_packets++; |
| 13 |
+ ieee->dev->trans_start = jiffies; |
| 14 |
+ goto exit; |
| 15 |
+ } |
| 16 |
+ |
| 17 |
if(ieee->queue_stop){ |
| 18 |
IEEE80211DMESG("EE: IEEE hard_start_xmit invoked when kernel queue should be stopped"); |
| 19 |
netif_stop_queue(ieee->dev); |
| 20 |
diff -ur ../rtl8180-0.21/r8180_core.c ./r8180_core.c |
| 21 |
--- ../rtl8180-0.21/r8180_core.c 2005-04-12 12:39:56.000000000 +0000 |
| 22 |
+++ ./r8180_core.c 2005-10-12 17:42:25.000000000 +0000 |
| 23 |
@@ -2204,11 +2204,12 @@ |
| 24 |
void rtl8180_hard_data_xmit(struct net_device *dev,struct sk_buff *skb,short morefrag) |
| 25 |
{ |
| 26 |
struct r8180_priv *priv = (struct r8180_priv *)dev->priv; |
| 27 |
- int mode; |
| 28 |
+ int mode, priority = LOW_PRIORITY; |
| 29 |
//unsigned long flags; |
| 30 |
|
| 31 |
mode = priv->ieee80211->iw_mode; |
| 32 |
- |
| 33 |
+ if( mode == IW_MODE_MONITOR ) |
| 34 |
+ priority = HI_PRIORITY; |
| 35 |
|
| 36 |
/* |
| 37 |
* This function doesn't require lock because we make |
| 38 |
@@ -2220,13 +2221,13 @@ |
| 39 |
//spin_lock_irqsave(&priv->tx_lock,flags); |
| 40 |
|
| 41 |
|
| 42 |
- if (!check_nic_enought_desc(dev, LOW_PRIORITY)){ |
| 43 |
+ if (!check_nic_enought_desc(dev, priority)){ |
| 44 |
DMESG("Error: no descriptor left by previous TX (avail %d) ", |
| 45 |
- get_curr_tx_free_desc(dev, LOW_PRIORITY)); |
| 46 |
+ get_curr_tx_free_desc(dev, priority)); |
| 47 |
ieee80211_r8180_stop_queue(priv->ieee80211); |
| 48 |
} |
| 49 |
- rtl8180_tx(dev, (u32*)skb->data, skb->len, LOW_PRIORITY, morefrag,0); |
| 50 |
- if (!check_nic_enought_desc(dev, LOW_PRIORITY)) |
| 51 |
+ rtl8180_tx(dev, (u32*)skb->data, skb->len, priority, morefrag,0); |
| 52 |
+ if (!check_nic_enought_desc(dev, priority)) |
| 53 |
ieee80211_r8180_stop_queue(priv->ieee80211); |
| 54 |
|
| 55 |
//spin_unlock_irqrestore(&priv->tx_lock,flags); |
| 56 |
@@ -3411,10 +3412,18 @@ |
| 57 |
if (priv->ieee80211->iw_mode == IW_MODE_ADHOC) |
| 58 |
rtl8180_IBSS_create(dev); |
| 59 |
|
| 60 |
-/* if (priv->ieee80211->iw_mode == IW_MODE_MONITOR){ |
| 61 |
+ if (priv->ieee80211->iw_mode == IW_MODE_MONITOR) { |
| 62 |
+ priv->retry_rts = 0; |
| 63 |
+ priv->retry_data = 0; |
| 64 |
+ rtl8180_tx_enable(dev); |
| 65 |
+ |
| 66 |
netif_carrier_on(dev); |
| 67 |
+ if(netif_queue_stopped(dev)) |
| 68 |
+ netif_wake_queue(dev); |
| 69 |
+ else |
| 70 |
+ netif_start_queue(dev); |
| 71 |
} |
| 72 |
-*/ |
| 73 |
+ |
| 74 |
if (priv->ieee80211->iw_mode == IW_MODE_INFRA) { |
| 75 |
|
| 76 |
// rtl8180_tx_enable(dev); |
| 77 |
@@ -3608,8 +3617,7 @@ |
| 78 |
pio_flags = (unsigned long)pci_resource_flags (pdev, 0); |
| 79 |
|
| 80 |
if (!(pio_flags & IORESOURCE_IO)) { |
| 81 |
- DMESG("%s: region #0 not a PIO resource, aborting", |
| 82 |
- pdev->slot_name); |
| 83 |
+ DMESG("r8180: region #0 not a PIO resource, aborting"); |
| 84 |
goto fail; |
| 85 |
} |
| 86 |
|
| 87 |
@@ -3629,8 +3637,7 @@ |
| 88 |
pmem_flags = pci_resource_flags (pdev, 1); |
| 89 |
|
| 90 |
if (!(pmem_flags & IORESOURCE_MEM)) { |
| 91 |
- DMESG("%s: region #1 not a MMIO resource, aborting", |
| 92 |
- pdev->slot_name); |
| 93 |
+ DMESG("r8180: region #1 not a MMIO resource, aborting"); |
| 94 |
goto fail; |
| 95 |
} |
| 96 |
|