From patchwork Thu Aug 8 08:08:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 2840833 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D8EF79F487 for ; Thu, 8 Aug 2013 08:08:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01A5B20319 for ; Thu, 8 Aug 2013 08:08:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A1052034D for ; Thu, 8 Aug 2013 08:08:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933981Ab3HHIIi (ORCPT ); Thu, 8 Aug 2013 04:08:38 -0400 Received: from ebb06.tieto.com ([131.207.168.38]:56025 "EHLO ebb06.tieto.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933977Ab3HHIIb (ORCPT ); Thu, 8 Aug 2013 04:08:31 -0400 X-AuditID: 83cfa826-b7f408e000003a47-0d-520351f624a4 Received: from FIHGA-EXHUB01.eu.tieto.com ( [131.207.136.34]) by ebb06.tieto.com (SMTP Mailer) with SMTP id 76.82.14919.6F153025; Thu, 8 Aug 2013 11:08:23 +0300 (EEST) Received: from uw001058.eu.tieto.com (10.28.19.57) by inbound.tieto.com (131.207.136.49) with Microsoft SMTP Server id 8.3.298.1; Thu, 8 Aug 2013 11:08:22 +0300 From: Michal Kazior To: CC: , Michal Kazior Subject: [RFC 2/3] ath10k: clean up HTT tx tid handling Date: Thu, 8 Aug 2013 10:08:17 +0200 Message-ID: <1375949298-7159-3-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1375949298-7159-1-git-send-email-michal.kazior@tieto.com> References: <1375949298-7159-1-git-send-email-michal.kazior@tieto.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBIsWRmVeSWpSXmKPExsXSfL5DSfd7IHOQwc8qi0eXjjFbvFlxh93i 29YHbA7MHp9n3mXz2Lyk3uPzJrkA5igum5TUnMyy1CJ9uwSujL+T5zAXvOOr2DxjBmsD40ye LkZODgkBE4m+hltMELaYxIV769m6GLk4hARWMUrs3XiIHcJZwigx604fC0gVm4CuxKvGs6wg toiAgsSvSR/ZQGxmAV+JZ0+WgU0SFjCXmHlsDTOIzSKgItH98jBYnFfATWJV01ugoRxA2xQk 5kyyAQlzCrhLdD+7CTZGCKjkXtMqRohyQYmTM5+wQIyXkDj44gUzRI2KxMH1+5knMArMQlI2 C0nZAkamVYz8qUlJBmZ6JZmpJfl6yfm5mxjBAbhCbQfjswdShxgFOBiVeHg7ApiChFgTy4or cw8xSnIwKYnyJrsxBwnxJeWnVGYkFmfEF5XmpBYfYpTgYFYS4b1YDFTOm5JYWZValA+TkuZg URLnfaQElBJITyxJzU5NLUgtgsnKcHAoSfAeCgAaKliUmp5akZaZU4KQZuLgBBnOAzT8AkgN b3FBYm5xZjpE/hSjopQ473mQhABIIqM0D64XliBeMYoDvSLMewekigeYXOC6XwENZgIa7HGS AWRwSSJCSqqBkeuxg8ucyJd5X4rfz0v9vXHF1UPLsi006tc3Zm5Zw5MYPd81ZVZGr3N0VDtL YtHsPYw/r7naJ1ddUgnefmBWXM2TV85zJgdtvnNKK/eQXl/ClJoIx+gvm+eo+3FGGeyxCO5t 5KzqqJHnSiz5+MeN9bazjegy38o5MvLrfPuePbPUeu3+seu2EktxRqKhFnNRcSIAZo08pOsC AAA= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The tids weren't mapped really properly. This doesn't fix any known bug but seems the right thing to do. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/htt.h | 6 ++++-- drivers/net/wireless/ath/ath10k/mac.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h index 318be46..de45d02 100644 --- a/drivers/net/wireless/ath/ath10k/htt.h +++ b/drivers/net/wireless/ath/ath10k/htt.h @@ -106,8 +106,10 @@ enum htt_data_tx_desc_flags1 { }; enum htt_data_tx_ext_tid { - HTT_DATA_TX_EXT_TID_NON_QOS_MCAST_BCAST = 16, - HTT_DATA_TX_EXT_TID_MGMT = 17, + HTT_DATA_TX_EXT_TID_NON_QOS_UNICAST = 16, + HTT_DATA_TX_EXT_TID_UNUSED = 17, + HTT_DATA_TX_EXT_TID_NON_QOS_MCAST_BCAST = 18, + HTT_DATA_TX_EXT_TID_MGMT = 19, HTT_DATA_TX_EXT_TID_INVALID = 31 }; diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index cf2ba4d..fb1f24f 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1726,12 +1726,14 @@ static void ath10k_tx(struct ieee80211_hw *hw, /* we must calculate tid before we apply qos workaround * as we'd lose the qos control field */ - tid = HTT_DATA_TX_EXT_TID_NON_QOS_MCAST_BCAST; if (ieee80211_is_data_qos(hdr->frame_control) && is_unicast_ether_addr(ieee80211_get_DA(hdr))) { u8 *qc = ieee80211_get_qos_ctl(hdr); tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK; - } + } else if (is_unicast_ether_addr(ieee80211_get_DA(hdr))) + tid = HTT_DATA_TX_EXT_TID_NON_QOS_UNICAST; + else + tid = HTT_DATA_TX_EXT_TID_NON_QOS_MCAST_BCAST; /* it makes no sense to process injected frames like that */ if (info->control.vif &&