{"id":805676,"url":"http://patchwork.ozlabs.org/api/1.2/patches/805676/?format=json","web_url":"http://patchwork.ozlabs.org/project/lede/patch/20170824214034.9309-3-hauke@hauke-m.de/","project":{"id":54,"url":"http://patchwork.ozlabs.org/api/1.2/projects/54/?format=json","name":"LEDE development","link_name":"lede","list_id":"lede-dev.lists.infradead.org","list_email":"lede-dev@lists.infradead.org","web_url":"http://lede-project.org/","scm_url":"","webscm_url":"http://git.lede-project.org/","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170824214034.9309-3-hauke@hauke-m.de>","list_archive_url":null,"date":"2017-08-24T21:40:32","name":"[LEDE-DEV,RFC,2/4] ath10k-ct: fix compatibility with mac80211 from 4.13-rc6","commit_ref":null,"pull_url":null,"state":"rfc","archived":false,"hash":"910601fc622233fc812c7e208ed8388cc1db66de","submitter":{"id":3794,"url":"http://patchwork.ozlabs.org/api/1.2/people/3794/?format=json","name":"Hauke Mehrtens","email":"hauke@hauke-m.de"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/lede/patch/20170824214034.9309-3-hauke@hauke-m.de/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/805676/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/805676/checks/","tags":{},"related":[],"headers":{"Return-Path":"<lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"YWUog6RW\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xdd783dV3z9sRV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 25 Aug 2017 07:42:28 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dkztL-0007MR-Ft; Thu, 24 Aug 2017 21:42:19 +0000","from mx2.mailbox.org ([80.241.60.215])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dkzsH-0006l5-Ug\n\tfor lede-dev@lists.infradead.org; Thu, 24 Aug 2017 21:41:17 +0000","from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mx2.mailbox.org (Postfix) with ESMTPS id 1FE064812E;\n\tThu, 24 Aug 2017 23:40:48 +0200 (CEST)","from smtp1.mailbox.org ([80.241.60.240])\n\tby spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de\n\t[80.241.56.117]) (amavisd-new, port 10030)\n\twith ESMTP id Q3hH0MJvcMTW; Thu, 24 Aug 2017 23:40:46 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References:\n\tIn-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=e9ERXFTd8z+AzflvIDOfZKvTx9Rea7nqTpa6iHs3fb4=;\n\tb=YWUog6RW71Ny6g\n\ts5cjUhTvtjbM2xHdsmqjSQ+287meRp83Ca5Miw75fStZkeBdbAqLIUonRiY/VK5KAJMzpYwqED4/i\n\t6DRrw2+6nbadN2RF3iqPAa5SGM3Ox8jL26CmyghoBTWn8qZm3xA5udYSqTKXTzRIXRYOsUbZYAi3Z\n\tvpDpnZBZGAUmQbzK6d4W9KGgI6gaLzE+cZkVqKYqrD/uPBnHdg/hDFI0TOhXaTbt1zmHRnLJ9IOFS\n\tfCqtg3UuvciP51ZAB/SMq6cDX1/fuwvs7vHlGrd51HOGnqMWbPauy7RpvZcwe3m3qbrtO/4LqOd/w\n\tif8BOxs/xDgt7Q8d+icg==;","X-Virus-Scanned":"amavisd-new at heinlein-support.de","From":"Hauke Mehrtens <hauke@hauke-m.de>","To":"nbd@nbd.name,\n\tlede-dev@lists.infradead.org","Date":"Thu, 24 Aug 2017 23:40:32 +0200","Message-Id":"<20170824214034.9309-3-hauke@hauke-m.de>","In-Reply-To":"<20170824214034.9309-1-hauke@hauke-m.de>","References":"<20170824214034.9309-1-hauke@hauke-m.de>","X-Bad-Reply":"References and In-Reply-To but no 'Re:' in Subject.","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170824_144114_265667_CB4CE20B ","X-CRM114-Status":"GOOD (  12.94  )","X-Spam-Score":"-2.6 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.6 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow trust [80.241.60.215 listed in list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","Subject":"[LEDE-DEV] [RFC 2/4] ath10k-ct: fix compatibility with mac80211\n\tfrom 4.13-rc6","X-BeenThere":"lede-dev@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<lede-dev.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/lede-dev/>","List-Post":"<mailto:lede-dev@lists.infradead.org>","List-Help":"<mailto:lede-dev-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=subscribe>","Cc":"Hauke Mehrtens <hauke@hauke-m.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"Lede-dev\" <lede-dev-bounces@lists.infradead.org>","Errors-To":"lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"},"content":"This fixes some compatibility problems with backports-4.13-rc6.\n\nSigned-off-by: Hauke Mehrtens <hauke@hauke-m.de>\n---\n .../ath10k-ct/patches/100-kernel_compat.patch      |  14 +--\n package/kernel/ath10k-ct/patches/110-api_fix.patch |   2 +-\n .../ath10k-ct/patches/120-mac80211-api.patch       | 104 +++++++++++++++++++++\n 3 files changed, 112 insertions(+), 8 deletions(-)\n create mode 100644 package/kernel/ath10k-ct/patches/120-mac80211-api.patch","diff":"diff --git a/package/kernel/ath10k-ct/patches/100-kernel_compat.patch b/package/kernel/ath10k-ct/patches/100-kernel_compat.patch\nindex 5d363a0e43..58d6b54c55 100644\n--- a/package/kernel/ath10k-ct/patches/100-kernel_compat.patch\n+++ b/package/kernel/ath10k-ct/patches/100-kernel_compat.patch\n@@ -17,7 +17,7 @@\n  \n  \tfirmware = ar->normal_mode_fw.fw_file.firmware;\n  \tif (firmware)\n-@@ -3397,7 +3397,7 @@ int ath10k_debug_register(struct ath10k\n+@@ -3413,7 +3413,7 @@ int ath10k_debug_register(struct ath10k\n  \tdebugfs_create_file(\"nf_cal_period\", S_IRUSR | S_IWUSR,\n  \t\t\t    ar->debug.debugfs_phy, ar, &fops_nf_cal_period);\n  \n@@ -28,7 +28,7 @@\n  \t\t\t\t    &fops_simulate_radar);\n --- a/ath10k/mac.c\n +++ b/ath10k/mac.c\n-@@ -3556,7 +3556,7 @@ static void ath10k_regd_update(struct at\n+@@ -3596,7 +3596,7 @@ static void ath10k_regd_update(struct at\n  \n  \tregpair = ar->ath_common.regulatory.regpair;\n  \n@@ -37,7 +37,7 @@\n  \t\tnl_dfs_reg = ar->dfs_detector->region;\n  \t\twmi_dfs_reg = ath10k_mac_get_dfs_region(nl_dfs_reg);\n  \t\tath10k_dbg(ar, ATH10K_DBG_REGULATORY,\n-@@ -3590,7 +3590,7 @@ static void ath10k_reg_notifier(struct w\n+@@ -3630,7 +3630,7 @@ static void ath10k_reg_notifier(struct w\n  \n  \tath_reg_notifier_apply(wiphy, request, &ar->ath_common.regulatory);\n  \n@@ -46,7 +46,7 @@\n  \t\tath10k_dbg(ar, ATH10K_DBG_REGULATORY, \"reg-notifier: dfs region 0x%x\\n\",\n  \t\t\t   request->dfs_region);\n  \t\tresult = ar->dfs_detector->set_dfs_domain(ar->dfs_detector,\n-@@ -8863,7 +8863,7 @@ int ath10k_mac_register(struct ath10k *a\n+@@ -8925,7 +8925,7 @@ int ath10k_mac_register(struct ath10k *a\n  \tif (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags))\n  \t\tar->hw->netdev_features = NETIF_F_HW_CSUM;\n  \n@@ -55,7 +55,7 @@\n  \t\t/* Init ath dfs pattern detector */\n  \t\tar->ath_common.debug_mask = ATH_DBG_DFS;\n  \t\tar->dfs_detector = dfs_pattern_detector_init(&ar->ath_common,\n-@@ -8908,7 +8908,7 @@ err_unregister:\n+@@ -8970,7 +8970,7 @@ err_unregister:\n  \tieee80211_unregister_hw(ar->hw);\n  \n  err_dfs_detector_exit:\n@@ -64,7 +64,7 @@\n  \t\tar->dfs_detector->exit(ar->dfs_detector);\n  \n  err_free:\n-@@ -8923,7 +8923,7 @@ void ath10k_mac_unregister(struct ath10k\n+@@ -8985,7 +8985,7 @@ void ath10k_mac_unregister(struct ath10k\n  {\n  \tieee80211_unregister_hw(ar->hw);\n  \n@@ -86,7 +86,7 @@\n  \thwmon_dev = devm_hwmon_device_register_with_groups(ar->dev,\n --- a/ath10k/wmi.c\n +++ b/ath10k/wmi.c\n-@@ -3788,7 +3788,7 @@ void ath10k_wmi_event_dfs(struct ath10k\n+@@ -3883,7 +3883,7 @@ void ath10k_wmi_event_dfs(struct ath10k\n  \t\t   phyerr->tsf_timestamp, tsf, buf_len);\n  \n  \t/* Skip event if DFS disabled */\ndiff --git a/package/kernel/ath10k-ct/patches/110-api_fix.patch b/package/kernel/ath10k-ct/patches/110-api_fix.patch\nindex 4c210369fe..5f7de4a955 100644\n--- a/package/kernel/ath10k-ct/patches/110-api_fix.patch\n+++ b/package/kernel/ath10k-ct/patches/110-api_fix.patch\n@@ -1,6 +1,6 @@\n --- a/ath10k/htt_rx.c\n +++ b/ath10k/htt_rx.c\n-@@ -2490,7 +2490,7 @@ bool ath10k_htt_t2h_msg_handler(struct a\n+@@ -2497,7 +2497,7 @@ bool ath10k_htt_t2h_msg_handler(struct a\n  \t\tu32 freq = __le32_to_cpu(resp->chan_change.freq);\n  \n  \t\tar->tgt_oper_chan =\ndiff --git a/package/kernel/ath10k-ct/patches/120-mac80211-api.patch b/package/kernel/ath10k-ct/patches/120-mac80211-api.patch\nnew file mode 100644\nindex 0000000000..032a0bcb7d\n--- /dev/null\n+++ b/package/kernel/ath10k-ct/patches/120-mac80211-api.patch\n@@ -0,0 +1,104 @@\n+--- a/ath10k/htt_rx.c\n++++ b/ath10k/htt_rx.c\n+@@ -642,11 +642,11 @@ static void ath10k_htt_rx_h_rates(struct\n+ \t\tsgi = (info3 >> 7) & 1;\n+ \n+ \t\tstatus->rate_idx = mcs;\n+-\t\tstatus->flag |= RX_FLAG_HT;\n++\t\tstatus->encoding = RX_ENC_HT;\n+ \t\tif (sgi)\n+-\t\t\tstatus->flag |= RX_FLAG_SHORT_GI;\n++\t\t\tstatus->enc_flags |= RX_ENC_FLAG_SHORT_GI;\n+ \t\tif (bw)\n+-\t\t\tstatus->flag |= RX_FLAG_40MHZ;\n++\t\t\tstatus->bw = RATE_INFO_BW_40;\n+ \t\tbreak;\n+ \tcase HTT_RX_VHT:\n+ \tcase HTT_RX_VHT_WITH_TXBF:\n+@@ -698,10 +698,10 @@ static void ath10k_htt_rx_h_rates(struct\n+ \t\t}\n+ \n+ \t\tstatus->rate_idx = mcs;\n+-\t\tstatus->vht_nss = nss;\n++\t\tstatus->nss = nss;\n+ \n+ \t\tif (sgi)\n+-\t\t\tstatus->flag |= RX_FLAG_SHORT_GI;\n++\t\t\tstatus->enc_flags |= RX_ENC_FLAG_SHORT_GI;\n+ \n+ \t\tswitch (bw) {\n+ \t\t/* 20MHZ */\n+@@ -709,18 +709,18 @@ static void ath10k_htt_rx_h_rates(struct\n+ \t\t\tbreak;\n+ \t\t/* 40MHZ */\n+ \t\tcase 1:\n+-\t\t\tstatus->flag |= RX_FLAG_40MHZ;\n++\t\t\tstatus->bw = RATE_INFO_BW_40;\n+ \t\t\tbreak;\n+ \t\t/* 80MHZ */\n+ \t\tcase 2:\n+-\t\t\tstatus->vht_flag |= RX_VHT_FLAG_80MHZ;\n++\t\t\tstatus->bw = RATE_INFO_BW_80;\n+ \t\t\tbreak;\n+ \t\tcase 3:\n+-\t\t\tstatus->vht_flag |= RX_VHT_FLAG_160MHZ;\n++\t\t\tstatus->bw = RATE_INFO_BW_160;\n+ \t\t\tbreak;\n+ \t\t}\n+ \n+-\t\tstatus->flag |= RX_FLAG_VHT;\n++\t\tstatus->encoding = RX_ENC_VHT;\n+ \t\tbreak;\n+ \tdefault:\n+ \t\tbreak;\n+@@ -883,13 +883,10 @@ static void ath10k_htt_rx_h_ppdu(struct\n+ \t\t/* New PPDU starts so clear out the old per-PPDU status. */\n+ \t\tstatus->freq = 0;\n+ \t\tstatus->rate_idx = 0;\n+-\t\tstatus->vht_nss = 0;\n+-\t\tstatus->vht_flag &= ~RX_VHT_FLAG_80MHZ;\n+-\t\tstatus->flag &= ~(RX_FLAG_HT |\n+-\t\t\t\t  RX_FLAG_VHT |\n+-\t\t\t\t  RX_FLAG_SHORT_GI |\n+-\t\t\t\t  RX_FLAG_40MHZ |\n+-\t\t\t\t  RX_FLAG_MACTIME_END);\n++\t\tstatus->nss = 0;\n++\t\tstatus->encoding = RX_ENC_LEGACY;\n++\t\tstatus->bw = RATE_INFO_BW_20;\n++\t\tstatus->flag &= ~RX_FLAG_MACTIME_END;\n+ \t\tstatus->flag |= RX_FLAG_NO_SIGNAL_VAL;\n+ \n+ \t\tath10k_htt_rx_h_signal(ar, status, rxd);\n+@@ -942,7 +939,7 @@ static void ath10k_process_rx(struct ath\n+ \t*status = *rx_status;\n+ \n+ \tath10k_dbg(ar, ATH10K_DBG_DATA,\n+-\t\t   \"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\",\n++\t\t   \"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\",\n+ \t\t   skb,\n+ \t\t   skb->len,\n+ \t\t   ieee80211_get_SA(hdr),\n+@@ -950,15 +947,15 @@ static void ath10k_process_rx(struct ath\n+ \t\t   is_multicast_ether_addr(ieee80211_get_DA(hdr)) ?\n+ \t\t\t\t\t\t\t\"mcast\" : \"ucast\",\n+ \t\t   (__le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4,\n+-\t\t   status->flag == 0 ? \"legacy\" : \"\",\n+-\t\t   status->flag & RX_FLAG_HT ? \"ht\" : \"\",\n+-\t\t   status->flag & RX_FLAG_VHT ? \"vht\" : \"\",\n+-\t\t   status->flag & RX_FLAG_40MHZ ? \"40\" : \"\",\n+-\t\t   status->vht_flag & RX_VHT_FLAG_80MHZ ? \"80\" : \"\",\n+-\t\t   status->vht_flag & RX_VHT_FLAG_160MHZ ? \"160\" : \"\",\n+-\t\t   status->flag & RX_FLAG_SHORT_GI ? \"sgi \" : \"\",\n++\t\t   (status->encoding == RX_ENC_LEGACY) ? \"legacy\" : \"\",\n++\t\t   (status->encoding == RX_ENC_HT) ? \"ht\" : \"\",\n++\t\t   (status->encoding == RX_ENC_VHT) ? \"vht\" : \"\",\n++\t\t   (status->bw == RATE_INFO_BW_40) ? \"40\" : \"\",\n++\t\t   (status->bw == RATE_INFO_BW_80) ? \"80\" : \"\",\n++\t\t   (status->bw == RATE_INFO_BW_160) ? \"160\" : \"\",\n++\t\t   status->enc_flags & RX_ENC_FLAG_SHORT_GI ? \"sgi \" : \"\",\n+ \t\t   status->rate_idx,\n+-\t\t   status->vht_nss,\n++\t\t   status->nss,\n+ \t\t   status->freq,\n+ \t\t   status->band, status->flag,\n+ \t\t   !!(status->flag & RX_FLAG_FAILED_FCS_CRC),\n","prefixes":["LEDE-DEV","RFC","2/4"]}