From patchwork Mon Sep 27 08:37:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luciano Coelho X-Patchwork-Id: 211402 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8R8dIRd015241 for ; Mon, 27 Sep 2010 08:39:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932879Ab0I0IjR (ORCPT ); Mon, 27 Sep 2010 04:39:17 -0400 Received: from smtp.nokia.com ([192.100.105.134]:17067 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932844Ab0I0IjP (ORCPT ); Mon, 27 Sep 2010 04:39:15 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o8R8d5dI026506 for ; Mon, 27 Sep 2010 03:39:14 -0500 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 27 Sep 2010 11:38:01 +0300 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 27 Sep 2010 11:38:00 +0300 Received: from localhost.localdomain (chilepepper.research.nokia.com [172.21.50.167]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o8R8boh2022566 for ; Mon, 27 Sep 2010 11:37:58 +0300 From: Luciano Coelho To: linux-wireless@vger.kernel.org Subject: [PATCH 06/25] wl1271: fix forced passive scan Date: Mon, 27 Sep 2010 11:37:30 +0300 Message-Id: <1285576669-8070-7-git-send-email-luciano.coelho@nokia.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1285576669-8070-1-git-send-email-luciano.coelho@nokia.com> References: <1285576669-8070-1-git-send-email-luciano.coelho@nokia.com> X-OriginalArrivalTime: 27 Sep 2010 08:38:00.0476 (UTC) FILETIME=[4AF505C0:01CB5E1F] X-Nokia-AV: Clean Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 27 Sep 2010 08:39:18 +0000 (UTC) diff --git a/drivers/net/wireless/wl12xx/wl1271_scan.c b/drivers/net/wireless/wl12xx/wl1271_scan.c index 8ceaabe..7f42ca9 100644 --- a/drivers/net/wireless/wl12xx/wl1271_scan.c +++ b/drivers/net/wireless/wl12xx/wl1271_scan.c @@ -100,8 +100,11 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band, /* We always use high priority scans */ scan_options = WL1271_SCAN_OPT_PRIORITY_HIGH; - if(passive) + + /* No SSIDs means that we have a forced passive scan */ + if (passive || wl->scan.req->n_ssids == 0) scan_options |= WL1271_SCAN_OPT_PASSIVE; + cmd->params.scan_options = cpu_to_le16(scan_options); cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req,