From patchwork Tue May 17 12:35:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Gottschall X-Patchwork-Id: 9111961 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A9EB89F30C for ; Tue, 17 May 2016 12:36:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4520F20279 for ; Tue, 17 May 2016 12:36:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9FA842026D for ; Tue, 17 May 2016 12:36:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b2eE7-0006fZ-Oh; Tue, 17 May 2016 12:35:55 +0000 Received: from nm.newmedia-net.de ([217.113.179.122] helo=webmail.newmedia-net.de) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b2eE3-0006aY-0K for ath10k@lists.infradead.org; Tue, 17 May 2016 12:35:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dd-wrt.com; s=mikd; h=Subject:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To; bh=kYMTM8JeeBTz//OvpSTsvkw76YgQdVqoTSQ2+s81jis=; b=uDFuXf5Yp9W6sDIRaHINEObpVzWfkD5Yx0J7Yk1ljtYvq+yFSNbnMRDSYa1Gir0eJj9vYkmpd0qSr+pLNJ1hH2xLBLBKgwkucZI8yx/6My/GTuL8vdXWkwKNUctUP1yn9iCNnxruVRwevVGUfw9bpxeouEXBVtZtgaCZWTzV2mM=; To: ath10k@lists.infradead.org References: <57320C1A.3040604@candelatech.com> <57335A43.4050902@candelatech.com> <573892F5.40706@candelatech.com> <5738AE96.8040800@candelatech.com> <87mvnp6ser.fsf@kamboji.qca.qualcomm.com> <572a14ee-d1b5-7b85-d292-51f583f34f17@dd-wrt.com> <4e407b2c-29f9-3c74-ea94-4206632441c3@dd-wrt.com> From: Sebastian Gottschall Message-ID: <6d9fb31a-e5f7-3c26-3238-977fd5d72f4a@dd-wrt.com> Date: Tue, 17 May 2016 14:35:26 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: X-SA-Exim-Connect-IP: 93.195.10.22 X-SA-Exim-Mail-From: s.gottschall@dd-wrt.com X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Subject: Re: QCA9984 VHT160 support X-SA-Exim-Version: 4.2.1 (built Thu, 26 May 2011 15:22:33 +0200) X-SA-Exim-Scanned: Yes (on webmail.newmedia-net.de) X-NMN-MailScanner-Information: Please contact the ISP for more information X-NMN-MailScanner-ID: 1b2eDf-0003qp-3e X-NMN-MailScanner: Found to be clean X-NMN-MailScanner-From: s.gottschall@dd-wrt.com X-Received: from [93.195.10.22] (helo=[172.29.0.169]) by webmail.newmedia-net.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1b2eDf-0003qp-3e for ath10k@lists.infradead.org; Tue, 17 May 2016 14:35:27 +0200 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160517_053553_471671_AFDFB506 X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.3 (----) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP this is a updated patchset which adds further corrections. 80p80 support is detected by sta flags right now. Index: drivers/net/wireless/ath/ath10k/mac.c =================================================================== --- drivers/net/wireless/ath/ath10k/mac.c (revision 2910) +++ drivers/net/wireless/ath/ath10k/mac.c (working copy) @@ -539,10 +539,14 @@ case NL80211_CHAN_WIDTH_80: phymode = MODE_11AC_VHT80; break; + case NL80211_CHAN_WIDTH_160: + phymode = MODE_11AC_VHT160; + break; + case NL80211_CHAN_WIDTH_80P80: + phymode = MODE_11AC_VHT80_80; + break; case NL80211_CHAN_WIDTH_5: case NL80211_CHAN_WIDTH_10: - case NL80211_CHAN_WIDTH_80P80: - case NL80211_CHAN_WIDTH_160: phymode = MODE_UNKNOWN; break; } @@ -2398,6 +2402,9 @@ if (sta->bandwidth == IEEE80211_STA_RX_BW_80) arg->peer_flags |= ar->wmi.peer_flags->bw80; + if (sta->bandwidth == IEEE80211_STA_RX_BW_160) + arg->peer_flags |= ar->wmi.peer_flags->bw160; + arg->peer_vht_rates.rx_max_rate = __le16_to_cpu(vht_cap->vht_mcs.rx_highest); arg->peer_vht_rates.rx_mcs_set = @@ -2499,7 +2506,12 @@ !ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) { if (sta->bandwidth == IEEE80211_STA_RX_BW_80) phymode = MODE_11AC_VHT80; - else if (sta->bandwidth == IEEE80211_STA_RX_BW_40) + else if (sta->bandwidth == IEEE80211_STA_RX_BW_160) { + if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ) + phymode = MODE_11AC_VHT80_80; + else + phymode = MODE_11AC_VHT160; + } else if (sta->bandwidth == IEEE80211_STA_RX_BW_40) phymode = MODE_11AC_VHT40; else if (sta->bandwidth == IEEE80211_STA_RX_BW_20) phymode = MODE_11AC_VHT20; @@ -4185,6 +4197,10 @@ vht_cap.cap |= val; } + if (ar->vht_cap_info & IEEE80211_VHT_CAP_SHORT_GI_160) { + vht_cap.cap |= IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ; + vht_cap.cap |= IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ; + } mcs_map = 0; for (i = 0; i < 8; i++) { @@ -6798,6 +6814,9 @@ bw = WMI_PEER_CHWIDTH_80MHZ; break; case IEEE80211_STA_RX_BW_160: + bw = WMI_PEER_CHWIDTH_160MHZ; + break; + default: ath10k_warn(ar, "Invalid bandwidth %d in rc update for %pM\n", sta->bandwidth, sta->addr); bw = WMI_PEER_CHWIDTH_20MHZ; Index: drivers/net/wireless/ath/ath10k/htt_rx.c =================================================================== --- drivers/net/wireless/ath/ath10k/htt_rx.c (revision 2910) +++ drivers/net/wireless/ath/ath10k/htt_rx.c (working copy) @@ -707,6 +707,10 @@ /* 80MHZ */ case 2: status->vht_flag |= RX_VHT_FLAG_80MHZ; + break; + case 3: + status->vht_flag |= RX_VHT_FLAG_160MHZ; + break; } status->flag |= RX_FLAG_VHT; @@ -931,7 +935,7 @@ *status = *rx_status; ath10k_dbg(ar, ATH10K_DBG_DATA, - "rx skb %p len %u peer %pM %s %s sn %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%llx fcs-err %i mic-err %i amsdu-more %i\n", + "rx skb %p len %u peer %pM %s %s sn %u %s%s%s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%llx fcs-err %i mic-err %i amsdu-more %i\n", skb, skb->len, ieee80211_get_SA(hdr), @@ -944,6 +948,7 @@ status->flag & RX_FLAG_VHT ? "vht" : "", status->flag & RX_FLAG_40MHZ ? "40" : "", status->vht_flag & RX_VHT_FLAG_80MHZ ? "80" : "", + status->vht_flag & RX_VHT_FLAG_160MHZ ? "160" : "", status->flag & RX_FLAG_SHORT_GI ? "sgi " : "", status->rate_idx, status->vht_nss, @@ -2193,6 +2198,8 @@ case MODE_11AC_VHT20: case MODE_11AC_VHT40: case MODE_11AC_VHT80: + case MODE_11AC_VHT160: + case MODE_11AC_VHT80_80: band = NL80211_BAND_5GHZ; break; case MODE_11G: Index: drivers/net/wireless/ath/ath10k/wmi-tlv.c =================================================================== --- drivers/net/wireless/ath/ath10k/wmi-tlv.c (revision 2910) +++ drivers/net/wireless/ath/ath10k/wmi-tlv.c (working copy) @@ -3503,6 +3503,7 @@ .vht = WMI_TLV_PEER_VHT, .bw80 = WMI_TLV_PEER_80MHZ, .pmf = WMI_TLV_PEER_PMF, + .bw160 = WMI_TLV_PEER_160MHZ, }; /************/ Index: drivers/net/wireless/ath/ath10k/wmi-tlv.h =================================================================== --- drivers/net/wireless/ath/ath10k/wmi-tlv.h (revision 2910) +++ drivers/net/wireless/ath/ath10k/wmi-tlv.h (working copy) @@ -543,6 +543,7 @@ WMI_TLV_PEER_VHT = 0x02000000, WMI_TLV_PEER_80MHZ = 0x04000000, WMI_TLV_PEER_PMF = 0x08000000, + WMI_TLV_PEER_160MHZ = 0x20000000, }; enum wmi_tlv_tag { Index: drivers/net/wireless/ath/ath10k/wmi.c =================================================================== --- drivers/net/wireless/ath/ath10k/wmi.c (revision 2910) +++ drivers/net/wireless/ath/ath10k/wmi.c (working copy) @@ -1569,6 +1569,7 @@ .bw80 = WMI_PEER_80MHZ, .vht_2g = WMI_PEER_VHT_2G, .pmf = WMI_PEER_PMF, + .bw160 = WMI_PEER_160MHZ, }; static const struct wmi_peer_flags_map wmi_10x_peer_flags_map = { @@ -1586,6 +1587,7 @@ .spatial_mux = WMI_10X_PEER_SPATIAL_MUX, .vht = WMI_10X_PEER_VHT, .bw80 = WMI_10X_PEER_80MHZ, + .bw160 = WMI_10X_PEER_160MHZ, }; static const struct wmi_peer_flags_map wmi_10_2_peer_flags_map = { @@ -1605,6 +1607,7 @@ .bw80 = WMI_10_2_PEER_80MHZ, .vht_2g = WMI_10_2_PEER_VHT_2G, .pmf = WMI_10_2_PEER_PMF, + .bw160 = WMI_10_2_PEER_160MHZ, }; void ath10k_wmi_put_wmi_channel(struct wmi_channel *ch, Index: drivers/net/wireless/ath/ath10k/wmi.h =================================================================== --- drivers/net/wireless/ath/ath10k/wmi.h (revision 2910) +++ drivers/net/wireless/ath/ath10k/wmi.h (working copy) @@ -1723,8 +1723,10 @@ MODE_11AC_VHT20_2G = 11, MODE_11AC_VHT40_2G = 12, MODE_11AC_VHT80_2G = 13, - MODE_UNKNOWN = 14, - MODE_MAX = 14 + MODE_11AC_VHT80_80 = 14, + MODE_11AC_VHT160 = 15, + MODE_UNKNOWN = 16, + MODE_MAX = 16 }; static inline const char *ath10k_wmi_phymode_str(enum wmi_phy_mode mode) @@ -1752,6 +1754,10 @@ return "11ac-vht40"; case MODE_11AC_VHT80: return "11ac-vht80"; + case MODE_11AC_VHT160: + return "11ac-vht160"; + case MODE_11AC_VHT80_80: + return "11ac-vht80+80"; case MODE_11AC_VHT20_2G: return "11ac-vht20-2g"; case MODE_11AC_VHT40_2G: @@ -5748,6 +5754,7 @@ WMI_PEER_CHWIDTH_20MHZ = 0, WMI_PEER_CHWIDTH_40MHZ = 1, WMI_PEER_CHWIDTH_80MHZ = 2, + WMI_PEER_CHWIDTH_160MHZ = 3, }; enum wmi_peer_param { @@ -5838,6 +5845,7 @@ u32 bw80; u32 vht_2g; u32 pmf; + u32 bw160; }; enum wmi_peer_flags { @@ -5857,6 +5865,7 @@ WMI_PEER_80MHZ = 0x04000000, WMI_PEER_VHT_2G = 0x08000000, WMI_PEER_PMF = 0x10000000, + WMI_PEER_160MHZ = 0x20000000 }; enum wmi_10x_peer_flags { @@ -5874,6 +5883,7 @@ WMI_10X_PEER_SPATIAL_MUX = 0x00200000, WMI_10X_PEER_VHT = 0x02000000, WMI_10X_PEER_80MHZ = 0x04000000, + WMI_10X_PEER_160MHZ = 0x20000000 }; enum wmi_10_2_peer_flags { @@ -5893,6 +5903,7 @@ WMI_10_2_PEER_80MHZ = 0x04000000, WMI_10_2_PEER_VHT_2G = 0x08000000, WMI_10_2_PEER_PMF = 0x10000000, + WMI_10_2_PEER_160MHZ = 0x20000000 }; /*