Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp215621lqe; Tue, 9 Apr 2024 22:33:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVB1ID+X6+hE4+j5qt4gIGXqNtAPW8QdzbdZOBQ4ZdPx30KzZNn7l3pBMRLn4lyc7N/oZP6/U/UFLG63t/neSLcmLcP+GY0f4bRDf1BAA== X-Google-Smtp-Source: AGHT+IEJRzzq7JQyaC7sbREgG0US6Wb6xRQuzOXBX/DP0MdDhFguft38BhBGGu+AP94a60I/nMmV X-Received: by 2002:a50:ccc6:0:b0:56e:2e96:2f8f with SMTP id b6-20020a50ccc6000000b0056e2e962f8fmr831190edj.6.1712727186330; Tue, 09 Apr 2024 22:33:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712727186; cv=pass; d=google.com; s=arc-20160816; b=QHZlljTXr46/8sBoxabtSynds9n2754q+OLxDaveNReP0uOq/EcT/OCjbWNjEqprO0 LCTAKTVjrduqrImzsD0Y0yrwyEW26ouu1sPleMXkBiP/DRZVjin97UMODrnBogs86hIR Ego/wUfdleWyHipAlrVvV539Jf2sKClDcouCXHwREYk8u2G70FkLQ7ITrBNbE8yWh4q6 Kz5tV/OMjwzZ5bPiehqPRxUPawqqTU0C/avh5ZHXtlgkDv4bf06eGsTm5VIqcZxReSj6 EFkUBFSyy8CIUlBvXKpp6Ddf8o2H+zYvdnYQaz3vZZvG2iHzgrNamJjE3B2YMP6jbh0r Okrw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=cFc/TYl4C6J0PUylXhWx0DT6OdqsKBIE/Wd2PiUKI+I=; fh=LarGd0V3qpgyLdfSxaEru0gpA22PIXZGRe+UFfe3MfE=; b=IqjYD7QhYDKPccGlPTab9Dd7egvJvC36MD+6Re+UaHPnJwI6qiyFs8K5guzd7B3h+V H6Qsz8kn11DRxNsFdib5cLltryU1Tr3YxS59i+QGce81S14MEp4RfRDRza0fWoqzBYUi Fw/vbSb0YoWGJ8dYI9sPpHf7iSLPXKTNmhkmbNg0owpY1mKjLq9ZmysqQmeGZSy+aU+8 KEf+f0sYjjDOKUuxuNKnzYVf92rYvfyhVZGlE/FNrbZejYk2Xb/tg4VOpCG4KFQPchsZ 3kVUVQ3Wp4HdN9EEKAIKZKGOWP/T4g7VfiPLGUUUND19gWvIq4hPbbSMH7wZyGzVTr0/ aWKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ZMqYE5kI; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-6062-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6062-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d30-20020a50cd5e000000b0056e69895978si2199750edj.117.2024.04.09.22.33.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 22:33:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6062-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ZMqYE5kI; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-6062-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6062-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E36691F24BA5 for ; Wed, 10 Apr 2024 05:27:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF3B312E70; Wed, 10 Apr 2024 05:27:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ZMqYE5kI" X-Original-To: linux-wireless@vger.kernel.org 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 0F9DE20326 for ; Wed, 10 Apr 2024 05:27:26 +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=1712726848; cv=none; b=cftF+CbOG1ID8+dzrTEACfWufwLW0EIdTiMzBmZISVdVhqeIUta0zFQWHWgiE+BrHZedLnKjh6bEwCpKECZ8D/tezUhPnrTvnFKBuDj2qOi93z2TjGCsumROoJcUa1rs2oLH/n/qU2pNlCvRScrJbcBxpyvaFYC+Uzgwelchjg0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712726848; c=relaxed/simple; bh=ROV3LK2VMoWYtCH4AZwNIlW9xgzdb9nTkXUKOIlwxpo=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=cINel3NbUGV7tpPfRG9qVsum9MNZwr8+Xs+9tEuXdTKgE03sZLJwfj1HlcokgDAdm3lDq2wVQXmHRKOVqiT7PNs9opbO8XvB7tFm8OnvvqSxjCGLqymYXnng8eQlee4ELQZiQPaMtG45qePb23UB5MOgplAf+7U7Zhc+985+TLo= 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=ZMqYE5kI; 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 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 43A4ZaFr002260; Wed, 10 Apr 2024 05:27:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=cFc/TYl 4C6J0PUylXhWx0DT6OdqsKBIE/Wd2PiUKI+I=; b=ZMqYE5kIOh/+5kubUPxm9vp YhbQYNkvSq3B/yAAWUPAaK1DmdJlvXhMhSL7H8eRI9awPvP6nHvbiXrwkzL+AN04 GSaYBxH9UODYglEUWbWdeL6+VhjNxiXIvDOSv4hNKTt7DGihxzMCv04MFzoyG3/e 4QagU3TUa9MDxkJWgXSoprbIhdtOemLrlz8rCT/rHVCeWLARN8cp+OaRzKSVKvdA v3IuRYztPkqG/VYnR6X9APpVH4mv8Db69NZyqwc0ldml2PAxBqZA7mvxKVSgrlnV byKPdj0k2vWQYCub3jhremvMQC55xp9T6l9gzt4jleS+aPmWXj3aZgc7HAO3Bow= = Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xdkv8g9ke-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Apr 2024 05:27:23 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43A5RMrB005416 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Apr 2024 05:27:22 GMT Received: from hu-adisi-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 9 Apr 2024 22:27:20 -0700 From: Aditya Kumar Singh To: CC: , Sriram R , Aditya Kumar Singh Subject: [PATCH v2] wifi: mac80211: handle link ID during management Tx Date: Wed, 10 Apr 2024 10:57:05 +0530 Message-ID: <20240410052705.169865-1-quic_adisi@quicinc.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: FcjHa-uld-hXlGlanaAQa6SgDISKvg1y X-Proofpoint-GUID: FcjHa-uld-hXlGlanaAQa6SgDISKvg1y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-09_12,2024-04-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 spamscore=0 phishscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=804 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404100038 From: Sriram R During management Tx, when source address is same as one of the link conf's address and even when userspace requested Tx on a specific link, link ID is not set. Now if MLD address is also same as that of the link address, then mac80211 fills link as unspecified. Due to this, later in driver, the channel context is fetched from vif->bss_conf instead of link's conf which in turn gives channel as NULL and hence as a result, the packet is ultimately dropped. Add changes to use the same link id and set it if the link bss is matching the requested channel. This will prevent the packet from getting dropped. Signed-off-by: Sriram R Signed-off-by: Aditya Kumar Singh --- v2: rephrased commit message to describe how packet is getting dropped. --- net/mac80211/offchannel.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 221695d841fd..65e1e9e971fd 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -897,8 +897,18 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, break; } - if (ether_addr_equal(conf->addr, mgmt->sa)) + if (ether_addr_equal(conf->addr, mgmt->sa)) { + /* If userspace requested Tx on a specific link + * use the same link id if the link bss is matching + * the requested chan. + */ + if (sdata->vif.valid_links && + params->link_id >= 0 && params->link_id == i && + params->chan == chanctx_conf->def.chan) + link_id = i; + break; + } chanctx_conf = NULL; } base-commit: a35b36e6ee5dcf323d846ec3881159e4af90c9b4 -- 2.25.1