-
Notifications
You must be signed in to change notification settings - Fork 110
DTMESH-496: Add WPS results callback registration API #637
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
base: develop
Are you sure you want to change the base?
Conversation
I have read the CLA Document and I hereby sign the CLA |
Reason for change: To be able start WPS session from OVSDB Test procedure: 1) Verify successful build. 2) Change wps_pbc value in Wifi_VIF_Config 3) Confirm that callback executes correctly and updates runtime/OVSDB state. Risks: Low. Scoped to WPS feature with guarded code paths. Priority: P1 Signed-off-by: Arsen Podoba <[email protected]>
3deb9ca
to
a45a921
Compare
return; | ||
} | ||
|
||
int wps_event_callback(int apIndex, wifi_wps_ev_t event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add "static"
|
||
int wps_event_callback(int apIndex, wifi_wps_ev_t event) | ||
{ | ||
wifi_wps_event_t wps_event; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initialize to 0, wifi_wps_event_t wps_event = {};
wps_event.vap_index = apIndex; | ||
wps_event.event = event; | ||
|
||
push_event_to_ctrl_queue((wifi_wps_event_t *)&wps_event, sizeof(wifi_wps_event_t), wifi_event_type_hal_ind, wifi_event_hal_wps_results, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code style: more than 100 chars in line, please format with clang-format
} | ||
} | ||
|
||
void process_wps_results_event(wifi_wps_event_t *wps_event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add "static"
wifi_util_info_print(WIFI_CTRL, "%s:%d wps event[%d] is received\n", __func__, __LINE__, wps_event->event); | ||
|
||
switch(wps_event->event) { | ||
case wifi_wps_ev_pbc_active: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code style: please format the function with clang-format, switch-case on the same level
wifi_vap_info_t *vap_info = NULL; | ||
rdk_wifi_vap_info_t *rdk_vap_info = NULL; | ||
unsigned int vap_index = wps_event->vap_index; | ||
bool wpsPushButton = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lowercase naming wps_push_button
unsigned int vap_index = wps_event->vap_index; | ||
bool wpsPushButton = false; | ||
|
||
wifi_util_info_print(WIFI_CTRL, "%s:%d wps event[%d] is received\n", __func__, __LINE__, wps_event->event); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more than 100 chars in line
|
||
wifi_util_info_print(WIFI_CTRL, "%s:%d wps event[%d] is received\n", __func__, __LINE__, wps_event->event); | ||
|
||
switch(wps_event->event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing space after switch before (
|
||
wifi_util_dbg_print(WIFI_CTRL,"%s:%d: Comparing VAP [%s] with [%s]. \n",__func__, __LINE__,mgr_vap_info->vap_name,vap_info->vap_name); | ||
if (is_vap_param_config_changed(mgr_vap_info, vap_info, mgr_rdk_vap_info, rdk_vap_info, | ||
if (is_vap_param_config_changed_except_wpsPushButton(mgr_vap_info, vap_info, mgr_rdk_vap_info, rdk_vap_info, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please implement in different way:
similar to webconfig_send_sta_bssid_change_event add send_wps_change_event function
inside function send event and overwrite value mgr_vap_info->u.bss_info.wpsPushButton = rdk_vap_info->->u.bss_info.wpsPushButton to avoid change detection in is_vap_param_config_changed
Reason for change: To be able start WPS session from OVSDB
Test procedure:
1) Verify successful build.
2) Change wps_pbc value in Wifi_VIF_Config
3) Confirm that callback executes correctly and updates runtime/OVSDB state.
Risks: Low. Scoped to WPS feature with guarded code paths.
Priority: P1