qcacmn: Fix Zero CAC DFS kernel panic
* Moved target type macros to global target_if header file. * Fixed kernel panic: Channel details were written in invalid memory location. Change-Id: Ia9134b8dad651e53f57243c45eb93fb86ddd94c5 CRs-Fixed: 2104219
This commit is contained in:

committed by
snandini

parent
6a7f21d9e6
commit
4f8130e8c9
@@ -52,6 +52,11 @@
|
||||
#define GET_WMI_HDL_FROM_PSOC(psoc) \
|
||||
(((struct target_psoc_info *)(psoc->tgt_if_handle))->wmi_handle)
|
||||
|
||||
#define TARGET_TYPE_AR900B 9
|
||||
#define TARGET_TYPE_QCA9984 15 /* cascade */
|
||||
#define TARGET_TYPE_IPQ4019 16 /* dakota */
|
||||
#define TARGET_TYPE_QCA9888 17 /* besra */
|
||||
|
||||
typedef struct wlan_objmgr_psoc *(*get_psoc_handle_callback)(
|
||||
void *scn_handle);
|
||||
|
||||
@@ -159,5 +164,37 @@ QDF_STATUS target_if_register_legacy_service_ready_cb(
|
||||
wmi_legacy_service_ready_callback service_ready_cb);
|
||||
|
||||
void *target_if_get_wmi_handle(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* target_is_tgt_type_ar900b() - Check if the target type is AR900B
|
||||
* @target_type: target type to be checked.
|
||||
*
|
||||
* Return: true if the target_type is AR900B, else false.
|
||||
*/
|
||||
bool target_is_tgt_type_ar900b(uint32_t target_type);
|
||||
|
||||
/**
|
||||
* target_is_tgt_type_ipq4019() - Check if the target type is IPQ4019
|
||||
* @target_type: target type to be checked.
|
||||
*
|
||||
* Return: true if the target_type is IPQ4019, else false.
|
||||
*/
|
||||
bool target_is_tgt_type_ipq4019(uint32_t target_type);
|
||||
|
||||
/**
|
||||
* target_is_tgt_type_qca9984() - Check if the target type is QCA9984
|
||||
* @target_type: target type to be checked.
|
||||
*
|
||||
* Return: true if the target_type is QCA9984, else false.
|
||||
*/
|
||||
bool target_is_tgt_type_qca9984(uint32_t target_type);
|
||||
|
||||
/**
|
||||
* target_is_tgt_type_qca9888() - Check if the target type is QCA9888
|
||||
* @target_type: target type to be checked.
|
||||
*
|
||||
* Return: true if the target_type is QCA9888, else false.
|
||||
*/
|
||||
bool target_is_tgt_type_qca9888(uint32_t target_type);
|
||||
#endif
|
||||
|
||||
|
@@ -205,6 +205,31 @@ static void target_if_sptrl_tx_ops_register(
|
||||
}
|
||||
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||
|
||||
static void target_if_target_tx_ops_register(
|
||||
struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
struct wlan_lmac_if_target_tx_ops *target_tx_ops;
|
||||
|
||||
if (!tx_ops) {
|
||||
target_if_err("invalid tx_ops");
|
||||
return;
|
||||
}
|
||||
|
||||
target_tx_ops = &tx_ops->target_tx_ops;
|
||||
|
||||
target_tx_ops->tgt_is_tgt_type_ar900b =
|
||||
target_is_tgt_type_ar900b;
|
||||
|
||||
target_tx_ops->tgt_is_tgt_type_ipq4019 =
|
||||
target_is_tgt_type_ipq4019;
|
||||
|
||||
target_tx_ops->tgt_is_tgt_type_qca9984 =
|
||||
target_is_tgt_type_qca9984;
|
||||
|
||||
target_tx_ops->tgt_is_tgt_type_qca9888 =
|
||||
target_is_tgt_type_qca9888;
|
||||
}
|
||||
|
||||
static
|
||||
QDF_STATUS target_if_register_umac_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
@@ -230,6 +255,9 @@ QDF_STATUS target_if_register_umac_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
target_if_son_tx_ops_register(tx_ops);
|
||||
|
||||
target_if_tdls_tx_ops_register(tx_ops);
|
||||
|
||||
target_if_target_tx_ops_register(tx_ops);
|
||||
|
||||
/* Converged UMAC components to register their TX-ops here */
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -303,3 +331,22 @@ void *target_if_get_wmi_handle(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
}
|
||||
|
||||
bool target_is_tgt_type_ar900b(uint32_t target_type)
|
||||
{
|
||||
return target_type == TARGET_TYPE_AR900B;
|
||||
}
|
||||
|
||||
bool target_is_tgt_type_ipq4019(uint32_t target_type)
|
||||
{
|
||||
return target_type == TARGET_TYPE_IPQ4019;
|
||||
}
|
||||
|
||||
bool target_is_tgt_type_qca9984(uint32_t target_type)
|
||||
{
|
||||
return target_type == TARGET_TYPE_QCA9984;
|
||||
}
|
||||
|
||||
bool target_is_tgt_type_qca9888(uint32_t target_type)
|
||||
{
|
||||
return target_type == TARGET_TYPE_QCA9888;
|
||||
}
|
||||
|
Reference in New Issue
Block a user