qcacld-3.0: Set max bandwidth with link id
Support wpa_cli driver SET_MAX_BW with two params: [bw_index][link_id]. Change-Id: Id2a872152e308e94389cd1068013d7661b37659b CRs-Fixed: 3522561
This commit is contained in:

committed by
Rahul Choudhary

vanhempi
efb48cb5c3
commit
5208f9f8e4
@@ -4810,13 +4810,15 @@ QDF_STATUS ucfg_mlme_update_bss_rate_flags(struct wlan_objmgr_psoc *psoc,
|
||||
* @psoc: pointer to psoc object
|
||||
* @vdev_id: Vdev id
|
||||
* @ch_width: channel width to update
|
||||
* @link_id: mlo link id
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_send_ch_width_update_with_notify(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
enum phy_ch_width ch_width);
|
||||
enum phy_ch_width ch_width,
|
||||
uint8_t link_id);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_is_chwidth_with_notify_supported() - Get chwidth with notify
|
||||
|
@@ -7027,7 +7027,7 @@ static QDF_STATUS
|
||||
wlan_mlme_update_vdev_chwidth_with_notify(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t vdev_id,
|
||||
enum phy_ch_width ch_width)
|
||||
wmi_host_channel_width ch_width)
|
||||
{
|
||||
struct vdev_mlme_obj *vdev_mlme;
|
||||
struct vdev_set_params param = {0};
|
||||
@@ -7293,6 +7293,7 @@ wlan_mlme_send_ch_width_update_with_notify(struct wlan_objmgr_psoc *psoc,
|
||||
enum phy_ch_width ch_width)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
wmi_host_channel_width wmi_chan_width;
|
||||
enum phy_ch_width associated_ch_width;
|
||||
struct wlan_channel *des_chan;
|
||||
struct mlme_legacy_priv *mlme_priv;
|
||||
@@ -7328,9 +7329,11 @@ wlan_mlme_send_ch_width_update_with_notify(struct wlan_objmgr_psoc *psoc,
|
||||
return status;
|
||||
}
|
||||
|
||||
wmi_chan_width = target_if_phy_ch_width_to_wmi_chan_width(ch_width);
|
||||
|
||||
/* update ch width to fw */
|
||||
status = wlan_mlme_update_vdev_chwidth_with_notify(psoc, vdev, vdev_id,
|
||||
ch_width);
|
||||
wmi_chan_width);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
mlme_err("vdev %d: Failed to update CW:%d to fw, status:%d",
|
||||
vdev_id, ch_width, status);
|
||||
|
@@ -396,12 +396,15 @@ QDF_STATUS ucfg_mlme_update_bss_rate_flags(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS
|
||||
ucfg_mlme_send_ch_width_update_with_notify(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
enum phy_ch_width ch_width)
|
||||
enum phy_ch_width ch_width,
|
||||
uint8_t link_id)
|
||||
{
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
QDF_STATUS status;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
enum QDF_OPMODE op_mode;
|
||||
bool is_mlo_vdev;
|
||||
struct wlan_objmgr_vdev *link_vdev;
|
||||
bool is_mlo_link = false;
|
||||
uint8_t link_vdev_id;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
|
||||
WLAN_MLME_OBJMGR_ID);
|
||||
@@ -411,16 +414,32 @@ ucfg_mlme_send_ch_width_update_with_notify(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
|
||||
op_mode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
is_mlo_vdev = wlan_vdev_mlme_is_mlo_vdev(vdev);
|
||||
if (op_mode != QDF_STA_MODE || is_mlo_vdev) {
|
||||
mlme_legacy_debug("vdev %d: op mode %d, is_mlo_vdev:%d, CW update not supported",
|
||||
vdev_id, op_mode, is_mlo_vdev);
|
||||
if (op_mode != QDF_STA_MODE) {
|
||||
mlme_legacy_debug("vdev %d: op mode %d, CW update not supported",
|
||||
vdev_id, op_mode);
|
||||
status = QDF_STATUS_E_NOSUPPORT;
|
||||
goto release;
|
||||
}
|
||||
|
||||
status = wlan_mlme_send_ch_width_update_with_notify(psoc, vdev,
|
||||
vdev_id, ch_width);
|
||||
if (wlan_vdev_mlme_is_mlo_vdev(vdev) && link_id != 0xFF) {
|
||||
link_vdev = mlo_get_vdev_by_link_id(vdev, link_id);
|
||||
if (!link_vdev) {
|
||||
mlme_legacy_debug("vdev is null for the link id:%u",
|
||||
link_id);
|
||||
goto release;
|
||||
}
|
||||
is_mlo_link = true;
|
||||
link_vdev_id = wlan_vdev_get_id(link_vdev);
|
||||
} else {
|
||||
link_vdev = vdev;
|
||||
link_vdev_id = vdev_id;
|
||||
mlme_legacy_debug("vdev mlme is not mlo vdev");
|
||||
}
|
||||
status = wlan_mlme_send_ch_width_update_with_notify(psoc, link_vdev,
|
||||
link_vdev_id,
|
||||
ch_width);
|
||||
if (is_mlo_link)
|
||||
mlo_release_vdev_ref(link_vdev);
|
||||
|
||||
release:
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID);
|
||||
|
Viittaa uudesa ongelmassa
Block a user