diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 8aa50fbd9ea8..286b53ecf423 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -977,7 +977,7 @@ QDF_STATUS hdd_softap_deregister_sta(struct hdd_adapter *adapter, hdd_ctx = WLAN_HDD_GET_CTX(adapter); - if (sta_id >= HDD_MAX_ADAPTERS) { + if (sta_id >= WLAN_MAX_STA_COUNT) { hdd_err("Error: Invalid sta_id: %u", sta_id); return QDF_STATUS_E_INVAL; } @@ -1035,7 +1035,7 @@ QDF_STATUS hdd_softap_register_sta(struct hdd_adapter *adapter, hdd_info("STA:%u, Auth:%u, Priv:%u, WMM:%u", sta_id, auth_required, privacy_required, wmm_enabled); - if (sta_id >= HDD_MAX_ADAPTERS) { + if (sta_id >= WLAN_MAX_STA_COUNT) { hdd_err("Error: Invalid sta_id: %u", sta_id); return qdf_status; } @@ -1156,7 +1156,7 @@ QDF_STATUS hdd_softap_register_bc_sta(struct hdd_adapter *adapter, ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter); sta_id = ap_ctx->broadcast_sta_id; - if (sta_id >= HDD_MAX_ADAPTERS) { + if (sta_id >= WLAN_MAX_STA_COUNT) { hdd_err("Error: Invalid sta_id: %u", sta_id); return qdf_status; }