From patchwork Mon Mar 7 02:14:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith Manoharan X-Patchwork-Id: 614221 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 p272EJuq018126 for ; Mon, 7 Mar 2011 02:14:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755153Ab1CGCOR (ORCPT ); Sun, 6 Mar 2011 21:14:17 -0500 Received: from mail-yw0-f46.google.com ([209.85.213.46]:62495 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755137Ab1CGCOR (ORCPT ); Sun, 6 Mar 2011 21:14:17 -0500 Received: by ywj3 with SMTP id 3so1451423ywj.19 for ; Sun, 06 Mar 2011 18:14:16 -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=GwCmTA+dFe/hrDJandu+EdVOqPi4uwNlJEq5w3kvsoU=; b=N8vvZfkz8kDODJMz4VwpfK4arNnz0HN62OOtSAJWYaGB4cFTnNeUH79s1xQsolLRLH tC6j4SdEtx8m39kVuDFodDU1YCtGqEbpsX30fqBJzF7hEzXEwEO88r9Yr/4AHFgDGU8S rx055O/gbxlxReGEmN/MYxEkYRqAVIcDBo1sk= 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=BrpXxeLYdRmy/SYyAsCEGAttcyQqfMcVbvr0ruqJ3AhbZi3oxdMcGxqTKS/lv8qUvV qbmwiqlUGaB5yaBftgjl1pqL3aOtkwzB4CBotgOANUYmvUFbixptxHCWkUMNg7M4un5/ ftiv1plRdR/xS9G6gcIuQ8O6+hRHXXKxv9khI= Received: by 10.150.104.12 with SMTP id b12mr3689886ybc.370.1299464056464; Sun, 06 Mar 2011 18:14:16 -0800 (PST) Received: from bodhi ([117.197.194.30]) by mx.google.com with ESMTPS id q13sm1361877yba.8.2011.03.06.18.14.13 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Mar 2011 18:14:15 -0800 (PST) From: Sujith MIME-Version: 1.0 Message-ID: <19828.16239.939605.712078@gargle.gargle.HOWL> Date: Mon, 7 Mar 2011 07:44:07 +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 14/34] ath9k_htc: Sync struct ath9k_htc_target_sta with FW 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]); Mon, 07 Mar 2011 02:14:19 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index e346962..72aa04e 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h @@ -104,17 +104,6 @@ struct tx_beacon_header { u16 rev; } __packed; -struct ath9k_htc_target_hw { - u32 flags; - u32 flags_ext; - u32 ampdu_limit; - u8 ampdu_subframes; - u8 tx_chainmask; - u8 tx_chainmask_legacy; - u8 rtscts_ratecode; - u8 protmode; -} __packed; - struct ath9k_htc_cap_target { u32 flags; u32 flags_ext; @@ -146,27 +135,15 @@ struct ath9k_htc_target_vif { #define ATH_HTC_STA_ERP 0x0004 #define ATH_HTC_STA_HT 0x0008 -/* FIXME: UAPSD variables */ struct ath9k_htc_target_sta { - u16 associd; - u16 txpower; - u32 ucastkey; u8 macaddr[ETH_ALEN]; u8 bssid[ETH_ALEN]; u8 sta_index; u8 vif_index; - u8 vif_sta; - __be16 flags; /* ATH_HTC_STA_* */ - u16 htcap; - u8 valid; - u16 capinfo; - struct ath9k_htc_target_hw *hw; - struct ath9k_htc_target_vif *vif; - u16 txseqmgmt; u8 is_vif_sta; - u16 maxampdu; - u16 iv16; - u32 iv32; + __be16 flags; /* ATH_HTC_STA_* */ + __be16 htcap; + __be16 maxampdu; } __packed; struct ath9k_htc_target_aggr { diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 59710e7..9bb20f3 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c @@ -382,7 +382,7 @@ static int ath9k_htc_add_monitor_interface(struct ath9k_htc_priv *priv) tsta.is_vif_sta = 1; tsta.sta_index = sta_idx; tsta.vif_index = hvif.index; - tsta.maxampdu = 0xffff; + tsta.maxampdu = cpu_to_be16(0xffff); WMI_CMD_BUF(WMI_NODE_CREATE_CMDID, &tsta); if (ret) { @@ -463,9 +463,7 @@ static int ath9k_htc_add_station(struct ath9k_htc_priv *priv, ista = (struct ath9k_htc_sta *) sta->drv_priv; memcpy(&tsta.macaddr, sta->addr, ETH_ALEN); memcpy(&tsta.bssid, common->curbssid, ETH_ALEN); - tsta.associd = common->curaid; tsta.is_vif_sta = 0; - tsta.valid = true; ista->index = sta_idx; } else { memcpy(&tsta.macaddr, vif->addr, ETH_ALEN); @@ -474,7 +472,7 @@ static int ath9k_htc_add_station(struct ath9k_htc_priv *priv, tsta.sta_index = sta_idx; tsta.vif_index = avp->index; - tsta.maxampdu = 0xffff; + tsta.maxampdu = cpu_to_be16(0xffff); if (sta && sta->ht_cap.ht_supported) tsta.flags = cpu_to_be16(ATH_HTC_STA_HT);