Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDKB-57124: XWIFI reject telemetry marker #35

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/wifi_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -3808,6 +3808,19 @@ INT wifi_vapstatus_callback_register(wifi_vapstatus_callback func) {
return RETURN_OK;
}

void wifi_hal_ap_max_client_rejection_callback_register(wifi_apMaxClientRejection_callback func)
{
wifi_device_callbacks_t *callbacks;

callbacks = get_hal_device_callbacks();

if (callbacks == NULL) {
return;
}

callbacks->max_cli_rejection_cb = func;
}

void wifi_hal_apDisassociatedDevice_callback_register(wifi_apDisassociatedDevice_callback func)
{
wifi_device_callbacks_t *callbacks;
Expand Down
16 changes: 13 additions & 3 deletions src/wifi_hal_nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#include <rdk_nl80211_hal.h>
#endif


#define AP_UNABLE_TO_HANDLE_ADDITIONAL_ASSOCIATIONS 17
#define OVS_MODULE "/sys/module/openvswitch"
#define ONEWIFI_TESTSUITE_TMPFILE "/tmp/onewifi_testsuite_configured"

Expand Down Expand Up @@ -1876,7 +1876,6 @@ int process_frame_mgmt(wifi_interface_info_t *interface, struct ieee80211_mgmt *
mgmt_type = WIFI_MGMT_FRAME_TYPE_DEAUTH;
wifi_hal_dbg_print("%s:%d: Received deauth frame from: %s\n", __func__, __LINE__,
to_mac_str(sta, sta_mac_str));

if (callbacks->num_apDeAuthEvent_cbs == 0) {
break;
}
Expand Down Expand Up @@ -10276,8 +10275,10 @@ int wifi_drv_send_mlme(void *priv, const u8 *data,
u16 fc;
int use_cookie = 1;
int res, interface_freq;
//mac_addr_str_t mac_str;

char country[8];
wifi_device_callbacks_t *callbacks;
callbacks = get_hal_device_callbacks();

interface = (wifi_interface_info_t *)priv;
vap = &interface->vap_info;
Expand All @@ -10293,6 +10294,15 @@ int wifi_drv_send_mlme(void *priv, const u8 *data,

mgmt = (struct ieee80211_mgmt *) data;
fc = le_to_host16(mgmt->frame_control);

if (WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_AUTH &&
mgmt->u.auth.status_code == AP_UNABLE_TO_HANDLE_ADDITIONAL_ASSOCIATIONS &&
callbacks->max_cli_rejection_cb != NULL) {
mac_addr_str_t mac_str;
callbacks->max_cli_rejection_cb(interface->vap_info.vap_index,
to_mac_str(mgmt->da, mac_str), AP_UNABLE_TO_HANDLE_ADDITIONAL_ASSOCIATIONS);
}

//wifi_hal_dbg_print("nl80211: send_mlme - da= %s noack=%d freq=%u fc=0x%x\n",
//to_mac_str(mgmt->da, mac_str), noack, freq, fc);

Expand Down
16 changes: 8 additions & 8 deletions src/wifi_hal_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,14 +426,13 @@ typedef struct wifi_interface_info_t {
mac_address_t mac;
unsigned int type;
unsigned int interface_status;
bool primary;
wifi_vap_info_t vap_info;
bool vap_initialized;
bool bss_started;

bool vap_configured; // important flag, flag = true means that hostap is configured for this and
// interface is ready to receive 802.11 data frames
bool bridge_configured;
bool primary;
wifi_vap_info_t vap_info;
bool vap_initialized;
bool bss_started;
bool vap_configured; // important flag, flag = true means that hostap is configured for this and
// interface is ready to receive 802.11 data frames
bool bridge_configured;
struct nl_handle *nl_event;
int nl_event_fd;
struct nl_cb *nl_cb;
Expand Down Expand Up @@ -805,6 +804,7 @@ void wifi_hal_apDisassociatedDevice_callback_register(wifi_apDisassociatedDevice
void wifi_hal_radiusEapFailure_callback_register(wifi_radiusEapFailure_callback func);
void wifi_hal_radiusFallback_failover_callback_register(wifi_radiusFallback_failover_callback func);
void wifi_hal_apDeAuthEvent_callback_register(wifi_apDeAuthEvent_callback func);
void wifi_hal_ap_max_client_rejection_callback_register(wifi_apMaxClientRejection_callback func);
INT wifi_hal_BTMQueryRequest_callback_register(UINT apIndex,
wifi_BTMQueryRequest_callback btmQueryCallback,
wifi_BTMResponse_callback btmResponseCallback);
Expand Down
1 change: 1 addition & 0 deletions src/wifi_hal_rdk_framework.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ typedef struct {
struct rtnl_kvr_handle rtnl_kvr;
wifi_newApAssociatedDevice_callback assoc_cb[MAX_REGISTERED_CB_NUM];
unsigned int num_assoc_cbs;
wifi_apMaxClientRejection_callback max_cli_rejection_cb;
wifi_apDisassociatedDevice_callback disassoc_cb[MAX_REGISTERED_CB_NUM];
unsigned int num_disassoc_cbs;
unsigned int num_radius_eap_cbs;
Expand Down