From patchwork Wed Dec 2 14:26:03 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Schurig X-Patchwork-Id: 64284 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB2EUP3O007981 for ; Wed, 2 Dec 2009 14:30:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754658AbZLBOaR (ORCPT ); Wed, 2 Dec 2009 09:30:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754648AbZLBOaR (ORCPT ); Wed, 2 Dec 2009 09:30:17 -0500 Received: from mail-bw0-f227.google.com ([209.85.218.227]:65310 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754643AbZLBOaP (ORCPT ); Wed, 2 Dec 2009 09:30:15 -0500 Received: by mail-bw0-f227.google.com with SMTP id 27so217224bwz.21 for ; Wed, 02 Dec 2009 06:30:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:message-id :references:user-agent:date:from:to:subject:content-disposition; bh=Wf9FnlbnOv7JlXLmtpbEvdsdLm6ZQwlEhh+TaYpsmEc=; b=Awwnp4L3DTwlJ85kv8nXQ7AyVByNh8LZLT76wuvnj1tYuKFxavpjUsIrNkdnCnesX0 eVQCHdTFdC4G8fYSFFimqaMkNR1RUZhvoZsIicm9dpKW1fxYssTQye+Vdeps1+g5PvDy 5zEbnkVDah05/BUhmkt/xkWTrElzObEmEc8yY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:references:user-agent:date:from:to:subject :content-disposition; b=oOdv1BCu9a8rSw237tuupL95fUq0lZZ/UpgPOKd6SILgkgmCM8wFTOx/dGgCqvBEN5 4w/vHXugWeOzcQu4sYpvQslnUrr3BEdwrDLGHPyupSKLsSJ+8MxzI25Hq7Dz6sQSW18H RJvYukY5Db9CHRjRnNzaSnrWRycvRdOftpYg4= Received: by 10.204.11.18 with SMTP id r18mr224240bkr.15.1259764221972; Wed, 02 Dec 2009 06:30:21 -0800 (PST) Received: from holgerschurig@gmail.com (pD95FA93E.dip0.t-ipconnect.de [217.95.169.62]) by mx.google.com with ESMTPS id 16sm336015bwz.7.2009.12.02.06.30.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 02 Dec 2009 06:30:21 -0800 (PST) Received: by holgerschurig@gmail.com (sSMTP sendmail emulation); Wed, 02 Dec 2009 15:29:48 +0100 Message-Id: <20091202142948.722150433@gmail.com> References: <20091202142555.654873300@gmail.com> User-Agent: quilt/0.46-1 Date: Wed, 02 Dec 2009 15:26:03 +0100 From: Holger Schurig To: John Linville , linux-wireless@vger.kernel.org, Dan Williams Subject: [PATCH 08/10] libertas: remove priv->capability Content-Disposition: inline; filename=lbs-priv-capability.patch Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --- linux-wl.orig/drivers/net/wireless/libertas/dev.h +++ linux-wl/drivers/net/wireless/libertas/dev.h @@ -175,7 +175,6 @@ struct lbs_private { struct bss_descriptor *networks; struct assoc_request * pending_assoc_req; struct assoc_request * in_progress_assoc_req; - u16 capability; uint16_t enablehwauto; uint16_t ratebitmap; --- linux-wl.orig/drivers/net/wireless/libertas/assoc.c +++ linux-wl/drivers/net/wireless/libertas/assoc.c @@ -807,8 +807,7 @@ static int lbs_try_associate(struct lbs_ } /* Use short preamble only when both the BSS and firmware support it */ - if ((priv->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) && - (assoc_req->bss.capability & WLAN_CAPABILITY_SHORT_PREAMBLE)) + if (assoc_req->bss.capability & WLAN_CAPABILITY_SHORT_PREAMBLE) preamble = RADIO_PREAMBLE_SHORT; ret = lbs_set_radio(priv, preamble, 1); @@ -939,8 +938,7 @@ static int lbs_adhoc_join(struct lbs_pri } /* Use short preamble only when both the BSS and firmware support it */ - if ((priv->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) && - (bss->capability & WLAN_CAPABILITY_SHORT_PREAMBLE)) { + if (bss->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) { lbs_deb_join("AdhocJoin: Short preamble\n"); preamble = RADIO_PREAMBLE_SHORT; } @@ -1049,7 +1047,7 @@ static int lbs_adhoc_start(struct lbs_pr struct assoc_request *assoc_req) { struct cmd_ds_802_11_ad_hoc_start cmd; - u8 preamble = RADIO_PREAMBLE_LONG; + u8 preamble = RADIO_PREAMBLE_SHORT; size_t ratesize = 0; u16 tmpcap = 0; int ret = 0; @@ -1057,11 +1055,6 @@ static int lbs_adhoc_start(struct lbs_pr lbs_deb_enter(LBS_DEB_ASSOC); - if (priv->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) { - lbs_deb_join("ADHOC_START: Will use short preamble\n"); - preamble = RADIO_PREAMBLE_SHORT; - } - ret = lbs_set_radio(priv, preamble, 1); if (ret) goto out; --- linux-wl.orig/drivers/net/wireless/libertas/cmd.c +++ linux-wl/drivers/net/wireless/libertas/cmd.c @@ -842,9 +842,6 @@ int lbs_set_radio(struct lbs_private *pr if (priv->fwrelease < 0x09000000) { switch (preamble) { case RADIO_PREAMBLE_SHORT: - if (!(priv->capability & WLAN_CAPABILITY_SHORT_PREAMBLE)) - goto out; - /* Fall through */ case RADIO_PREAMBLE_AUTO: case RADIO_PREAMBLE_LONG: cmd.control = cpu_to_le16(preamble); --- linux-wl.orig/drivers/net/wireless/libertas/main.c +++ linux-wl/drivers/net/wireless/libertas/main.c @@ -839,7 +839,6 @@ static int lbs_init_adapter(struct lbs_p priv->mac_control = CMD_ACT_MAC_RX_ON | CMD_ACT_MAC_TX_ON; priv->radio_on = 1; priv->enablehwauto = 1; - priv->capability = WLAN_CAPABILITY_SHORT_PREAMBLE; priv->psmode = LBS802_11POWERMODECAM; priv->psstate = PS_STATE_FULL_POWER; priv->is_deep_sleep = 0;