From patchwork Fri Nov 30 09:29:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Chaitanya X-Patchwork-Id: 1824211 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 8DA81DF24C for ; Fri, 30 Nov 2012 09:29:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932200Ab2K3J3f (ORCPT ); Fri, 30 Nov 2012 04:29:35 -0500 Received: from mail-ie0-f174.google.com ([209.85.223.174]:42765 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258Ab2K3J3d (ORCPT ); Fri, 30 Nov 2012 04:29:33 -0500 Received: by mail-ie0-f174.google.com with SMTP id c11so316033ieb.19 for ; Fri, 30 Nov 2012 01:29:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=KqFMT3/o1ANXo02yb56wEtKuu/oYWUbRWv+MOyFhU94=; b=A26OcMsDUrdrAtk8tshMLUReP54lWhOfBMt41d+L1iHyUNIwXaEA4PvNSJ3oaMpR9Z LefdQ3JBj+JuHbEZBP7fyzQmuwSCZjVaQWa5/9TJQb9mCNQ4tkA8wQt/3v9xJHzn+nY1 /Q5awo8+L3qtoioZz3G9NkZsohHA/o2p8H6uTUGHKmpRGCyIpcwehynIeRpNZk5rFZ0p qYfFWsq2gN8TX4mJH9HCSmqRXt0iaRDwJ91ZlK6gNI6QzXiwOgKsvUQBQtB+AHrp8K7T AMyhCdnUTr4Ijh3JuVW7XKZYSN8xO31zvW+oHwXowMmmVYFR9TTyo+jxurSy7vtXm6qh RYYQ== Received: by 10.50.153.169 with SMTP id vh9mr445532igb.67.1354267773207; Fri, 30 Nov 2012 01:29:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.35.138 with HTTP; Fri, 30 Nov 2012 01:29:12 -0800 (PST) From: Krishna Chaitanya Date: Fri, 30 Nov 2012 14:59:12 +0530 Message-ID: Subject: [PATCH] iwl4965:Fixing Broken Monitor Mode Functionality To: johannes@sipsolutions.net Cc: linux-wireless , maheshp@posedge.com, chaitanyatk@posedge.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- drivers/net/wireless/iwlegacy/4965-mac.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 =