Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Commit 722db9a

Browse files
committed
fixup! bwl: dwpal: update refresh_vap_info to fill in bss field
1 parent 4e9ac7f commit 722db9a

1 file changed

Lines changed: 10 additions & 16 deletions

File tree

common/beerocks/bwl/dwpal/base_wlan_hal_dwpal.cpp

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -918,25 +918,19 @@ bool base_wlan_hal_dwpal::get_vap_type(const std::string &ifname, bool &fronthau
918918

919919
bool base_wlan_hal_dwpal::refresh_vap_info(int vap_id)
920920
{
921-
const std::string ifname =
922-
beerocks::utils::get_iface_string_from_iface_vap_ids(m_radio_info.iface_name, vap_id);
923-
if (ifname.empty()) {
924-
LOG(ERROR) << "Failed to get vap_iface from radio " << m_radio_info.iface_name
925-
<< " and vap id " << vap_id;
926-
return false;
927-
}
928-
929921
char *reply = nullptr;
930922
size_t numOfValidArgs[3] = {0}, replyLen = 0;
931923
char bss[beerocks::message::IFACE_NAME_LENGTH];
932924
char ssid[SSID_MAX_SIZE] = {0}, bssid[MAC_ADDR_SIZE] = {0};
933-
FieldsToParse fieldsToParse[] = {
934-
{(void *)bss, &numOfValidArgs[0], DWPAL_STR_PARAM, "Name=", sizeof(bss)},
935-
{(void *)bssid, &numOfValidArgs[1], DWPAL_STR_PARAM, "BSSID=", sizeof(bssid)},
936-
{(void *)ssid, &numOfValidArgs[2], DWPAL_STR_PARAM, "SSID=", sizeof(ssid)},
937-
/* Must be at the end */
938-
{NULL, NULL, DWPAL_NUM_OF_PARSING_TYPES, NULL, 0}};
939-
std::string cmd = "GET_VAP_MEASUREMENTS " + ifname;
925+
FieldsToParse fieldsToParse[] = {{(void *)bss, &numOfValidArgs[0], DWPAL_STR_PARAM,
926+
"bss[" + std::to_string(vap_id) + "]=", sizeof(bss)},
927+
{(void *)bssid, &numOfValidArgs[1], DWPAL_STR_PARAM,
928+
"bssid[" + std::to_string(vap_id) + "]=", sizeof(bssid)},
929+
{(void *)ssid, &numOfValidArgs[2], DWPAL_STR_PARAM,
930+
"ssid[" + std::to_string(vap_id) + "]=", sizeof(ssid)},
931+
/* Must be at the end */
932+
{NULL, NULL, DWPAL_NUM_OF_PARSING_TYPES, NULL, 0}};
933+
std::string cmd = "STATUS";
940934

941935
// Read the VAP information
942936
if (!dwpal_send_cmd(cmd, &reply) || reply[0] == '\0') {
@@ -956,7 +950,7 @@ bool base_wlan_hal_dwpal::refresh_vap_info(int vap_id)
956950
}
957951

958952
/* TEMP: Traces... */
959-
LOG(DEBUG) << "GET_VAP_MEASUREMENTS reply=\n" << reply;
953+
LOG(DEBUG) << "STATUS reply=\n" << reply;
960954
LOG(DEBUG) << "numOfValidArgs[0]= " << numOfValidArgs[0] << " BSS= " << bss;
961955
LOG(DEBUG) << "numOfValidArgs[1]= " << numOfValidArgs[1] << " BSSID= " << bssid;
962956
LOG(DEBUG) << "numOfValidArgs[2]= " << numOfValidArgs[2] << " SSID= " << ssid;

0 commit comments

Comments
 (0)