NL80211_ATTR_WIPHY_BANDS contains a list of anonymous attributes.
Each anonymous attribute represents a band.
NL80211_BAND_ATTR_FREQ is expected to be included in every anonymous
attribute to specifying supported channels for this band.
However, sometimes one of the anonymous attribute provided by kernel is
empty, where NL80211_BAND_ATTR_FREQ is not included. This always happens
on some type of devices. We should not log an error for this.
Bug:
35220903
Test: compile, unit tests, manual test
Change-Id: I0ef953266744713af627a17e7d10f04b937e0648
netlink_utils_->SubscribeMlmeEvent(
interface_index_,
mlme_event_handler_.get());
- netlink_utils_->GetWiphyInfo(wiphy_index_,
+ if (!netlink_utils_->GetWiphyInfo(wiphy_index_,
&band_info_,
&scan_capabilities_,
- &wiphy_features_);
+ &wiphy_features_)) {
+ LOG(ERROR) << "Failed to get wiphy info from kernel";
+ }
scanner_ = new ScannerImpl(interface_index_,
band_info_,
scan_capabilities_,
for (unsigned int band_index = 0; band_index < bands.size(); band_index++) {
NL80211NestedAttr freqs_attr(0);
if (!bands[band_index].GetAttribute(NL80211_BAND_ATTR_FREQS, &freqs_attr)) {
- LOG(ERROR) << "Failed to get NL80211_BAND_ATTR_FREQS";
+ LOG(DEBUG) << "Failed to get NL80211_BAND_ATTR_FREQS";
continue;
}
vector<NL80211NestedAttr> freqs;