Files
android_kernel_samsung_sm86…/umac/mlme/include/wlan_pdev_mlme.h
Vijay Krishnan 419023d09e qcacmn: Introduce function to check max phy REP
If the rpt_max_phy featurte is enabled, the AP VAP of a
repeater may come up in chan 36 HT160 mode while the STA
of the repeater may come up in chan 36 HT80 mode. The
ic_curchan has the max BW value(i.e. 160 MHz). In this
case, ic_curchan is HT160. But dfs_curchan is updated
to HT80 by the API vdev_mgr_start_param_update. The
updated BW is send via VDEV START command.

This creates a mismatch between FW and HOST. FW has the BW
as HT160 and HOST has the BW as HT80. At this time, if
radar is found on chan 36, Host rejects the radar because
dfs_curchan is 36HT80 and it is a non-dfs channel. FW stops
beaconing because of no respone from host.

Fix: Dont send the VDEV START command, if the repeater max
phy mode is enabled.

This patch introduce a new API wlan_rptr_check_rpt_max_phy
that is used to invoke WIN API wlan_check_rpt_max_phy if
repeater max phy mode is enabled or not.

Before sending VDEV START command, check if the opmode is STA,
and repeater max phymode is not enabled. If the two conditions
satisfy, then send VDEV START command.

CRs-Fixed: 3613048
Change-Id: I072f62fe038c5f4dfae0318fff54189dca9e5a46
2023-09-22 07:29:13 -07:00

74 lines
2.7 KiB
C

/*
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/**
* DOC: Define PDEV MLME structure and APIs
*/
#ifndef _WLAN_PDEV_MLME_H_
#define _WLAN_PDEV_MLME_H_
#include <qdf_timer.h>
#include <include/wlan_vdev_mlme.h>
#include <wlan_ext_mlme_obj_types.h>
/**
* struct pdev_restart_attr - Pdev restart attributes
* @vdev: vdev on which the pdev restart cmd was enqueued
* @restart_bmap: Bitmap for vdev requesting multivdev restart
*/
struct pdev_restart_attr {
struct wlan_objmgr_vdev *vdev;
qdf_bitmap(restart_bmap, WLAN_UMAC_PSOC_MAX_VDEVS);
};
/**
* struct pdev_mlme_obj - PDEV MLME component object
* @pdev: PDEV object
* @ext_pdev_ptr: PDEV MLME legacy pointer
* @mlme_register_ops: Call back to register MLME legacy APIs
* @vdev_restart_lock: Lock for VDEVs restart
* @restart_req_timer: Timer handle for VDEVs restart
* @restart_pend_vdev_bmap: Bitmap for VDEV RESTART command pending
* @restart_send_vdev_bmap: Bitmap for VDEV RESTART command sending
* @start_send_vdev_arr: Bitmap for VDEV START command sending
* @pdev_restart: Pdev restart attributes structure
* @multivdev_restart_wait_cnt: multi vdev restart wait counter
*/
struct pdev_mlme_obj {
struct wlan_objmgr_pdev *pdev;
mlme_pdev_ext_t *ext_pdev_ptr;
QDF_STATUS (*mlme_register_ops)(struct vdev_mlme_obj *vdev_mlme);
qdf_spinlock_t vdev_restart_lock;
qdf_timer_t restart_req_timer;
qdf_bitmap(restart_pend_vdev_bmap, WLAN_UMAC_PSOC_MAX_VDEVS);
qdf_bitmap(restart_send_vdev_bmap, WLAN_UMAC_PSOC_MAX_VDEVS);
qdf_bitmap(start_send_vdev_arr, WLAN_UMAC_PSOC_MAX_VDEVS);
struct pdev_restart_attr pdev_restart;
qdf_atomic_t multivdev_restart_wait_cnt;
};
#ifdef MOBILE_DFS_SUPPORT
static inline
bool wlan_rptr_check_rpt_max_phy(struct wlan_objmgr_pdev *pdev)
{
return false;
}
#else
bool wlan_rptr_check_rpt_max_phy(struct wlan_objmgr_pdev *pdev);
#endif /* MOBILE_DFS_SUPPORT */
#endif