From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2EC0C433E1 for ; Sun, 2 Aug 2020 15:41:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B039B207BB for ; Sun, 2 Aug 2020 15:41:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726299AbgHBPlF (ORCPT ); Sun, 2 Aug 2020 11:41:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725768AbgHBPlF (ORCPT ); Sun, 2 Aug 2020 11:41:05 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5838EC06174A for ; Sun, 2 Aug 2020 08:41:05 -0700 (PDT) Received: from [2a04:4540:1401:8700:fd6b:4daf:8c30:5c76] by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1k2G6c-0005Wo-SN; Sun, 02 Aug 2020 17:40:58 +0200 Subject: Re: [PATCH V2 06/10] ath11k: pass multiple bssid info to FW when a new vdev is created To: Shay Bar , Johannes Berg Cc: "linux-wireless@vger.kernel.org" , "ath11k@lists.infradead.org" References: <20200706115219.663650-1-john@phrozen.org> <20200706115219.663650-6-john@phrozen.org> From: John Crispin Message-ID: <9d6133d4-de34-95a9-709b-781fd45752ab@phrozen.org> Date: Sun, 2 Aug 2020 17:40:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 02.08.20 17:02, Shay Bar wrote: > On 06/07/2020 14:52, John Crispin wrote: >> -static void >> +static int >> ath11k_mac_setup_vdev_create_params(struct ath11k_vif *arvif, >> struct vdev_create_params *params) >> { >> struct ath11k *ar = arvif->ar; >> struct ath11k_pdev *pdev = ar->pdev; >> + struct ieee80211_vif *parent; >> >> params->if_id = arvif->vdev_id; >> params->type = arvif->vdev_type; >> params->subtype = arvif->vdev_subtype; >> params->pdev_id = pdev->pdev_id; >> + params->vdevid_trans = 0; >> + switch (ieee80211_get_multi_bssid_mode(arvif->vif)) { >> + case NL80211_MULTIPLE_BSSID_TRANSMITTED: >> + params->flags = WMI_HOST_VDEV_FLAGS_TRANSMIT_AP; >> + break; >> + case NL80211_MULTIPLE_BSSID_NON_TRANSMITTED: >> + params->flags = WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP; >> + parent = ieee80211_get_multi_bssid_parent(arvif->vif); >> + if (!parent) >> + return -ENOENT; >> + if (ar->hw->wiphy != ieee80211_vif_to_wdev(parent)->wiphy) >> + return -EINVAL; >> + params->vdevid_trans = ath11k_vif_to_arvif(parent)->vdev_id; >> + break; >> + default: >> + params->flags = WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP; >> + break; >> + } > Hi John, > The ath11k_mac_setup_vdev_create_params() is called from the add_interface hook > which is called from ieee80211_do_open() which is, for the first (TRANSMITTED) > interface, before wdev->multi_bssid_mode is set to NL80211_MULTIPLE_BSSID_TRANSMITTED > (set upon start_ap from hostapd). > Can you please explain how wdev->multi_bssid_mode can have > NL80211_MULTIPLE_BSSID_TRANSMITTED value in the above code ? Hi Shay, https://patchwork.kernel.org/patch/11587085/     John