From patchwork Wed Apr 13 05:55:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith Manoharan X-Patchwork-Id: 702871 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 p3D5qtoa025851 for ; Wed, 13 Apr 2011 05:52:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753713Ab1DMFwx (ORCPT ); Wed, 13 Apr 2011 01:52:53 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:35840 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753178Ab1DMFwx (ORCPT ); Wed, 13 Apr 2011 01:52:53 -0400 Received: by mail-iw0-f174.google.com with SMTP id 34so276432iwn.19 for ; Tue, 12 Apr 2011 22:52:52 -0700 (PDT) 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=r5iiOc8GeSu18F0G6kI9EcEqyvwyfPBuKLU3yjiDfUo=; b=eUrZdxdrRSH9hNz9UwAkFy5wjh0iCWrrK3Wn4kR0nLH/+lY3lGwg9dUxIyKxSwEG0P YEhOGpB3r9zm0uqZWk36aRLQElCafT6VZfJJnuXWSVfo7fBhwkI3y1K4EQxDFGyTrQI6 fW0GzA2P+493eRQVOkmVCEXac9wOWQnZnJDmc= 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=S5GCsoCbDtp1m1arDNh2PEloyEo6VIO6qJUKUqcXlE31io81xEeZlR0rSrcTd+KELL iNbYOYLSwq5IIPx3Aiyyi7jnNyKeOuXtfQ1BlLwWh0ezZQ3hmJWHOOipkJM8HcHfwWJ9 1o8VxGLYfUqhutJUwPH20UyB+Yy0eqNr+LnoI= Received: by 10.43.65.65 with SMTP id xl1mr1012409icb.35.1302673972805; Tue, 12 Apr 2011 22:52:52 -0700 (PDT) Received: from atheros-test ([182.72.177.186]) by mx.google.com with ESMTPS id xn10sm165133icb.16.2011.04.12.22.52.50 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Apr 2011 22:52:52 -0700 (PDT) From: Sujith MIME-Version: 1.0 Message-ID: <19877.15046.37086.280115@gargle.gargle.HOWL> Date: Wed, 13 Apr 2011 11:25:18 +0530 To: linville@tuxdriver.com X-Mailer: VM 8.1.1 under 23.3.1 (x86_64-unknown-linux-gnu) CC: linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net Subject: [PATCH 23/40] ath9k_htc: Add a new WMI event WMI_TXSTATUS_EVENTID 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]); Wed, 13 Apr 2011 05:52:55 +0000 (UTC) From: Sujith Manoharan This event will be generated by the target for packet completions. Signed-off-by: Sujith Manoharan --- drivers/net/wireless/ath/ath9k/wmi.h | 39 ++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/wmi.h b/drivers/net/wireless/ath/ath9k/wmi.h index a81d554..8c877dc 100644 --- a/drivers/net/wireless/ath/ath9k/wmi.h +++ b/drivers/net/wireless/ath/ath9k/wmi.h @@ -41,6 +41,44 @@ struct wmi_event_swba { __be64 tsf; u8 beacon_pending; }; + +/* + * 64 - HTC header - WMI header - 1 / txstatus + * And some other hdr. space is also accounted for. + * 13 seems to be the magic number. + */ +#define HTC_MAX_TX_STATUS 13 + +#define ATH9K_HTC_TXSTAT_ACK BIT(0) +#define ATH9K_HTC_TXSTAT_FILT BIT(1) +#define ATH9K_HTC_TXSTAT_RTC_CTS BIT(2) +#define ATH9K_HTC_TXSTAT_MCS BIT(3) +#define ATH9K_HTC_TXSTAT_CW40 BIT(4) +#define ATH9K_HTC_TXSTAT_SGI BIT(5) + +/* + * Legacy rates are indicated as indices. + * HT rates are indicated as dot11 numbers. + * This allows us to resrict the rate field + * to 4 bits. + */ +#define ATH9K_HTC_TXSTAT_RATE 0x0f +#define ATH9K_HTC_TXSTAT_RATE_S 0 + +#define ATH9K_HTC_TXSTAT_EPID 0xf0 +#define ATH9K_HTC_TXSTAT_EPID_S 4 + +struct __wmi_event_txstatus { + u8 cookie; + u8 ts_rate; /* Also holds EP ID */ + u8 ts_flags; +}; + +struct wmi_event_txstatus { + u8 cnt; + struct __wmi_event_txstatus txstatus[HTC_MAX_TX_STATUS]; +} __packed; + enum wmi_cmd_id { WMI_ECHO_CMDID = 0x0001, WMI_ACCESS_MEMORY_CMDID, @@ -82,6 +120,7 @@ enum wmi_event_id { WMI_BMISS_EVENTID, WMI_DELBA_EVENTID, WMI_TXRATE_EVENTID, + WMI_TXSTATUS_EVENTID, }; #define MAX_CMD_NUMBER 62