From 960d8042a683161a87f03a46fe20e08e99b35b56 Mon Sep 17 00:00:00 2001 From: Janusz Dziedzic <janusz.dziedzic@iopsys.eu> Date: Thu, 12 Jun 2025 19:06:14 +0200 Subject: [PATCH] rename and use wifi_opclass_get_attr() --- src/acs.c | 8 ++++---- src/wifi_opclass.c | 10 +++++----- src/wifi_opclass.h | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/acs.c b/src/acs.c index 75c59029..af9cca65 100644 --- a/src/acs.c +++ b/src/acs.c @@ -151,7 +151,7 @@ uint8_t ctrl_radio_cur_opclass_id(struct wifi_radio_element *radio) uint8_t id = 0; int ret; - ret = wifi_opclass_get_max_bw(&radio->cur_opclass, NULL, NULL, &id, NULL); + ret = wifi_opclass_get_attr(&radio->cur_opclass, NULL, NULL, &id, NULL); if (ret) return 0; return id; @@ -162,7 +162,7 @@ uint8_t ctrl_radio_cur_opclass_ctrl_chan(struct wifi_radio_element *radio) uint8_t ctrl_chan = 0; int ret; - ret = wifi_opclass_get_max_bw(&radio->cur_opclass, &ctrl_chan, NULL, NULL, NULL); + ret = wifi_opclass_get_attr(&radio->cur_opclass, &ctrl_chan, NULL, NULL, NULL); if (ret) return 0; return ctrl_chan; @@ -173,7 +173,7 @@ uint8_t ctrl_radio_cur_opclass_chan(struct wifi_radio_element *radio) uint8_t chan = 0; int ret; - ret = wifi_opclass_get_max_bw(&radio->cur_opclass, NULL, NULL, NULL, &chan); + ret = wifi_opclass_get_attr(&radio->cur_opclass, NULL, NULL, NULL, &chan); if (ret) return 0; return chan; @@ -184,7 +184,7 @@ uint16_t ctrl_radio_cur_opclass_max_bw(struct wifi_radio_element *radio) uint32_t bw = 0; int ret; - ret = wifi_opclass_get_max_bw(&radio->cur_opclass, NULL, &bw, NULL, NULL); + ret = wifi_opclass_get_attr(&radio->cur_opclass, NULL, &bw, NULL, NULL); if (ret) return 0; return bw; diff --git a/src/wifi_opclass.c b/src/wifi_opclass.c index 3ac47d72..27cca247 100644 --- a/src/wifi_opclass.c +++ b/src/wifi_opclass.c @@ -1450,11 +1450,11 @@ int wifi_radio_opclass_update_channel(struct wifi_radio_opclass *opclass, uint8_ return 0; } -int wifi_opclass_get_max_bw(struct wifi_radio_opclass *opclass, - uint8_t *ctrl_channel, - uint32_t *bw, - uint8_t *id, - uint8_t *channel) +int wifi_opclass_get_attr(struct wifi_radio_opclass *opclass, + uint8_t *ctrl_channel, + uint32_t *bw, + uint8_t *id, + uint8_t *channel) { struct wifi_radio_opclass_entry *entry, *max = NULL; uint32_t max_bw = 0; diff --git a/src/wifi_opclass.h b/src/wifi_opclass.h index 49fecb56..ef2f6d76 100644 --- a/src/wifi_opclass.h +++ b/src/wifi_opclass.h @@ -73,11 +73,11 @@ struct wifi_radio_opclass_channel *wifi_opclass_get_ctrl_channel(struct wifi_rad bool wifi_opclass_has_channel(uint8_t id, uint8_t channel); int wifi_radio_opclass_update_channel(struct wifi_radio_opclass *opclass, uint8_t band, uint32_t channel, uint32_t bw, uint8_t pref); -int wifi_opclass_get_max_bw(struct wifi_radio_opclass *opclass, - uint8_t *ctrl_channel, - uint32_t *bw, - uint8_t *id, - uint8_t *channel); +int wifi_opclass_get_attr(struct wifi_radio_opclass *opclass, + uint8_t *ctrl_channel, + uint32_t *bw, + uint8_t *id, + uint8_t *channel); uint32_t wifi_opclass_highest_bandwidth(struct wifi_radio_opclass *opclass, bool available_only); #ifdef __cplusplus -- GitLab