ath10k 出现ath10k_htt_t2h_msg_handler+0xebc/0x1efc解决方案

て烟熏妆下的殇ゞ 提交于 2020-02-24 23:22:04

问题log:

Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.625786] WARNING: CPU: 0 PID: 8 at /openwrt-18.06.git/build_dir/target-mips_24kc_musl/linux-ar71xx_nand/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:763 ath10k_htt_t2h_msg_handler+0xebc/0x1efc [ath10k_core]
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.648495] Modules linked in: fast_classifier ath9k ath9k_common rt2800usb rt2800lib pppoe ppp_async ath9k_hw ath10k_pci ath10k_core ath rt2x00usb rt2x00lib pppox ppp_mppe ppp_generic option nf_nat_pptp nf_conntrack_pptp nf_conntrack_ipv6 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_hashlimit xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_IPMARK xt_HL xt_DSCP xt_CT xt_CLASSIFY wireguard usb_wwan ts_fsm ts_bm slhc sierra_net sierra rndis_host qmi_wwan nf_reject_ipv4 nf_nat_tftp nf_nat_snmp_basic nf_nat_sip nf_nat_redirect nf_nat_proto_gre nf_nat_masquerade_ipv4 nf_nat_irc nf_conntrack_ipv4 nf_nat_ipv4
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.722452]  nf_nat_h323 nf_nat_ftp nf_nat_amanda nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_tftp nf_conntrack_snmp nf_conntrack_sip nf_conntrack_rtcache nf_conntrack_proto_gre nf_conntrack_netlink nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp nf_conntrack_broadcast ts_kmp nf_conntrack_amanda iptable_mangle iptable_filter ipt_ECN ipheth ip_tables huawei_cdc_ncm crc_itu_t crc_ccitt cp210x compat_xtables compat cdc_wdm cdc_ncm cdc_ether cdc_acm xt_u32 fuse sch_cbq sch_teql em_nbyte sch_dsmark sch_prio sch_pie sch_gred em_meta act_police cls_basic act_ipt sch_multiq em_text sch_codel sch_fq em_cmp sch_red sch_sfq act_connmark nf_conntrack act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route cls_fw sch_tbf sch_htb sch_hfsc sch_ingress xt_set ip_set_list_set ip_set_hash_netiface ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6t_REJECT nf_rFri Feb 21 20:08:34 2020 kern.warn kernel: [   86.858597] CPU: 0 PID: 8 Comm: kworker/u2:1 Not tainted 4.9.120 #0
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.865194] Workqueue: phy1 ieee80211_scan_work [mac80211]
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.870865] Stack : 00000040 86f09c98 00000001 800a93ac 87c2e6dc 80503407 804a6fbc 00000008
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.879572]         804a6f28 87c5f9bc 80500000 800d7c5c 00000001 800a93ac 804ac810 80500000
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.888273]         00000003 87c5f9bc 80500000 80094d94 00000001 87c5f9f4 00000000 00000007
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.896973]         00000000 00000000 86f8add0 86d7e700 86d7e600 70687931 00000000 00000000
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.905674]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.914373]         ...
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.916919] Call Trace:
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.919445] [<8006b1a0>] show_stack+0x70/0x8c
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.923958] [<8007ff94>] __warn+0x110/0x118
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.928293] [<80080030>] warn_slowpath_null+0x1c/0x2c
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.933558] [<8681abc8>] ath10k_htt_t2h_msg_handler+0xebc/0x1efc [ath10k_core]
Fri Feb 21 20:08:34 2020 kern.warn kernel: [   86.941128] ---[ end trace 2b83ad4757525200 ]---

修改方式:

--- linux-4.9.120.orig/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ linux-4.9.120/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -214,11 +214,12 @@ int ath10k_htt_rx_ring_refill(struct ath
     spin_lock_bh(&htt->rx_ring.lock);
     ret = ath10k_htt_rx_ring_fill_n(htt, (htt->rx_ring.fill_level -
                           htt->rx_ring.fill_cnt));
-    spin_unlock_bh(&htt->rx_ring.lock);
 
     if (ret)
         ath10k_htt_rx_ring_free(htt);
 
+    spin_unlock_bh(&htt->rx_ring.lock);
+
     return ret;
 }
 
@@ -230,7 +231,9 @@ void ath10k_htt_rx_free(struct ath10k_ht
     skb_queue_purge(&htt->rx_in_ord_compl_q);
     skb_queue_purge(&htt->tx_fetch_ind_q);
 
+    spin_lock_bh(&htt->rx_ring.lock);
     ath10k_htt_rx_ring_free(htt);
+    spin_unlock_bh(&htt->rx_ring.lock);
 
     dma_free_coherent(htt->ar->dev,
               (htt->rx_ring.size *
@@ -2314,7 +2317,7 @@ bool ath10k_htt_t2h_msg_handler(struct a
         break;
     }
     case HTT_T2H_MSG_TYPE_MGMT_TX_COMPLETION: {
-        struct htt_tx_done tx_done = {};
+        struct htt_tx_done tx_done = {0};
         int status = __le32_to_cpu(resp->mgmt_tx_completion.status);
 
         tx_done.msdu_id = __le32_to_cpu(resp->mgmt_tx_completion.desc_id);
参考链接:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/net/wireless/ath/ath10k?id=168f75f11fe68455e0d058a818ebccfc329d8685

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!