wmi.c (61fe43e7216df6e9a912d831aafc7142fa20f280) | wmi.c (f552d6fd2f27ce9430c74482c46272838e2de688) |
---|---|
1// SPDX-License-Identifier: BSD-3-Clause-Clear 2/* 3 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. 4 */ 5#include <linux/skbuff.h> 6#include <linux/ctype.h> 7#include <net/mac80211.h> 8#include <net/cfg80211.h> --- 346 unchanged lines hidden (view full) --- 355 pdev_cap->tx_chain_mask = mac_phy_caps->tx_chain_mask_2g; 356 pdev_cap->rx_chain_mask = mac_phy_caps->rx_chain_mask_2g; 357 } else if (mac_phy_caps->supported_bands & WMI_HOST_WLAN_5G_CAP) { 358 pdev_cap->vht_cap = mac_phy_caps->vht_cap_info_5g; 359 pdev_cap->vht_mcs = mac_phy_caps->vht_supp_mcs_5g; 360 pdev_cap->he_mcs = mac_phy_caps->he_supp_mcs_5g; 361 pdev_cap->tx_chain_mask = mac_phy_caps->tx_chain_mask_5g; 362 pdev_cap->rx_chain_mask = mac_phy_caps->rx_chain_mask_5g; | 1// SPDX-License-Identifier: BSD-3-Clause-Clear 2/* 3 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. 4 */ 5#include <linux/skbuff.h> 6#include <linux/ctype.h> 7#include <net/mac80211.h> 8#include <net/cfg80211.h> --- 346 unchanged lines hidden (view full) --- 355 pdev_cap->tx_chain_mask = mac_phy_caps->tx_chain_mask_2g; 356 pdev_cap->rx_chain_mask = mac_phy_caps->rx_chain_mask_2g; 357 } else if (mac_phy_caps->supported_bands & WMI_HOST_WLAN_5G_CAP) { 358 pdev_cap->vht_cap = mac_phy_caps->vht_cap_info_5g; 359 pdev_cap->vht_mcs = mac_phy_caps->vht_supp_mcs_5g; 360 pdev_cap->he_mcs = mac_phy_caps->he_supp_mcs_5g; 361 pdev_cap->tx_chain_mask = mac_phy_caps->tx_chain_mask_5g; 362 pdev_cap->rx_chain_mask = mac_phy_caps->rx_chain_mask_5g; |
363 pdev_cap->nss_ratio_enabled = 364 WMI_NSS_RATIO_ENABLE_DISABLE_GET(mac_phy_caps->nss_ratio); 365 pdev_cap->nss_ratio_info = 366 WMI_NSS_RATIO_INFO_GET(mac_phy_caps->nss_ratio); |
|
363 } else { 364 return -EINVAL; 365 } 366 367 /* tx/rx chainmask reported from fw depends on the actual hw chains used, 368 * For example, for 4x4 capable macphys, first 4 chains can be used for first 369 * mac and the remaing 4 chains can be used for the second mac or vice-versa. 370 * In this case, tx/rx chainmask 0xf will be advertised for first mac and 0xf0 --- 407 unchanged lines hidden (view full) --- 778 ath11k_dbg(ar->ab, ATH11K_DBG_WMI, "WMI vdev down id 0x%x\n", vdev_id); 779 780 return ret; 781} 782 783static void ath11k_wmi_put_wmi_channel(struct wmi_channel *chan, 784 struct wmi_vdev_start_req_arg *arg) 785{ | 367 } else { 368 return -EINVAL; 369 } 370 371 /* tx/rx chainmask reported from fw depends on the actual hw chains used, 372 * For example, for 4x4 capable macphys, first 4 chains can be used for first 373 * mac and the remaing 4 chains can be used for the second mac or vice-versa. 374 * In this case, tx/rx chainmask 0xf will be advertised for first mac and 0xf0 --- 407 unchanged lines hidden (view full) --- 782 ath11k_dbg(ar->ab, ATH11K_DBG_WMI, "WMI vdev down id 0x%x\n", vdev_id); 783 784 return ret; 785} 786 787static void ath11k_wmi_put_wmi_channel(struct wmi_channel *chan, 788 struct wmi_vdev_start_req_arg *arg) 789{ |
790 u32 center_freq1 = arg->channel.band_center_freq1; 791 |
|
786 memset(chan, 0, sizeof(*chan)); 787 788 chan->mhz = arg->channel.freq; 789 chan->band_center_freq1 = arg->channel.band_center_freq1; | 792 memset(chan, 0, sizeof(*chan)); 793 794 chan->mhz = arg->channel.freq; 795 chan->band_center_freq1 = arg->channel.band_center_freq1; |
790 if (arg->channel.mode == MODE_11AC_VHT80_80) | 796 797 if (arg->channel.mode == MODE_11AX_HE160) { 798 if (arg->channel.freq > arg->channel.band_center_freq1) 799 chan->band_center_freq1 = center_freq1 + 40; 800 else 801 chan->band_center_freq1 = center_freq1 - 40; 802 803 chan->band_center_freq2 = arg->channel.band_center_freq1; 804 805 } else if (arg->channel.mode == MODE_11AC_VHT80_80) { |
791 chan->band_center_freq2 = arg->channel.band_center_freq2; | 806 chan->band_center_freq2 = arg->channel.band_center_freq2; |
792 else | 807 } else { |
793 chan->band_center_freq2 = 0; | 808 chan->band_center_freq2 = 0; |
809 } |
|
794 795 chan->info |= FIELD_PREP(WMI_CHAN_INFO_MODE, arg->channel.mode); 796 if (arg->channel.passive) 797 chan->info |= WMI_CHAN_INFO_PASSIVE; 798 if (arg->channel.allow_ibss) 799 chan->info |= WMI_CHAN_INFO_ADHOC_ALLOWED; 800 if (arg->channel.allow_ht) 801 chan->info |= WMI_CHAN_INFO_ALLOW_HT; --- 6536 unchanged lines hidden --- | 810 811 chan->info |= FIELD_PREP(WMI_CHAN_INFO_MODE, arg->channel.mode); 812 if (arg->channel.passive) 813 chan->info |= WMI_CHAN_INFO_PASSIVE; 814 if (arg->channel.allow_ibss) 815 chan->info |= WMI_CHAN_INFO_ADHOC_ALLOWED; 816 if (arg->channel.allow_ht) 817 chan->info |= WMI_CHAN_INFO_ALLOW_HT; --- 6536 unchanged lines hidden --- |