Skip to content

Commit

Permalink
samples: wifi: twt: Replace arrays to function calls
Browse files Browse the repository at this point in the history
There are some changes in wifi.h header file, which
converts static arrays to functions. Replacing the arrays
to function calls.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
  • Loading branch information
kapbh authored and de-nordic committed Oct 2, 2023
1 parent da2d601 commit 0fe4020
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions samples/wifi/twt/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ static int teardown_twt(void)
ret = net_mgmt(NET_REQUEST_WIFI_TWT, iface, &params, sizeof(params));
if (ret) {
LOG_ERR("%s with %s failed, reason : %s",
wifi_twt_operation2str[params.operation],
wifi_twt_negotiation_type2str[params.negotiation_type],
wifi_twt_operation_txt(params.operation),
wifi_twt_negotiation_type_txt(params.negotiation_type),
wifi_twt_get_err_code_str(params.fail_reason));
return ret;
}
Expand Down Expand Up @@ -221,7 +221,7 @@ static void print_twt_params(uint8_t dialog_token, uint8_t flow_id,
LOG_INF("TWT flow ID: %d",
flow_id);
LOG_INF("TWT negotiation type: %s",
wifi_twt_negotiation_type2str[negotiation_type]);
wifi_twt_negotiation_type_txt(negotiation_type));
LOG_INF("TWT responder: %s",
responder ? "true" : "false");
LOG_INF("TWT implicit: %s",
Expand Down Expand Up @@ -251,7 +251,7 @@ static void handle_wifi_twt_event(struct net_mgmt_event_callback *cb)
if (resp->resp_status == WIFI_TWT_RESP_RECEIVED) {
twt_resp_received = 1;
LOG_INF("TWT response: %s",
wifi_twt_setup_cmd2str[resp->setup_cmd]);
wifi_twt_setup_cmd_txt(resp->setup_cmd));
LOG_INF("== TWT negotiated parameters ==");
print_twt_params(resp->dialog_token,
resp->flow_id,
Expand Down

0 comments on commit 0fe4020

Please sign in to comment.