From patchwork Fri Jan 21 02:59:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith Manoharan X-Patchwork-Id: 493561 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 p0L305pY004174 for ; Fri, 21 Jan 2011 03:00:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751515Ab1AUDAD (ORCPT ); Thu, 20 Jan 2011 22:00:03 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:40986 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750856Ab1AUDAC (ORCPT ); Thu, 20 Jan 2011 22:00:02 -0500 Received: by mail-iy0-f174.google.com with SMTP id 18so1245111iyj.19 for ; Thu, 20 Jan 2011 19:00:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:x-mailer:cc:subject; bh=Ig6wDU5gF4DegtEg1ctraKzerBuaifv33SMa2miGlo4=; b=IkYIUgNKRxvWsbZxxDkYdigRwlCucT1mO5Vskp+W1/ZqnPCgxz7Pl1ExQjdg3bMf/S +YltiEK/lqb3hk1Z583IBX2F/joesUYfTpMkTz7zLE7iKbk1qDhugs3uLk0vxSTN7yBl mus/Trk1V1prtytvZALUl7d0BkCPO4YTm1M9g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:content-transfer-encoding:message-id :date:to:x-mailer:cc:subject; b=WoxE+Ohd6EuhGXNQ0KgFfpwSEMgmaxzlsPAcEsfXvrkmM2/kK8bwdsg/6WxQgpiI9f DmiEiBK7RCn7HKahoBMgEIw04zUNeT+581SX56EcdhZlbr7vSvfZKubQc7EYfqzEs4vG KhFtupwieAp5RyADWGyknfalpGoy2NPUyIevk= Received: by 10.42.164.9 with SMTP id e9mr108916icy.5.1295578802561; Thu, 20 Jan 2011 19:00:02 -0800 (PST) Received: from bodhi ([117.205.82.212]) by mx.google.com with ESMTPS id g4sm5692078ick.23.2011.01.20.18.59.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 20 Jan 2011 19:00:01 -0800 (PST) From: Sujith MIME-Version: 1.0 Message-ID: <19768.63108.720163.333915@gargle.gargle.HOWL> Date: Fri, 21 Jan 2011 08:29:16 +0530 To: linux-wireless@vger.kernel.org X-Mailer: VM 8.1.1 under 23.2.1 (x86_64-unknown-linux-gnu) CC: ath9k-devel@venema.h4ckr.net Subject: [RFC/WIP 02/33] ath9k_htc: Unify target capability updation 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.6 (demeter1.kernel.org [140.211.167.41]); Fri, 21 Jan 2011 03:00:05 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index e8e512a..c960330 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c @@ -327,15 +327,6 @@ static int ath9k_htc_add_monitor_interface(struct ath9k_htc_priv *priv) priv->sta_slot |= (1 << sta_idx); priv->nstations++; - - /* - * Set chainmask etc. on the target. - */ - ret = ath9k_htc_update_cap_target(priv); - if (ret) - ath_dbg(common, ATH_DBG_CONFIG, - "Failed to update capability in target\n"); - priv->vif_sta_pos[priv->mon_vif_idx] = sta_idx; priv->ah->is_monitoring = true; @@ -1058,6 +1049,11 @@ static int ath9k_htc_start(struct ieee80211_hw *hw) ath9k_host_rx_init(priv); + ret = ath9k_htc_update_cap_target(priv); + if (ret) + ath_dbg(common, ATH_DBG_CONFIG, + "Failed to update capability in target\n"); + priv->op_flags &= ~OP_INVALID; htc_start(priv->htc); @@ -1180,11 +1176,6 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw, if (ret) goto out; - ret = ath9k_htc_update_cap_target(priv); - if (ret) - ath_dbg(common, ATH_DBG_CONFIG, - "Failed to update capability in target\n"); - priv->ah->opmode = vif->type; priv->vif_slot |= (1 << avp->index); priv->vif = vif;