Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp721181pxf; Thu, 18 Mar 2021 10:02:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw39PSWr9iqspgiQrIM56wI4JezYsYl/yyrR0Sbl6aCR37r88Hzn2NkF5AFJkyZmDx5Ug2K X-Received: by 2002:aa7:cd54:: with SMTP id v20mr4937800edw.80.1616086965325; Thu, 18 Mar 2021 10:02:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616086965; cv=none; d=google.com; s=arc-20160816; b=iVOC92rRaA//UXKk2yvPhlrzeHSPNA/adSVLB1q8DPzZ2K0nAGO/qLYL+vcm7ah5ww 9qPlmWegdwrXjl/6KWfusWjfQX5HSBj5KGfnSRYCDGmagWvkNVfExtNYBsQmn7E2a7rZ 16Ma6362xJYx6mB4CbpELiONMSze/QBbAqZ2fyCIqi1xmNyXkIzn7cfMVmr+sbPzviKT jKGqgSTeX+hIYdkHDdrnYf4qfyZtF5vjl6CXKNf08KwKD1Huue/TN4q/yY5RjRR8oLsr SjcC0R4/59SWmZp4rzv8oA08QJd9v4uIqHbM3lt5Kues4fSizNPLK7bboWWRiyq6ooBU y4iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=VHB6JfKp3+BaaUe6ohJbr4lF7kAZwa5St+Qr4LaANRE=; b=I/d9fnICMotQXDuA02DJaULJ3jW8qoYR0uoY04fiCcewRk8kbnY4NZ5mGIfgrd2CAa WBd/O/S2SUNFRxeRqc2LIWe9cKVLfi0sy0lB0eLxGF33kRc5BT/Kajdwni0FMdJzH086 SBm9AwcO5glTHN/+W/xLAuONE1+pjw135L7/QvEtTQxWchaf4OEvB1AL+7Mf2oabS0Tl Klepcd7soJo0DmQifW/usz8P/hnb/RNhVQ6gYOccDHDmjxBtAV21bu+epKEPzitm461n +EUEPwSXSbJxzzpKIAcCHDOykMjJGB0KPx4DOlhDkOOhQraSuFd7MzAHfAoHwJhmaYuV bsAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jo14si2085794ejb.460.2021.03.18.10.02.18; Thu, 18 Mar 2021 10:02:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231992AbhCRRB1 (ORCPT + 99 others); Thu, 18 Mar 2021 13:01:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231129AbhCRRBD (ORCPT ); Thu, 18 Mar 2021 13:01:03 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C57FC06174A for ; Thu, 18 Mar 2021 10:01:03 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1lMw17-000ERX-Ut; Thu, 18 Mar 2021 18:01:02 +0100 Message-ID: <8cb6896efc94008f4862ae94375f67cd1b379dcd.camel@sipsolutions.net> Subject: Re: mac80211_hwsim: wrong tx/rx bitrate when width != 20MHz From: Johannes Berg To: Ramon Fontes , linux-wireless Date: Thu, 18 Mar 2021 18:01:01 +0100 In-Reply-To: (sfid-20200930_042153_224585_BA641453) References: (sfid-20200930_042153_224585_BA641453) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, 2020-09-29 at 23:21 -0300, Ramon Fontes wrote: > I'm running 2 virtual interfaces: one in master mode with hostapd > (802.11n in 40MHz) and the other one in managed mode. > > I can confirm that the AP is working on 40MHz: > > ap1 iw dev ap1-wlan1 info > Interface ap1-wlan1 > ifindex 221 > wdev 0x6c00000001 > addr 02:00:00:00:02:00 > ssid new-ssid > type AP > wiphy 108 > channel 3 (2422 MHz), width: 40 MHz, center1: 2432 MHz > txpower 14.00 dBm > > as well as the client: > > sta1 iw dev sta1-wlan0 info > Interface sta1-wlan0 > ifindex 219 > wdev 0x6a00000001 > addr 00:00:00:00:00:02 > ssid new-ssid > type managed > wiphy 106 > channel 3 (2422 MHz), width: 40 MHz, center1: 2432 MHz > txpower 14.00 dBm > > However, tx/rx bitrates of the client are not equivalent to the 40 MHz > channels. Only the MCS index seems to be ok and I can change it via > iw. You are setting it fixed? What if set the bandwidth too? Or maybe that's not implemented right? I was going to say that for rate scaling there's no requirement to pick 40MHz, although there's no reason (especially in hwsim) for it to pick anything else either, so that's a bit odd. > For some reason I can see the correct tx/rx bitrate right at the > beginning of the association (e.g. tx bitrate: 270.0 MBit/s MCS 15 > 40MHz), but right after that they change to 20 MHz. I have been trying > to identify errors in mac80211_hwsim, but I was not successful. Can > anybody help me? I did tests with/without wmediumd and the results are > the same. Now I'm confused - you said here "they change", but above you set you were actually setting them fixed? So they should change? If you do nothing fixed, what happens? johannes