From patchwork Fri Feb 26 20:12:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jouni Malinen X-Patchwork-Id: 8441641 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 33A719F88A for ; Fri, 26 Feb 2016 20:13:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5FD79203AD for ; Fri, 26 Feb 2016 20:13:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 689C0203AB for ; Fri, 26 Feb 2016 20:13:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030230AbcBZUNU (ORCPT ); Fri, 26 Feb 2016 15:13:20 -0500 Received: from wolverine02.qualcomm.com ([199.106.114.251]:55120 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932880AbcBZUNS (ORCPT ); Fri, 26 Feb 2016 15:13:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1456517598; x=1488053598; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=mGRs/Sx597f5dqYpWvjhDPWH5rIvinisIsKThQEHx5A=; b=wFRXFlOT9CxD+iUEKntUimi1tDiYnaG5uid6Sc/DDjUID291/LhWTGy/ tN8gp2CkgmS2ZHzGtlbx4IEuWoRbzTSkvJ3uh6Ighy8l039Xgcd/LgHJh iD2pNaEaiuenHQZNJ9A2ramTs3e8x76PsPvEfs4p139+YEn1PDIjODBVB I=; X-IronPort-AV: E=Sophos;i="5.22,504,1449561600"; d="scan'208";a="266584352" Received: from unknown (HELO Ironmsg04-L.qualcomm.com) ([10.53.140.111]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 26 Feb 2016 12:13:18 -0800 X-IronPort-AV: E=McAfee;i="5700,7163,8087"; a="1071565373" Received: from nasanexm02b.na.qualcomm.com ([10.85.0.42]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 26 Feb 2016 12:13:17 -0800 Received: from euamsexm01e.eu.qualcomm.com (10.251.127.42) by nasanexm02b.na.qualcomm.com (10.85.0.42) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Fri, 26 Feb 2016 12:13:17 -0800 Received: from jouni.qca.qualcomm.com (10.80.80.8) by euamsexm01e.eu.qualcomm.com (10.251.127.42) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Fri, 26 Feb 2016 21:13:12 +0100 From: Jouni Malinen To: Johannes Berg CC: Subject: [PATCH v2 2/3] mac80211: Support a scan request for a specific BSSID Date: Fri, 26 Feb 2016 22:12:48 +0200 Message-ID: <1456517569-27235-2-git-send-email-jouni@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456517569-27235-1-git-send-email-jouni@qca.qualcomm.com> References: <1456517569-27235-1-git-send-email-jouni@qca.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01C.na.qualcomm.com (10.85.0.83) To euamsexm01e.eu.qualcomm.com (10.251.127.42) 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 If the cfg80211 scan trigger operation specifies a single BSSID, use that value instead of the wildcard BSSID in the Probe Request frames. Signed-off-by: Jouni Malinen --- Notes: v2: Fix bssid setting for hw_scan net/mac80211/scan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index ae980ce..70f9d5a 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -303,6 +303,7 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local) ether_addr_copy(local->hw_scan_req->req.mac_addr, req->mac_addr); ether_addr_copy(local->hw_scan_req->req.mac_addr_mask, req->mac_addr_mask); + ether_addr_copy(local->hw_scan_req->req.bssid, req->bssid); return true; } @@ -497,7 +498,7 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local, for (i = 0; i < scan_req->n_ssids; i++) ieee80211_send_probe_req( - sdata, local->scan_addr, NULL, + sdata, local->scan_addr, scan_req->bssid, scan_req->ssids[i].ssid, scan_req->ssids[i].ssid_len, scan_req->ie, scan_req->ie_len, scan_req->rates[band], false, @@ -562,6 +563,7 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, req->n_channels * sizeof(req->channels[0]); local->hw_scan_req->req.ie = ies; local->hw_scan_req->req.flags = req->flags; + eth_broadcast_addr(local->hw_scan_req->req.bssid); local->hw_scan_band = 0;