Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6724093rwb; Tue, 22 Nov 2022 18:21:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf4mQGwjH5K52UiIuIGalWATKjBM7AkM3OEik0mmu+QA4DzZzGu9DShr0Anzge4CMptqQfPM X-Received: by 2002:a05:6402:3d1:b0:46a:fd6:207 with SMTP id t17-20020a05640203d100b0046a0fd60207mr1994012edw.28.1669170062546; Tue, 22 Nov 2022 18:21:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669170062; cv=none; d=google.com; s=arc-20160816; b=wFlsrvaGtP3pSQop4c6Q1dCj0GB2a7bx//ioRlVr39gQA1py0+6tdLQ775xn2RoDOY GauQu9l29wRQZC0b8NbOQ5CJ1m6xKKOlIoMMpUPYYj+gQVU8r8O88POB9fmX53X+6tjp c8Yzg52Rz+KWp7pPARtV22eQqvh+ea0KUqck1FbpE0JMY9QB9mhJquvJlfpdC2ps0hOB pdeYpdeCZzY+ShapQeRFXfbbkhMcHDbPeFCyhX7Pdhxq+/ZVAZ8Er4tgaLhc+5vrE1wG XkgBFMLNr0uN0hXrnKZx9QuMfGUjBQrSkp4OLcsMFdRt5hvkridLusKoB1L7HSkbBqpE KONg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=wZiGRUD8pICgSrnKIV/sCb3bdYv5bb+NUF8wLk/vf6o=; b=xNzXyNxLeWelQ20OPVNrveuGphg2XEAPneu646KEWhTfz46bQZuYxtN0lq6ytL+TQY en2rrDBKwuE9o3z7Gs4B3rcYHc6C+UX5SfDIHZTnJ4dYQnXtJ34qhRC8VS1pnyKdoByO fovIpQB9OPiu5NkWxlTW1DuZrZXsGfdtNMYKdpo1dkChGsCS/iF1HH0vA2/2H96RuK4F BRIrwc0WWb3LGB6xeivdvbCh6mxirXWZFkLE3vH192GeW2vstIIoj0MIYCNZW7lWMSl8 n4HZB+O4vz/xwCt6UeRIKE1g18YTXd0YLCvl4h7JFoWwEmJYx05GC2k4ifiZquVGvzeS JA/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=IgVYhZoj; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w2-20020a056402268200b00468eee7250csi1901062edd.510.2022.11.22.18.20.41; Tue, 22 Nov 2022 18:21:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=IgVYhZoj; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234839AbiKWCTL (ORCPT + 68 others); Tue, 22 Nov 2022 21:19:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232445AbiKWCTK (ORCPT ); Tue, 22 Nov 2022 21:19:10 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7777C67CE for ; Tue, 22 Nov 2022 18:19:09 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AN1tYSf006405; Wed, 23 Nov 2022 02:19:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=wZiGRUD8pICgSrnKIV/sCb3bdYv5bb+NUF8wLk/vf6o=; b=IgVYhZojDsY2Uv7DeF6fWkUw9464ITt9VHaM5mxE6ZZYQYxZpqOEZl7HkFmy9Sl7YFaD WirY01uDzFzt7QUf7ujKuV/XXqretQPnkd36fcj0qlu42vBiiz3iSvI99sCUU8XdcBab DrU4VrP5PenN1MtB8vLJ2JcSCkN8XGETxFhA9zT1gyJ8wpaO4u2NEOdbBY12RmBNQscT MevZTkxYVIFl0sBFjLBsCyBFhaUiZ1cjW731dZJkYF+zeUgmEvpSrS6rS7rBDEcSmTfn A0+NbKKPte0rD9bY0+dIrzxMmLB5kHoUvAmM/o/BRhN2d8sJJvek+SFaBrTUJcG+XWWp rw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3m0twqa5jh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Nov 2022 02:19:04 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2AN2J3nJ007495 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Nov 2022 02:19:03 GMT Received: from [10.253.13.32] (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.986.36; Tue, 22 Nov 2022 18:19:01 -0800 Message-ID: <76266a0b-d371-53c1-9ad0-fbff7a506d0c@quicinc.com> Date: Wed, 23 Nov 2022 10:18:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [RFC PATCH] mac80211: mlme: Handle Puncturing information received from the AP Content-Language: en-US To: Johannes Berg , CC: Aloka Dixit , Miri Korenblit , "Carl Huang (QUIC)" References: <20220325140859.e48bf244f157.I3547481d49f958389f59dfeba3fcc75e72b0aa6e@changeid> <95ad4207e62b4990476d867bd240fef3ede31369.camel@sipsolutions.net> From: Kang Yang In-Reply-To: <95ad4207e62b4990476d867bd240fef3ede31369.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: LsYwkQpYRRCrriRVuN7WgMUpGZ4vL3Js X-Proofpoint-ORIG-GUID: LsYwkQpYRRCrriRVuN7WgMUpGZ4vL3Js X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-22_13,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=999 spamscore=0 impostorscore=0 adultscore=0 mlxscore=0 malwarescore=0 suspectscore=0 bulkscore=0 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211230015 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi: Thanks for your reply! On 11/23/2022 12:43 AM, Johannes Berg wrote: > On Mon, 2022-11-21 at 15:29 +0800, Kang Yang wrote: >> Hi: >> 1.Do you have any new version about this RFC patch? > > Not really, no. > > >> 2.I have some questions about this patch: > > (a couple of blank lines and some trimming of the context really would > help ... please try next time) > >>> +static u16 >>> +ieee80211_extract_dis_subch_bmap(const struct ieee80211_eht_operation *eht_oper, >>> + struct cfg80211_chan_def *chandef, u16 bitmap) >>> +{ >>> + int sta_center_freq = ieee80211_channel_to_frequency(eht_oper->ccfs, >>> + chandef->chan->band); >>> + u32 center_freq = chandef->chan->center_freq; >> The shift is calculated by the difference of old and new channel center >> frequency.The new channel center frequency should be >> "chandef->center_freq1" after BW negotitaion. >> "chandef->chan->center_freq" is the primary channel frequency. > > > Yeah I think we did fix a couple of bugs in this area later. > >>> + u8 sta_bw = 20 * BIT(u8_get_bits(eht_oper->chan_width, >>> + IEEE80211_EHT_OPER_CHAN_WIDTH)); >>> + u8 bw = 20 * BIT(ieee80211_chan_width_to_rx_bw(chandef->width)); >>> + int sta_start_freq = sta_center_freq - sta_bw / 2; >>> + int start_freq = center_freq - bw / 2; >>> + u16 shift = (start_freq - sta_start_freq) / 20; >>> + u16 mask = BIT(sta_bw / 20) - 1; >> The mask is used to extra the valid bit according to the new BW, >> but current algorithm is using the old bandwidth. > > > :) > >>> + while (chandef->width > NL80211_CHAN_WIDTH_40) { >>> + extracted = >>> + ieee80211_extract_dis_subch_bmap(eht_oper, chandef, >>> + bitmap); >>> + >>> + if (ieee80211_valid_disable_subchannel_bitmap(&bitmap, >>> + chandef->width)) >> Here extract the bitmap according new negotiated BW. After extracting, >> check whether it is valid. >> I think you should use "&extracted" instead of "&bitmap" > > Yeah I guess that makes sense. > > I don't know what fixes we have and what version of this patch this is. > >>> +static bool ieee80211_config_puncturing(struct ieee80211_sub_if_data *sdata, >>> + const struct ieee80211_eht_operation *eht_oper, >>> + u64 *changed) >>> +{ >>> + u16 bitmap, extracted; >>> + u8 bw; >>> + >>> + if (!u8_get_bits(eht_oper->present_bm, >>> + IEEE80211_EHT_OPER_DISABLED_SUBCHANNEL_BITMAP_PRESENT)) >>> + bitmap = 0; >>> + else >>> + bitmap = get_unaligned_le16(eht_oper->disable_subchannel_bitmap); >>> + >> Should check initial bitmap here. > > > What do you mean by "initial" here? "Initial bitmap" is the original bitmap that AP send in beacon . STA will extract it according to the negotiated BW. So i call it "Initial bitmap". This is my personal statement. > >>> + extracted = ieee80211_extract_dis_subch_bmap(eht_oper, >>> + &sdata->vif.bss_conf.chandef, >>> + bitmap); >>> + >>> + /* accept if there are no changes */ >>> + if (!(*changed & BSS_CHANGED_BANDWIDTH) && >>> + extracted == sdata->vif.bss_conf.eht_puncturing) >>> + return true; >>> + >>> + bw = u8_get_bits(eht_oper->chan_width, IEEE80211_EHT_OPER_CHAN_WIDTH); >>> + >>> + if (!ieee80211_valid_disable_subchannel_bitmap(&bitmap, bw)) { >>> + sdata_info(sdata, >>> + "Got an invalid disable subchannel bitmap from AP %pM: bitmap = 0x%x, bw = 0x%x. disconnect\n", >>> + sdata->u.mgd.associated->bssid, bitmap, bw); >>> + return false; >>> + } >> The initial bitmap received from the AP is checked here. >> I think it should be carried out before the extraction above. > > Ah, yes I guess that makes sense. > > > Anyway the more fundamental thing we have to figure out here (and thanks > for bringing this back) is how we treat the puncturing - QCOM's AP-side > puncturing patch treated it as part of the chandef, but that's not > working well for client side ... > Yes, to my understanding, I think it's more appropriate to define it like you in "ieee80211_bss_conf". But this should be discussed by people like you. I'm just responsible for developing according to these definitions. > johannes My question is over. Thanks again for your patient reply. Best regard Kang