Search Linux Wireless

[PATCH] iwl4965:Fixing Broken Monitor Mode Functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From the patch  "90b9e446fbb64630c72cab48c007d7081aec2533: mac80211:
support radiotap vendor namespace RX data"
the monitor mode functionality in iwl4965 stopped working, because of
below issues

1) The driver doesnt fill the newly added fields in the ieee80211_rx_status
and also doesn't do a memset leading to junk values.

ieee80211_rx_monitor:

"pskb_may_pull(origskb, 2 + status->vendor_radiotap_len)" the pull
fails because of junk value in vendor_radiotap_len.
And all the frames are dropped.

2) We also see a kernel trace in

ieee80211_rx_radiotap_space:
        if (status->vendor_radiotap_len) {
                if (WARN_ON_ONCE(status->vendor_radiotap_align == 0))

This patch fixed both the issues, this is tested with iwl4965 intel
wireless nic.

Signed-off-by: Chaitanya T K<chaitanya.mgit@xxxxxxxxx>
---

 drivers/net/wireless/iwlegacy/4965-mac.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c
b/drivers/net/wireless/iwlegacy/4965-mac.c
index ef68b72..d4b801e 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -671,6 +671,16 @@ il4965_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb)
        /* This will be used in several places later */
        rate_n_flags = le32_to_cpu(phy_res->rate_n_flags);

+        /* To Avoid Junk values to mac80211 causing the frames
+        * to drop when NIC is on monitor mode:wireshark doesnt work
+         * This came in to light with the patch from
+         * johannes "support radiotap vendor namespace RX data"
+         * which introduced 2 more  entries to the rx_stats struct,
+         * but as the driver is not configuring those, they become
+         * junk when accessed at mac80211.
+         */
+        memset(&rx_status,0,sizeof(rx_status));
+
        /* rx_status carries information about the packet to mac80211 */
        rx_status.mactime = le64_to_cpu(phy_res->timestamp);
        rx_status.band =
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux