From patchwork Mon Mar 7 07:12:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 8515821 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 639909F46A for ; Mon, 7 Mar 2016 07:12:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 925612014A for ; Mon, 7 Mar 2016 07:12:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7D54220148 for ; Mon, 7 Mar 2016 07:12:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752060AbcCGHMn (ORCPT ); Mon, 7 Mar 2016 02:12:43 -0500 Received: from wolverine02.qualcomm.com ([199.106.114.251]:40209 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751641AbcCGHMm (ORCPT ); Mon, 7 Mar 2016 02:12:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1457334762; x=1488870762; h=from:to:cc:subject:date:message-id:mime-version; bh=+C6PLAKOaCapH/S94s9MfsWamFV1huz2CyN0JnlHWLA=; b=hrGDUg/NOfwF6P6l2cmIvyEqa2Tfo7BKNMJ1RYXmTNlbUg01OMDjA9QI gD3kRdDKgSduv5MinvsMBxeZXlmCsCYc20WAzQksqwLaMV8me1udySm1H 7P1Zawl47uULnZgxTeVdS50TEAvx76trJIean3rvyUEfvMjkzZXtTH++2 w=; X-IronPort-AV: E=Sophos;i="5.22,550,1449561600"; d="scan'208";a="269097971" Received: from ironmsg02-r-new.qualcomm.com (HELO ironmsg02-R.qualcomm.com) ([10.53.140.106]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Mar 2016 23:12:41 -0800 X-IronPort-AV: E=McAfee;i="5700,7163,8096"; a="684366533" Received: from nasanexm01d.na.qualcomm.com ([10.85.0.84]) by ironmsg02-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 06 Mar 2016 23:12:41 -0800 Received: from aphydexm01a.ap.qualcomm.com (10.252.127.10) by NASANEXM01D.na.qualcomm.com (10.85.0.84) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Sun, 6 Mar 2016 23:12:40 -0800 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01a.ap.qualcomm.com (10.252.127.10) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Mon, 7 Mar 2016 12:42:32 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Mon, 07 Mar 2016 12:42:24 +0530 From: Vasanthakumar Thiagarajan To: CC: , Vasanthakumar Thiagarajan Subject: [PATCH] mac80211: Allow probe response frame rx to user space in AP mode Date: Mon, 7 Mar 2016 12:42:11 +0530 Message-ID: <1457334731-6456-1-git-send-email-vthiagar@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To aphydexm01a.ap.qualcomm.com (10.252.127.10) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Especially during off-channel scan user space might be interested in probe reponse frames along with beacon to build a list of preferred channel and bssid which could be sent to the stations around for better spectrum management. Do not drop probe response frame in AP mode and advertise driver's capability to receive probe response frame in AP mode to user space. Signed-off-by: Vasanthakumar Thiagarajan --- net/mac80211/main.c | 2 ++ net/mac80211/rx.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 8190bf2..c8a97da 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -401,6 +401,7 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = { .rx = BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) | BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) | BIT(IEEE80211_STYPE_PROBE_REQ >> 4) | + BIT(IEEE80211_STYPE_PROBE_RESP >> 4) | BIT(IEEE80211_STYPE_DISASSOC >> 4) | BIT(IEEE80211_STYPE_AUTH >> 4) | BIT(IEEE80211_STYPE_DEAUTH >> 4) | @@ -412,6 +413,7 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = { .rx = BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) | BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) | BIT(IEEE80211_STYPE_PROBE_REQ >> 4) | + BIT(IEEE80211_STYPE_PROBE_RESP >> 4) | BIT(IEEE80211_STYPE_DISASSOC >> 4) | BIT(IEEE80211_STYPE_AUTH >> 4) | BIT(IEEE80211_STYPE_DEAUTH >> 4) | diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 9127957..9d8f8ea 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3464,6 +3464,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx) return false; if (ieee80211_is_public_action(hdr, skb->len)) return true; + if (ieee80211_is_probe_resp(hdr->frame_control)) + return true; return ieee80211_is_beacon(hdr->frame_control); }