Merge "wifi(implementation): Turn on DFS flag for STA" into oc-dev
This commit is contained in:
commit
b09f65c4b1
3 changed files with 14 additions and 1 deletions
|
@ -581,6 +581,11 @@ WifiLegacyHal::getValidFrequenciesForBand(wifi_band band) {
|
|||
return {status, std::move(freqs)};
|
||||
}
|
||||
|
||||
wifi_error WifiLegacyHal::setDfsFlag(bool dfs_on) {
|
||||
return global_func_table_.wifi_set_nodfs_flag(
|
||||
wlan_interface_handle_, dfs_on ? 0 : 1);
|
||||
}
|
||||
|
||||
wifi_error WifiLegacyHal::enableLinkLayerStats(bool debug) {
|
||||
wifi_link_layer_params params;
|
||||
params.mpdu_size_threshold = kLinkLayerStatsDataMpduSizeThreshold;
|
||||
|
|
|
@ -181,6 +181,7 @@ class WifiLegacyHal {
|
|||
wifi_error stopGscan(wifi_request_id id);
|
||||
std::pair<wifi_error, std::vector<uint32_t>> getValidFrequenciesForBand(
|
||||
wifi_band band);
|
||||
wifi_error setDfsFlag(bool dfs_on);
|
||||
// Link layer stats functions.
|
||||
wifi_error enableLinkLayerStats(bool debug);
|
||||
wifi_error disableLinkLayerStats();
|
||||
|
|
|
@ -31,7 +31,14 @@ using hidl_return_util::validateAndCall;
|
|||
WifiStaIface::WifiStaIface(
|
||||
const std::string& ifname,
|
||||
const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal)
|
||||
: ifname_(ifname), legacy_hal_(legacy_hal), is_valid_(true) {}
|
||||
: ifname_(ifname), legacy_hal_(legacy_hal), is_valid_(true) {
|
||||
// Turn on DFS channel usage for STA iface.
|
||||
legacy_hal::wifi_error legacy_status =
|
||||
legacy_hal_.lock()->setDfsFlag(true);
|
||||
if (legacy_status != legacy_hal::WIFI_SUCCESS) {
|
||||
LOG(ERROR) << "Failed to set DFS flag; DFS channels may be unavailable.";
|
||||
}
|
||||
}
|
||||
|
||||
void WifiStaIface::invalidate() {
|
||||
legacy_hal_.reset();
|
||||
|
|
Loading…
Reference in a new issue