-
Notifications
You must be signed in to change notification settings - Fork 32
update_vap_stats() fails for wlan0.0 in Gl.Inet B1300 #1563
base: master
Are you sure you want to change the base?
Changes from all commits
037603a
ab0dc74
54f067d
4803cda
a1fbd87
828137f
0ee69e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2241,8 +2241,7 @@ void monitor_thread::update_vaps_in_db() | |
|
|
||
| // if vap exist in HAL, update it in the local db. | ||
| if (radio_vaps.find(vap_id) != radio_vaps.end()) { | ||
| auto iface_name = beerocks::utils::get_iface_string_from_iface_vap_ids( | ||
| mon_wlan_hal->get_radio_info().iface_name, vap_id); | ||
| auto iface_name = radio_vaps.at(vap_id).bss; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again, the naming issue... I think the idea is clear at this point, too many names for the same thing.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As said, I agree with you. But if I rename this variable, then I'll also have to rename the parameter of the method where it's used. And then the |
||
|
|
||
| auto curr_vap = radio_vaps.at(vap_id); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -969,6 +969,7 @@ bool base_wlan_hal_dwpal::refresh_vap_info(int vap_id) | |
| // New VAP Element | ||
| VAPElement vapElement; | ||
|
|
||
| vapElement.bss = ifname; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. naming (see previous comment regarding this issue) |
||
| vapElement.mac = std::string(bssid); | ||
| vapElement.ssid = std::string(ssid); | ||
| if (!get_vap_type(ifname, vapElement.fronthaul, vapElement.backhaul)) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -46,20 +46,21 @@ enum class AntMode { Invalid = 0, ANT_1X1, ANT_2X2, ANT_3X3, ANT_4X4 }; | |||||
| enum class WiFiChanBW { Invalid = 0, BW_20 = 20, BW_40 = 40, BW_80 = 80 }; | ||||||
|
|
||||||
| struct VAPElement { | ||||||
| /** | ||||||
| * Basic Service Set (i.e.: VAP name, e.g.: wlan0.0, wlan0.1, wlan0.2, ...). | ||||||
| */ | ||||||
| std::string bss; | ||||||
mariomaz marked this conversation as resolved.
Show resolved
Hide resolved
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think it would be easier for developers, newcomers, maintainers, etc. to have clear names along the code.
Suggested change
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with you that there's room for improvement regarding names and types in this project. The reason to chose Fields What we might do is to rename |
||||||
| std::string ssid; | ||||||
| std::string mac; | ||||||
| bool fronthaul; | ||||||
| bool backhaul; | ||||||
|
|
||||||
| virtual bool operator==(const VAPElement &other) const | ||||||
| bool operator==(const VAPElement &other) const | ||||||
mariomaz marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| { | ||||||
| return (ssid == other.ssid && mac == other.mac); | ||||||
| return (bss == other.bss && ssid == other.ssid && mac == other.mac); | ||||||
| } | ||||||
|
|
||||||
| virtual bool operator!=(const VAPElement &other) const | ||||||
| { | ||||||
| return (ssid != other.ssid || mac != other.mac); | ||||||
| } | ||||||
| bool operator!=(const VAPElement &other) const { return !(*this == other); } | ||||||
| }; | ||||||
|
|
||||||
| enum class ChanSwReason { Unknown = 0, Radar = 1, CoEx_20 = 2, CoEx_40 = 3 }; | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.