From patchwork Mon Mar 7 02:14:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith Manoharan X-Patchwork-Id: 614281 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 p272ExhT018604 for ; Mon, 7 Mar 2011 02:14:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755199Ab1CGCO6 (ORCPT ); Sun, 6 Mar 2011 21:14:58 -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 S1755077Ab1CGCO5 (ORCPT ); Sun, 6 Mar 2011 21:14:57 -0500 Received: by mail-yw0-f46.google.com with SMTP id 3so1451423ywj.19 for ; Sun, 06 Mar 2011 18:14:57 -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=tS3Itg5bOUVd0s20fXg8bBbvlUVMxtyWlfZ5W4XnN3Y=; b=eD8jLFyvMFBe+5GppmuuAzG3L9FANbUPnuB3Dbbl7KAUiG1e0/ipWdBPZ+BJnF5h2h lesTeqU/OMc8D89YmoARS2zVmqPzeWziqVgesAZOTwrRwyXOJFHte/IQoCjFVBlOiw8P XmCnZbaUn36axVFRqz8ib9cD5THQ7lgOchLXQ= 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=W9FcJK6RLF2rzUWV8rlwAGWDc74v4kzD9ppdtQE+pZaMKXPClSRbw/+WjSZr2omR2K eEsANjlBPex7UxDOa/ria9roNw/X5DC9VcL9GijtetFH7xI/oHKCUjpqFlN58ara0tiw o3FFpwzspsbv99oy7DrrHVWE2G5rssDkrnemM= Received: by 10.151.134.30 with SMTP id l30mr3995070ybn.136.1299464097253; Sun, 06 Mar 2011 18:14:57 -0800 (PST) Received: from bodhi ([117.197.194.30]) by mx.google.com with ESMTPS id p33sm1360714ybk.14.2011.03.06.18.14.54 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Mar 2011 18:14:56 -0800 (PST) From: Sujith MIME-Version: 1.0 Message-ID: <19828.16280.571055.637333@gargle.gargle.HOWL> Date: Mon, 7 Mar 2011 07:44:48 +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 20/34] 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]); Mon, 07 Mar 2011 02:14:59 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/wmi.h b/drivers/net/wireless/ath/ath9k/wmi.h index 07595f2..3fa8510 100644 --- a/drivers/net/wireless/ath/ath9k/wmi.h +++ b/drivers/net/wireless/ath/ath9k/wmi.h @@ -36,6 +36,43 @@ struct wmi_event_swba { u8 beacon_pending; }; +/* + * 64 - HTC header - WMI header - 1 / txstatus + * And some other hdr. space is also accounted for. + * 14 seems to be the magic number. + */ +#define HTC_MAX_TX_STATUS 14 + +#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, @@ -76,6 +113,7 @@ enum wmi_event_id { WMI_BMISS_EVENTID, WMI_DELBA_EVENTID, WMI_TXRATE_EVENTID, + WMI_TXSTATUS_EVENTID, }; #define MAX_CMD_NUMBER 62