From patchwork Sun Sep 17 18:39:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 814692 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gW6m18WH"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xwHys0NYFz9s76 for ; Mon, 18 Sep 2017 04:41:09 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bEMyy7KsZDUXe4CZbmQCdzUHf1g81Mb1oGsSaHjEKrM=; b=gW6m18WH/pjV7O XYXyxGiRvqM49edup79mruptsJe2U3czr7KvAxagoWB08kQHi/wHIPAITN2MoE7fb/OJJXa76Cp2e qa5a3SC0zAL/EgMRh09ehD0mWXF0lja2q+DEwGcRqnec0aPSqa5a0qsOOH/cpW7xS/gWMLur7ESc/ 3diR1WDgTfs1qqNEZJDOTN0pr6f4EqZvd20I6evTzXSxOkH+Dudyo3qRzPOXcNOTmSPxy93YPzxqJ 5yzT555tAUu55Yoi76S11lrFzt8s0jsrbmQ6GyTZQlhfL5H3zEvAvnnc1W/uFrIg0UpmXzfzp5bNm xTlwwf2uGDdxMZIN2ffg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dteV3-0005qI-Ki; Sun, 17 Sep 2017 18:41:01 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dteUQ-00048e-Ru for lede-dev@lists.infradead.org; Sun, 17 Sep 2017 18:40:27 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 8E7E945C12; Sun, 17 Sep 2017 20:40:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id kFoLTwwWowxz; Sun, 17 Sep 2017 20:39:55 +0200 (CEST) From: Hauke Mehrtens To: nbd@nbd.name, lede-dev@lists.infradead.org Date: Sun, 17 Sep 2017 20:39:30 +0200 Message-Id: <20170917183932.16605-3-hauke@hauke-m.de> In-Reply-To: <20170917183932.16605-1-hauke@hauke-m.de> References: <20170917183932.16605-1-hauke@hauke-m.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170917_114023_083846_FCDD7FD8 X-CRM114-Status: GOOD ( 12.97 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [80.241.60.212 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 2/4] ath10k-ct: fix compatibility with mac80211 from 4.14-rc1 X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , daniel@makrotopia.org MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This fixes some compatibility problems with backports-4.14-rc1. Signed-off-by: Hauke Mehrtens --- .../ath10k-ct/patches/100-kernel_compat.patch | 14 +-- package/kernel/ath10k-ct/patches/110-api_fix.patch | 2 +- .../ath10k-ct/patches/120-mac80211-api.patch | 104 +++++++++++++++++++++ 3 files changed, 112 insertions(+), 8 deletions(-) create mode 100644 package/kernel/ath10k-ct/patches/120-mac80211-api.patch diff --git a/package/kernel/ath10k-ct/patches/100-kernel_compat.patch b/package/kernel/ath10k-ct/patches/100-kernel_compat.patch index 5d363a0e43..58d6b54c55 100644 --- a/package/kernel/ath10k-ct/patches/100-kernel_compat.patch +++ b/package/kernel/ath10k-ct/patches/100-kernel_compat.patch @@ -17,7 +17,7 @@ firmware = ar->normal_mode_fw.fw_file.firmware; if (firmware) -@@ -3397,7 +3397,7 @@ int ath10k_debug_register(struct ath10k +@@ -3413,7 +3413,7 @@ int ath10k_debug_register(struct ath10k debugfs_create_file("nf_cal_period", S_IRUSR | S_IWUSR, ar->debug.debugfs_phy, ar, &fops_nf_cal_period); @@ -28,7 +28,7 @@ &fops_simulate_radar); --- a/ath10k/mac.c +++ b/ath10k/mac.c -@@ -3556,7 +3556,7 @@ static void ath10k_regd_update(struct at +@@ -3596,7 +3596,7 @@ static void ath10k_regd_update(struct at regpair = ar->ath_common.regulatory.regpair; @@ -37,7 +37,7 @@ nl_dfs_reg = ar->dfs_detector->region; wmi_dfs_reg = ath10k_mac_get_dfs_region(nl_dfs_reg); ath10k_dbg(ar, ATH10K_DBG_REGULATORY, -@@ -3590,7 +3590,7 @@ static void ath10k_reg_notifier(struct w +@@ -3630,7 +3630,7 @@ static void ath10k_reg_notifier(struct w ath_reg_notifier_apply(wiphy, request, &ar->ath_common.regulatory); @@ -46,7 +46,7 @@ ath10k_dbg(ar, ATH10K_DBG_REGULATORY, "reg-notifier: dfs region 0x%x\n", request->dfs_region); result = ar->dfs_detector->set_dfs_domain(ar->dfs_detector, -@@ -8863,7 +8863,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -8925,7 +8925,7 @@ int ath10k_mac_register(struct ath10k *a if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) ar->hw->netdev_features = NETIF_F_HW_CSUM; @@ -55,7 +55,7 @@ /* Init ath dfs pattern detector */ ar->ath_common.debug_mask = ATH_DBG_DFS; ar->dfs_detector = dfs_pattern_detector_init(&ar->ath_common, -@@ -8908,7 +8908,7 @@ err_unregister: +@@ -8970,7 +8970,7 @@ err_unregister: ieee80211_unregister_hw(ar->hw); err_dfs_detector_exit: @@ -64,7 +64,7 @@ ar->dfs_detector->exit(ar->dfs_detector); err_free: -@@ -8923,7 +8923,7 @@ void ath10k_mac_unregister(struct ath10k +@@ -8985,7 +8985,7 @@ void ath10k_mac_unregister(struct ath10k { ieee80211_unregister_hw(ar->hw); @@ -86,7 +86,7 @@ hwmon_dev = devm_hwmon_device_register_with_groups(ar->dev, --- a/ath10k/wmi.c +++ b/ath10k/wmi.c -@@ -3788,7 +3788,7 @@ void ath10k_wmi_event_dfs(struct ath10k +@@ -3883,7 +3883,7 @@ void ath10k_wmi_event_dfs(struct ath10k phyerr->tsf_timestamp, tsf, buf_len); /* Skip event if DFS disabled */ diff --git a/package/kernel/ath10k-ct/patches/110-api_fix.patch b/package/kernel/ath10k-ct/patches/110-api_fix.patch index 4c210369fe..5f7de4a955 100644 --- a/package/kernel/ath10k-ct/patches/110-api_fix.patch +++ b/package/kernel/ath10k-ct/patches/110-api_fix.patch @@ -1,6 +1,6 @@ --- a/ath10k/htt_rx.c +++ b/ath10k/htt_rx.c -@@ -2490,7 +2490,7 @@ bool ath10k_htt_t2h_msg_handler(struct a +@@ -2497,7 +2497,7 @@ bool ath10k_htt_t2h_msg_handler(struct a u32 freq = __le32_to_cpu(resp->chan_change.freq); ar->tgt_oper_chan = diff --git a/package/kernel/ath10k-ct/patches/120-mac80211-api.patch b/package/kernel/ath10k-ct/patches/120-mac80211-api.patch new file mode 100644 index 0000000000..032a0bcb7d --- /dev/null +++ b/package/kernel/ath10k-ct/patches/120-mac80211-api.patch @@ -0,0 +1,104 @@ +--- a/ath10k/htt_rx.c ++++ b/ath10k/htt_rx.c +@@ -642,11 +642,11 @@ static void ath10k_htt_rx_h_rates(struct + sgi = (info3 >> 7) & 1; + + status->rate_idx = mcs; +- status->flag |= RX_FLAG_HT; ++ status->encoding = RX_ENC_HT; + if (sgi) +- status->flag |= RX_FLAG_SHORT_GI; ++ status->enc_flags |= RX_ENC_FLAG_SHORT_GI; + if (bw) +- status->flag |= RX_FLAG_40MHZ; ++ status->bw = RATE_INFO_BW_40; + break; + case HTT_RX_VHT: + case HTT_RX_VHT_WITH_TXBF: +@@ -698,10 +698,10 @@ static void ath10k_htt_rx_h_rates(struct + } + + status->rate_idx = mcs; +- status->vht_nss = nss; ++ status->nss = nss; + + if (sgi) +- status->flag |= RX_FLAG_SHORT_GI; ++ status->enc_flags |= RX_ENC_FLAG_SHORT_GI; + + switch (bw) { + /* 20MHZ */ +@@ -709,18 +709,18 @@ static void ath10k_htt_rx_h_rates(struct + break; + /* 40MHZ */ + case 1: +- status->flag |= RX_FLAG_40MHZ; ++ status->bw = RATE_INFO_BW_40; + break; + /* 80MHZ */ + case 2: +- status->vht_flag |= RX_VHT_FLAG_80MHZ; ++ status->bw = RATE_INFO_BW_80; + break; + case 3: +- status->vht_flag |= RX_VHT_FLAG_160MHZ; ++ status->bw = RATE_INFO_BW_160; + break; + } + +- status->flag |= RX_FLAG_VHT; ++ status->encoding = RX_ENC_VHT; + break; + default: + break; +@@ -883,13 +883,10 @@ static void ath10k_htt_rx_h_ppdu(struct + /* New PPDU starts so clear out the old per-PPDU status. */ + status->freq = 0; + status->rate_idx = 0; +- status->vht_nss = 0; +- status->vht_flag &= ~RX_VHT_FLAG_80MHZ; +- status->flag &= ~(RX_FLAG_HT | +- RX_FLAG_VHT | +- RX_FLAG_SHORT_GI | +- RX_FLAG_40MHZ | +- RX_FLAG_MACTIME_END); ++ status->nss = 0; ++ status->encoding = RX_ENC_LEGACY; ++ status->bw = RATE_INFO_BW_20; ++ status->flag &= ~RX_FLAG_MACTIME_END; + status->flag |= RX_FLAG_NO_SIGNAL_VAL; + + ath10k_htt_rx_h_signal(ar, status, rxd); +@@ -942,7 +939,7 @@ static void ath10k_process_rx(struct ath + *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%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 %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n", + skb, + skb->len, + ieee80211_get_SA(hdr), +@@ -950,15 +947,15 @@ static void ath10k_process_rx(struct ath + is_multicast_ether_addr(ieee80211_get_DA(hdr)) ? + "mcast" : "ucast", + (__le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4, +- status->flag == 0 ? "legacy" : "", +- status->flag & RX_FLAG_HT ? "ht" : "", +- 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->encoding == RX_ENC_LEGACY) ? "legacy" : "", ++ (status->encoding == RX_ENC_HT) ? "ht" : "", ++ (status->encoding == RX_ENC_VHT) ? "vht" : "", ++ (status->bw == RATE_INFO_BW_40) ? "40" : "", ++ (status->bw == RATE_INFO_BW_80) ? "80" : "", ++ (status->bw == RATE_INFO_BW_160) ? "160" : "", ++ status->enc_flags & RX_ENC_FLAG_SHORT_GI ? "sgi " : "", + status->rate_idx, +- status->vht_nss, ++ status->nss, + status->freq, + status->band, status->flag, + !!(status->flag & RX_FLAG_FAILED_FCS_CRC),