qcacld-3.0: Update puncture bitmap to upper layer

Update puncture bitmap along with channel to upper layer when channel
or puncture bitmap changed.

Change-Id: Idc0ffbd4358c328ba22453c6b523843c8d4fc486
CRs-Fixed: 3436336
Cette révision appartient à :
Jianmin Zhu
2023-02-02 22:30:14 +08:00
révisé par Madan Koyyalamudi
Parent e2f37d76f4
révision d1dde88d53
2 fichiers modifiés avec 39 ajouts et 2 suppressions

5
Kbuild
Voir le fichier

@@ -62,6 +62,11 @@ ifeq ($(findstring yes, $(found)), yes)
cppflags-y += -DCFG80211_RU_PUNCT_SUPPORT
endif
found = $(shell if grep -qF "unsigned int link_id, u16 punct_bitmap" $(srctree)/include/net/cfg80211.h; then echo "yes" ;else echo "no" ;fi;)
ifeq ($(findstring yes, $(found)), yes)
cppflags-y += -DCFG80211_RU_PUNCT_NOTIFY
endif
include $(WLAN_ROOT)/configs/$(CONFIG_QCA_CLD_WLAN_PROFILE)_defconfig
# add configurations in WLAN_CFG_OVERRIDE

Voir le fichier

@@ -918,6 +918,12 @@ static inline bool wlan_hdd_is_chwidth_320mhz(enum phy_ch_width ch_width)
{
return ch_width == CH_WIDTH_320MHZ;
}
static uint16_t
wlan_hdd_get_puncture_bitmap(struct hdd_chan_change_params chan_change)
{
return chan_change.chan_params.reg_punc_bitmap;
}
#else /* !WLAN_FEATURE_11BE */
static inline
void wlan_hdd_set_chandef_320mhz(struct cfg80211_chan_def *chandef,
@@ -934,6 +940,12 @@ static inline bool wlan_hdd_is_chwidth_320mhz(enum phy_ch_width ch_width)
{
return false;
}
static inline uint16_t
wlan_hdd_get_puncture_bitmap(struct hdd_chan_change_params chan_change)
{
return 0;
}
#endif /* WLAN_FEATURE_11BE */
QDF_STATUS hdd_chan_change_notify(struct hdd_adapter *adapter,
@@ -948,6 +960,7 @@ QDF_STATUS hdd_chan_change_notify(struct hdd_adapter *adapter,
mac_handle_t mac_handle = adapter->hdd_ctx->mac_handle;
struct wlan_objmgr_vdev *vdev;
uint16_t link_id = 0;
uint16_t puncture_bitmap = 0;
if (!mac_handle) {
hdd_err("mac_handle is NULL");
@@ -1024,14 +1037,16 @@ QDF_STATUS hdd_chan_change_notify(struct hdd_adapter *adapter,
if (wlan_vdev_mlme_is_mlo_vdev(vdev))
link_id = wlan_vdev_get_link_id(vdev);
hdd_debug("link_id is %d", link_id);
puncture_bitmap = wlan_hdd_get_puncture_bitmap(chan_change);
hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_ID);
hdd_debug("notify: chan:%d width:%d freq1:%d freq2:%d",
chandef.chan->center_freq, chandef.width,
chandef.center_freq1, chandef.center_freq2);
wlan_cfg80211_ch_switch_notify(dev, &chandef, link_id);
wlan_cfg80211_ch_switch_notify(dev, &chandef, link_id,
puncture_bitmap);
return QDF_STATUS_SUCCESS;
}
@@ -1687,6 +1702,22 @@ static void hdd_hostapd_set_sap_key(struct hdd_adapter *adapter)
}
}
#ifdef WLAN_FEATURE_11BE
static void
hdd_fill_channel_change_puncture(struct hdd_chan_change_params *chan_change,
struct ch_params *sap_ch_param)
{
chan_change->chan_params.reg_punc_bitmap =
sap_ch_param->reg_punc_bitmap;
}
#else
static void
hdd_fill_channel_change_puncture(struct hdd_chan_change_params *chan_change,
struct ch_params *sap_ch_param)
{
}
#endif
/**
* hdd_hostapd_chan_change() - prepare new operation chan info to kernel
* @adapter: pointre to hdd_adapter
@@ -1744,6 +1775,7 @@ static QDF_STATUS hdd_hostapd_chan_change(struct hdd_adapter *adapter,
sap_chan_selected->vht_seg0_center_ch_freq;
chan_change.chan_params.mhz_freq_seg1 =
sap_chan_selected->vht_seg1_center_ch_freq;
hdd_fill_channel_change_puncture(&chan_change, &sap_ch_param);
return hdd_chan_change_notify(adapter, adapter->dev,
chan_change, legacy_phymode);