qcacld-3.0: Introduce wlan_hdd_validate_vdev_id()

Introduce function wlan_hdd_validate_vdev_id() as a replacement for
wlan_hdd_validate_session_id() to align with the converged naming.

Change-Id: I12913e48c28f48ab7139d012b1584d8a8a9737ab
CRs-Fixed: 2404173
This commit is contained in:
Jeff Johnson 2019-02-23 14:33:34 -08:00 committed by nshrivas
parent 1011db9221
commit 7eb6e84efd
2 changed files with 15 additions and 11 deletions

View File

@ -2143,15 +2143,19 @@ int __wlan_hdd_validate_context(struct hdd_context *hdd_ctx, const char *func);
int __hdd_validate_adapter(struct hdd_adapter *adapter, const char *func);
/**
* wlan_hdd_validate_session_id() - ensure the given session Id is valid
* @session_id: the session Id to validate
* wlan_hdd_validate_vdev_id() - ensure the given vdev Id is valid
* @vdev_id: the vdev Id to validate
*
* Return: Errno
*/
#define wlan_hdd_validate_session_id(session_id) \
__wlan_hdd_validate_session_id(session_id, __func__)
#define wlan_hdd_validate_vdev_id(vdev_id) \
__wlan_hdd_validate_vdev_id(vdev_id, __func__)
int __wlan_hdd_validate_session_id(uint8_t session_id, const char *func);
int __wlan_hdd_validate_vdev_id(uint8_t vdev_id, const char *func);
/* legacy interface to be replaced */
#define wlan_hdd_validate_session_id(session_id) \
wlan_hdd_validate_vdev_id(session_id)
/**
* hdd_is_valid_mac_address() - validate MAC address

View File

@ -1074,18 +1074,18 @@ int __hdd_validate_adapter(struct hdd_adapter *adapter, const char *func)
return -EAGAIN;
}
return __wlan_hdd_validate_session_id(adapter->vdev_id, func);
return __wlan_hdd_validate_vdev_id(adapter->vdev_id, func);
}
int __wlan_hdd_validate_session_id(uint8_t session_id, const char *func)
int __wlan_hdd_validate_vdev_id(uint8_t vdev_id, const char *func)
{
if (session_id == CSR_SESSION_ID_INVALID) {
if (vdev_id == CSR_SESSION_ID_INVALID) {
hdd_debug_rl("adapter is not up (via %s)", func);
return -EINVAL;
}
if (session_id >= WLAN_MAX_VDEVS) {
hdd_err("bad session Id:%u (via %s)", session_id, func);
if (vdev_id >= WLAN_MAX_VDEVS) {
hdd_err("bad vdev Id:%u (via %s)", vdev_id, func);
return -EINVAL;
}
@ -2074,7 +2074,7 @@ bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx)
ap_ctx->operating_channel))) {
WLAN_HDD_GET_AP_CTX_PTR(adapter)->dfs_cac_block_tx =
true;
hdd_info("tx blocked for session: %d",
hdd_info("tx blocked for vdev: %d",
adapter->vdev_id);
if (adapter->txrx_vdev)
cdp_fc_vdev_flush(