From patchwork Fri Dec 18 10:36:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Ortiz X-Patchwork-Id: 68657 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBIAZMXZ015351 for ; Fri, 18 Dec 2009 10:35:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752437AbZLRKfV (ORCPT ); Fri, 18 Dec 2009 05:35:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752382AbZLRKfV (ORCPT ); Fri, 18 Dec 2009 05:35:21 -0500 Received: from mga06.intel.com ([134.134.136.21]:46734 "EHLO orsmga101.jf.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752216AbZLRKfU (ORCPT ); Fri, 18 Dec 2009 05:35:20 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 18 Dec 2009 02:33:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,417,1257148800"; d="scan'208";a="580165504" Received: from unknown (HELO sortiz-mobl) ([10.255.17.41]) by orsmga001.jf.intel.com with ESMTP; 18 Dec 2009 02:34:56 -0800 Date: Fri, 18 Dec 2009 11:36:49 +0100 From: Samuel Ortiz To: linux-wireless@vger.kernel.org, "John W. Linville" Cc: Dan Williams , Holger Schurig Subject: [PATCH] libertas: Remove carrier signaling from the scan code Message-ID: <20091218103649.GA3568@sortiz.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index c6a6c04..b0b1c78 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c @@ -567,11 +567,8 @@ int lbs_scan_networks(struct lbs_private *priv, int full_scan) chan_count = lbs_scan_create_channel_list(priv, chan_list); netif_stop_queue(priv->dev); - netif_carrier_off(priv->dev); - if (priv->mesh_dev) { + if (priv->mesh_dev) netif_stop_queue(priv->mesh_dev); - netif_carrier_off(priv->mesh_dev); - } /* Prepare to continue an interrupted scan */ lbs_deb_scan("chan_count %d, scan_channel %d\n", @@ -635,16 +632,13 @@ out2: priv->scan_channel = 0; out: - if (priv->connect_status == LBS_CONNECTED) { - netif_carrier_on(priv->dev); - if (!priv->tx_pending_len) - netif_wake_queue(priv->dev); - } - if (priv->mesh_dev && (priv->mesh_connect_status == LBS_CONNECTED)) { - netif_carrier_on(priv->mesh_dev); - if (!priv->tx_pending_len) - netif_wake_queue(priv->mesh_dev); - } + if (priv->connect_status == LBS_CONNECTED && !priv->tx_pending_len) + netif_wake_queue(priv->dev); + + if (priv->mesh_dev && (priv->mesh_connect_status == LBS_CONNECTED) && + !priv->tx_pending_len) + netif_wake_queue(priv->mesh_dev); + kfree(chan_list); lbs_deb_leave_args(LBS_DEB_SCAN, "ret %d", ret);