From patchwork Fri Nov 29 07:07:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 13888438 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7A5D33C5 for ; Fri, 29 Nov 2024 07:07:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732864067; cv=none; b=LH1wX4I8n7+EqnA5Kt6n1Zz0+NEl2OWSqD6Jg2sGxT+fvSwqQMoshF9I1I5QZL7gp6L28vm4PNkKEoADDmus5TgcBm85FiKJl9FGO3T5UFt910hsNCS0T3a1S1qTZtoqvOfDWXCm79VStrh2Qj3K5mnCOe/2bwRMleuhm3duxpw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732864067; c=relaxed/simple; bh=2s58AkGQkYXMZP6Ct5mdcFFBdFcshrn3g6Ewvvdgdbk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=eNdKsBrTK4DBt9Q2CCpk285IfrHJUhv0LIuXTxvji4oqpDoWUjvhj0Uj8eVgZ5FWoDZADptQMVdbdnlhlN0E2ya488T924hoqktK8zmoZJUi62diJPhCT09KWG1hs5TXhtUCF1yxrL2PDasRcF97/PzIMdrP/SvQElfLkCPAGUo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=VqTr68kS; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="VqTr68kS" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4ASMM2Cu025126; Fri, 29 Nov 2024 07:07:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=ByBNZPaQxkdU04U8xXwZW0 FjMEPkT3RZ/K14lk8InCM=; b=VqTr68kSR4O/1PS8lKr8isgQiXisU6c572SNuR ppEp5TkpdyfJq0mccyOfo231KuEsMYkT52elP+V2JVg05YGv0nefqMGytFBb0ghh SlMqOrWKr9EJ/SkKxp4ObfQYSJ6VAi+U0BhQ+ah1NhVtjWIw1qkbX9vOjZVL4uCV VHRe5UJN6EYcOTvMhjCH1IDGI/6vZOYZV9Tk1zBxKDhavBKn0poTnXgL+sdUE4xo gFsbLsmxqkANPCktuO880j1UBzd8HzP21+M3g5o/N4jcq1zUsOAzREf2SPMMRJ5r HzXbqvMzznnBPrlE3R0f+YO/wZ8WmFCtHajSMBLYL8A+X/rw== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4366xvmp6b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Nov 2024 07:07:41 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4AT77eEu003646 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Nov 2024 07:07:40 GMT Received: from kangyang.ap.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Thu, 28 Nov 2024 23:07:38 -0800 From: Kang Yang To: CC: , Subject: [PATCH v3 0/2] wifi: ath11k: fix data out of sync for channel list for reg update Date: Fri, 29 Nov 2024 15:07:12 +0800 Message-ID: <20241129070714.226-1-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: wa9JjEuz0F_CRED49LYwbetqfqYFS9hx X-Proofpoint-ORIG-GUID: wa9JjEuz0F_CRED49LYwbetqfqYFS9hx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 mlxlogscore=976 clxscore=1011 adultscore=0 lowpriorityscore=0 suspectscore=0 mlxscore=0 spamscore=0 impostorscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2411290057 Currently there are two threads to updating/fetch data of channel list, and there are no synchronization for the data, it leads data out of sync for channel list when doing reg update. So change the call flow to make sure the fetch data running after the update data finished, then data of channel list become synchronization. Note: This patch-set is an old patch-set in public review written by Wen Gong. Just continue sending it for him. Link: https://lore.kernel.org/linux-wireless/20230329091235.19500-1-quic_wgong@quicinc.com/ v3: 1. rebase on tag ath-202411251703. 2. add KASAN BUG report in patch #1. v2: 1. rewrite commit message for patch #1 and #2. 2. use a local list without the spinlock held for patch #2. Wen Gong (2): wifi: ath11k: move update channel list from update reg worker to reg notifier wifi: ath11k: move update channel list to worker for wait flag drivers/net/wireless/ath/ath11k/core.c | 1 + drivers/net/wireless/ath/ath11k/core.h | 4 + drivers/net/wireless/ath/ath11k/mac.c | 15 ++++ drivers/net/wireless/ath/ath11k/reg.c | 110 +++++++++++++++++-------- drivers/net/wireless/ath/ath11k/reg.h | 1 + drivers/net/wireless/ath/ath11k/wmi.h | 1 + 6 files changed, 98 insertions(+), 34 deletions(-) base-commit: 175616a7658cd5d53389d1f9c1ce22debd4595a5