diff options
Diffstat (limited to 'scanning')
| -rw-r--r-- | scanning/channel_settings.cpp | 10 | ||||
| -rw-r--r-- | scanning/channel_settings.h | 10 | ||||
| -rw-r--r-- | scanning/hidden_network.cpp | 10 | ||||
| -rw-r--r-- | scanning/hidden_network.h | 10 | ||||
| -rw-r--r-- | scanning/pno_network.cpp | 10 | ||||
| -rw-r--r-- | scanning/pno_network.h | 10 | ||||
| -rw-r--r-- | scanning/pno_settings.cpp | 16 | ||||
| -rw-r--r-- | scanning/pno_settings.h | 19 | ||||
| -rw-r--r-- | scanning/radio_chain_info.cpp | 10 | ||||
| -rw-r--r-- | scanning/radio_chain_info.h | 10 | ||||
| -rw-r--r-- | scanning/scan_result.cpp | 10 | ||||
| -rw-r--r-- | scanning/scan_result.h | 10 | ||||
| -rw-r--r-- | scanning/scan_utils.cpp | 14 | ||||
| -rw-r--r-- | scanning/scan_utils.h | 17 | ||||
| -rw-r--r-- | scanning/scanner_impl.cpp | 32 | ||||
| -rw-r--r-- | scanning/scanner_impl.h | 29 | ||||
| -rw-r--r-- | scanning/single_scan_settings.cpp | 14 | ||||
| -rw-r--r-- | scanning/single_scan_settings.h | 10 |
18 files changed, 123 insertions, 128 deletions
diff --git a/scanning/channel_settings.cpp b/scanning/channel_settings.cpp index b7c4fb8..5b12e4a 100644 --- a/scanning/channel_settings.cpp +++ b/scanning/channel_settings.cpp @@ -22,11 +22,10 @@ using android::status_t; -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { status_t ChannelSettings::writeToParcel(::android::Parcel* parcel) const { RETURN_IF_FAILED(parcel->writeInt32(frequency_)); @@ -38,8 +37,7 @@ status_t ChannelSettings::readFromParcel(const ::android::Parcel* parcel) { return ::android::OK; } -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com diff --git a/scanning/channel_settings.h b/scanning/channel_settings.h index 3ff4e55..748e39b 100644 --- a/scanning/channel_settings.h +++ b/scanning/channel_settings.h @@ -20,11 +20,10 @@ #include <binder/Parcel.h> #include <binder/Parcelable.h> -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { class ChannelSettings : public ::android::Parcelable { public: @@ -39,10 +38,9 @@ class ChannelSettings : public ::android::Parcelable { int32_t frequency_; }; -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com #endif // WIFICOND_SCANNING_CHANNEL_SETTINGS_H_ diff --git a/scanning/hidden_network.cpp b/scanning/hidden_network.cpp index 686d5da..ce35b69 100644 --- a/scanning/hidden_network.cpp +++ b/scanning/hidden_network.cpp @@ -22,11 +22,10 @@ using android::status_t; -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { status_t HiddenNetwork::writeToParcel(::android::Parcel* parcel) const { RETURN_IF_FAILED(parcel->writeByteVector(ssid_)); @@ -38,8 +37,7 @@ status_t HiddenNetwork::readFromParcel(const ::android::Parcel* parcel) { return ::android::OK; } -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com diff --git a/scanning/hidden_network.h b/scanning/hidden_network.h index 646bc06..02ac466 100644 --- a/scanning/hidden_network.h +++ b/scanning/hidden_network.h @@ -22,11 +22,10 @@ #include <binder/Parcel.h> #include <binder/Parcelable.h> -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { class HiddenNetwork : public ::android::Parcelable { public: @@ -40,10 +39,9 @@ class HiddenNetwork : public ::android::Parcelable { std::vector<uint8_t> ssid_; }; -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com #endif // WIFICOND_SCANNING_HIDDEN_NETWORK_H_ diff --git a/scanning/pno_network.cpp b/scanning/pno_network.cpp index 02f8e5f..17b5cdc 100644 --- a/scanning/pno_network.cpp +++ b/scanning/pno_network.cpp @@ -22,11 +22,10 @@ using android::status_t; -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { status_t PnoNetwork::writeToParcel(::android::Parcel* parcel) const { RETURN_IF_FAILED(parcel->writeInt32(is_hidden_ ? 1 : 0)); @@ -44,8 +43,7 @@ status_t PnoNetwork::readFromParcel(const ::android::Parcel* parcel) { return ::android::OK; } -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com diff --git a/scanning/pno_network.h b/scanning/pno_network.h index bd5d6cb..1cb5ded 100644 --- a/scanning/pno_network.h +++ b/scanning/pno_network.h @@ -22,11 +22,10 @@ #include <binder/Parcel.h> #include <binder/Parcelable.h> -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { class PnoNetwork : public ::android::Parcelable { public: @@ -43,10 +42,9 @@ class PnoNetwork : public ::android::Parcelable { std::vector<int32_t> frequencies_; }; -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com #endif // WIFICOND_SCANNING_PNO_NETWORK_H_ diff --git a/scanning/pno_settings.cpp b/scanning/pno_settings.cpp index be051dd..6307ea7 100644 --- a/scanning/pno_settings.cpp +++ b/scanning/pno_settings.cpp @@ -22,19 +22,19 @@ using android::status_t; -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { const uint32_t PnoSettings::kFastScanIterations = 3; const uint32_t PnoSettings::kSlowScanIntervalMultiplier = 3; status_t PnoSettings::writeToParcel(::android::Parcel* parcel) const { - RETURN_IF_FAILED(parcel->writeInt32(interval_ms_)); + RETURN_IF_FAILED(parcel->writeInt64(interval_ms_)); RETURN_IF_FAILED(parcel->writeInt32(min_2g_rssi_)); RETURN_IF_FAILED(parcel->writeInt32(min_5g_rssi_)); + RETURN_IF_FAILED(parcel->writeInt32(min_6g_rssi_)); RETURN_IF_FAILED(parcel->writeInt32(pno_networks_.size())); for (const auto& network : pno_networks_) { // For Java readTypedList(): @@ -46,9 +46,10 @@ status_t PnoSettings::writeToParcel(::android::Parcel* parcel) const { } status_t PnoSettings::readFromParcel(const ::android::Parcel* parcel) { - RETURN_IF_FAILED(parcel->readInt32(&interval_ms_)); + RETURN_IF_FAILED(parcel->readInt64(&interval_ms_)); RETURN_IF_FAILED(parcel->readInt32(&min_2g_rssi_)); RETURN_IF_FAILED(parcel->readInt32(&min_5g_rssi_)); + RETURN_IF_FAILED(parcel->readInt32(&min_6g_rssi_)); int32_t num_pno_networks = 0; RETURN_IF_FAILED(parcel->readInt32(&num_pno_networks)); for (int i = 0; i < num_pno_networks; i++) { @@ -69,8 +70,7 @@ status_t PnoSettings::readFromParcel(const ::android::Parcel* parcel) { return ::android::OK; } -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com diff --git a/scanning/pno_settings.h b/scanning/pno_settings.h index a606b0f..f0e0826 100644 --- a/scanning/pno_settings.h +++ b/scanning/pno_settings.h @@ -24,11 +24,10 @@ #include "wificond/scanning/pno_network.h" -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { class PnoSettings : public ::android::Parcelable { public: @@ -38,25 +37,27 @@ class PnoSettings : public ::android::Parcelable { PnoSettings() : interval_ms_(0), min_2g_rssi_(0), - min_5g_rssi_(0) {} + min_5g_rssi_(0), + min_6g_rssi_(0) {} bool operator==(const PnoSettings& rhs) const { return (pno_networks_ == rhs.pno_networks_ && min_2g_rssi_ == rhs.min_2g_rssi_ && - min_5g_rssi_ == rhs.min_5g_rssi_); + min_5g_rssi_ == rhs.min_5g_rssi_ && + min_6g_rssi_ == rhs.min_6g_rssi_); } ::android::status_t writeToParcel(::android::Parcel* parcel) const override; ::android::status_t readFromParcel(const ::android::Parcel* parcel) override; - int32_t interval_ms_; + int64_t interval_ms_; int32_t min_2g_rssi_; int32_t min_5g_rssi_; + int32_t min_6g_rssi_; std::vector<PnoNetwork> pno_networks_; }; -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com #endif // WIFICOND_SCANNING_PNO_SETTINGS_H_ diff --git a/scanning/radio_chain_info.cpp b/scanning/radio_chain_info.cpp index 274dc20..64506e4 100644 --- a/scanning/radio_chain_info.cpp +++ b/scanning/radio_chain_info.cpp @@ -21,11 +21,10 @@ using android::status_t; -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { status_t RadioChainInfo::writeToParcel(::android::Parcel* parcel) const { RETURN_IF_FAILED(parcel->writeInt32(chain_id)); @@ -39,8 +38,7 @@ status_t RadioChainInfo::readFromParcel(const ::android::Parcel* parcel) { return ::android::OK; } -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com diff --git a/scanning/radio_chain_info.h b/scanning/radio_chain_info.h index 1642b8b..551ab45 100644 --- a/scanning/radio_chain_info.h +++ b/scanning/radio_chain_info.h @@ -20,11 +20,10 @@ #include <binder/Parcel.h> #include <binder/Parcelable.h> -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { class RadioChainInfo : public ::android::Parcelable { public: @@ -42,10 +41,9 @@ class RadioChainInfo : public ::android::Parcelable { int32_t level; }; -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com #endif // WIFICOND_SCANNING_RADIO_CHAIN_INFO_H_ diff --git a/scanning/scan_result.cpp b/scanning/scan_result.cpp index fa85981..ff00ab9 100644 --- a/scanning/scan_result.cpp +++ b/scanning/scan_result.cpp @@ -27,11 +27,10 @@ using android::status_t; using android::OK; using std::string; -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { NativeScanResult::NativeScanResult(std::vector<uint8_t>& ssid_, std::array<uint8_t, ETH_ALEN>& bssid_, @@ -135,8 +134,7 @@ void NativeScanResult::DebugLog() { } -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com diff --git a/scanning/scan_result.h b/scanning/scan_result.h index bd9dc98..43c6a15 100644 --- a/scanning/scan_result.h +++ b/scanning/scan_result.h @@ -27,11 +27,10 @@ #include "wificond/scanning/radio_chain_info.h" -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { // This is the class to represent a scan result for wificond internal use. class NativeScanResult : public ::android::Parcelable { @@ -87,10 +86,9 @@ class NativeScanResult : public ::android::Parcelable { std::vector<RadioChainInfo> radio_chain_infos; }; -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com #endif // WIFICOND_SCANNING_SCAN_RESULT_H_ diff --git a/scanning/scan_utils.cpp b/scanning/scan_utils.cpp index 65f8f8c..4b65a56 100644 --- a/scanning/scan_utils.cpp +++ b/scanning/scan_utils.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "android/net/wifi/IWifiScannerImpl.h" +#include "android/net/wifi/nl80211/IWifiScannerImpl.h" #include "wificond/scanning/scan_utils.h" #include <array> @@ -30,9 +30,9 @@ #include "wificond/net/nl80211_packet.h" #include "wificond/scanning/scan_result.h" -using android::net::wifi::IWifiScannerImpl; -using com::android::server::wifi::wificond::NativeScanResult; -using com::android::server::wifi::wificond::RadioChainInfo; +using android::net::wifi::nl80211::IWifiScannerImpl; +using android::net::wifi::nl80211::NativeScanResult; +using android::net::wifi::nl80211::RadioChainInfo; using std::array; using std::unique_ptr; using std::vector; @@ -132,7 +132,7 @@ bool ScanUtils::GetScanResult(uint32_t interface_index, bool ScanUtils::ParseScanResult(unique_ptr<const NL80211Packet> packet, NativeScanResult* scan_result) { if (packet->GetCommand() != NL80211_CMD_NEW_SCAN_RESULTS) { - LOG(ERROR) << "Wrong command command for new scan result message"; + LOG(ERROR) << "Wrong command for new scan result message"; return false; } NL80211NestedAttr bss(0); @@ -405,6 +405,7 @@ bool ScanUtils::StartScheduledScan( const SchedScanIntervalSetting& interval_setting, int32_t rssi_threshold_2g, int32_t rssi_threshold_5g, + int32_t rssi_threshold_6g, const SchedScanReqFlags& req_flags, const std::vector<std::vector<uint8_t>>& scan_ssids, const std::vector<std::vector<uint8_t>>& match_ssids, @@ -456,6 +457,9 @@ bool ScanUtils::StartScheduledScan( start_sched_scan.AddAttribute(rssi_adjust_attr); } + //TODO: No adjustment is possible now for 6GHz due to lack of definition in + //nl80211.h for NL80211_BAND_6GHZ attribute + // Append all attributes to the NL80211_CMD_START_SCHED_SCAN packet. start_sched_scan.AddAttribute( NL80211Attr<uint32_t>(NL80211_ATTR_IFINDEX, interface_index)); diff --git a/scanning/scan_utils.h b/scanning/scan_utils.h index d160123..bc190c6 100644 --- a/scanning/scan_utils.h +++ b/scanning/scan_utils.h @@ -24,20 +24,18 @@ #include "wificond/net/netlink_manager.h" -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { class NativeScanResult; class RadioChainInfo; -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com namespace android { namespace wificond { @@ -75,7 +73,7 @@ class ScanUtils { // Returns true on success. virtual bool GetScanResult( uint32_t interface_index, - std::vector<::com::android::server::wifi::wificond::NativeScanResult>* out_scan_results); + std::vector<android::net::wifi::nl80211::NativeScanResult>* out_scan_results); // Send scan request to kernel for interface with index |interface_index|. // - |request_random_mac| If true, request device/driver to use a random MAC @@ -135,6 +133,7 @@ class ScanUtils { const SchedScanIntervalSetting& interval_setting, int32_t rssi_threshold_2g, int32_t rssi_threshold_5g, + int32_t rssi_threshold_6g, const SchedScanReqFlags& req_flags, const std::vector<std::vector<uint8_t>>& scan_ssids, const std::vector<std::vector<uint8_t>>& match_ssids, @@ -189,14 +188,14 @@ class ScanUtils { uint64_t* last_seen_since_boot_microseconds); bool ParseRadioChainInfos( const NL80211NestedAttr& bss, - std::vector<::com::android::server::wifi::wificond::RadioChainInfo> + std::vector<android::net::wifi::nl80211::RadioChainInfo> *radio_chain_infos); bool GetSSIDFromInfoElement(const std::vector<uint8_t>& ie, std::vector<uint8_t>* ssid); // Converts a NL80211_CMD_NEW_SCAN_RESULTS packet to a ScanResult object. bool ParseScanResult( std::unique_ptr<const NL80211Packet> packet, - ::com::android::server::wifi::wificond::NativeScanResult* scan_result); + android::net::wifi::nl80211::NativeScanResult* scan_result); NetlinkManager* netlink_manager_; diff --git a/scanning/scanner_impl.cpp b/scanning/scanner_impl.cpp index 77b1e76..83eceb2 100644 --- a/scanning/scanner_impl.cpp +++ b/scanning/scanner_impl.cpp @@ -26,13 +26,13 @@ #include "wificond/scanning/scan_utils.h" using android::binder::Status; -using android::net::wifi::IPnoScanEvent; -using android::net::wifi::IScanEvent; -using android::net::wifi::IWifiScannerImpl; using android::sp; -using com::android::server::wifi::wificond::NativeScanResult; -using com::android::server::wifi::wificond::PnoSettings; -using com::android::server::wifi::wificond::SingleScanSettings; +using android::net::wifi::nl80211::IPnoScanEvent; +using android::net::wifi::nl80211::IScanEvent; +using android::net::wifi::nl80211::IWifiScannerImpl; +using android::net::wifi::nl80211::NativeScanResult; +using android::net::wifi::nl80211::PnoSettings; +using android::net::wifi::nl80211::SingleScanSettings; using std::string; using std::vector; @@ -73,6 +73,7 @@ ScannerImpl::ScannerImpl(uint32_t interface_index, : valid_(true), scan_started_(false), pno_scan_started_(false), + nodev_counter_(0), interface_index_(interface_index), scan_capabilities_(scan_capabilities), wiphy_features_(wiphy_features), @@ -174,10 +175,16 @@ Status ScannerImpl::scan(const SingleScanSettings& scan_settings, int error_code = 0; if (!scan_utils_->Scan(interface_index_, request_random_mac, scan_type, ssids, freqs, &error_code)) { - CHECK(error_code != ENODEV) << "Driver is in a bad state, restarting wificond"; + if (error_code == ENODEV) { + nodev_counter_ ++; + LOG(WARNING) << "Scan failed with error=nodev. counter=" << nodev_counter_; + } + CHECK(error_code != ENODEV || nodev_counter_ <= 3) + << "Driver is in a bad state, restarting wificond"; *out_success = false; return Status::ok(); } + nodev_counter_ = 0; scan_started_ = true; *out_success = true; return Status::ok(); @@ -274,13 +281,19 @@ bool ScannerImpl::StartPnoScanDefault(const PnoSettings& pno_settings) { GenerateIntervalSetting(pno_settings), pno_settings.min_2g_rssi_, pno_settings.min_5g_rssi_, + pno_settings.min_6g_rssi_, req_flags, scan_ssids, match_ssids, freqs, &error_code)) { + if (error_code == ENODEV) { + nodev_counter_ ++; + LOG(WARNING) << "Pno Scan failed with error=nodev. counter=" << nodev_counter_; + } LOG(ERROR) << "Failed to start pno scan"; - CHECK(error_code != ENODEV) << "Driver is in a bad state, restarting wificond"; + CHECK(error_code != ENODEV || nodev_counter_ <= 3) + << "Driver is in a bad state, restarting wificond"; return false; } string freq_string; @@ -293,6 +306,7 @@ bool ScannerImpl::StartPnoScanDefault(const PnoSettings& pno_settings) { } } LOG(INFO) << "Pno scan started " << freq_string; + nodev_counter_ = 0; pno_scan_started_ = true; return true; } @@ -410,7 +424,7 @@ void ScannerImpl::OnSchedScanResultsReady(uint32_t interface_index, } SchedScanIntervalSetting ScannerImpl::GenerateIntervalSetting( - const ::com::android::server::wifi::wificond::PnoSettings& + const android::net::wifi::nl80211::PnoSettings& pno_settings) const { bool support_num_scan_plans = scan_capabilities_.max_num_scan_plans >= 2; bool support_scan_plan_interval = diff --git a/scanning/scanner_impl.h b/scanning/scanner_impl.h index 3c1a4c7..6e23ea7 100644 --- a/scanning/scanner_impl.h +++ b/scanning/scanner_impl.h @@ -22,7 +22,7 @@ #include <android-base/macros.h> #include <binder/Status.h> -#include "android/net/wifi/BnWifiScannerImpl.h" +#include "android/net/wifi/nl80211/BnWifiScannerImpl.h" #include "wificond/net/netlink_utils.h" #include "wificond/scanning/scan_utils.h" @@ -32,7 +32,7 @@ namespace wificond { class ClientInterfaceImpl; class ScanUtils; -class ScannerImpl : public android::net::wifi::BnWifiScannerImpl { +class ScannerImpl : public android::net::wifi::nl80211::BnWifiScannerImpl { public: ScannerImpl(uint32_t interface_index, const ScanCapabilities& scan_capabilities, @@ -42,28 +42,28 @@ class ScannerImpl : public android::net::wifi::BnWifiScannerImpl { ~ScannerImpl(); // Get the latest single scan results from kernel. ::android::binder::Status getScanResults( - std::vector<com::android::server::wifi::wificond::NativeScanResult>* + std::vector<android::net::wifi::nl80211::NativeScanResult>* out_scan_results) override; // Get the latest pno scan results from the interface that most recently // completed PNO scans ::android::binder::Status getPnoScanResults( - std::vector<com::android::server::wifi::wificond::NativeScanResult>* + std::vector<android::net::wifi::nl80211::NativeScanResult>* out_scan_results) override; ::android::binder::Status scan( - const ::com::android::server::wifi::wificond::SingleScanSettings& + const android::net::wifi::nl80211::SingleScanSettings& scan_settings, bool* out_success) override; ::android::binder::Status startPnoScan( - const ::com::android::server::wifi::wificond::PnoSettings& pno_settings, + const android::net::wifi::nl80211::PnoSettings& pno_settings, bool* out_success) override; ::android::binder::Status stopPnoScan(bool* out_success) override; ::android::binder::Status abortScan() override; ::android::binder::Status subscribeScanEvents( - const ::android::sp<::android::net::wifi::IScanEvent>& handler) override; + const ::android::sp<::android::net::wifi::nl80211::IScanEvent>& handler) override; ::android::binder::Status unsubscribeScanEvents() override; ::android::binder::Status subscribePnoScanEvents( - const ::android::sp<::android::net::wifi::IPnoScanEvent>& handler) + const ::android::sp<::android::net::wifi::nl80211::IPnoScanEvent>& handler) override; ::android::binder::Status unsubscribePnoScanEvents() override; void Invalidate(); @@ -77,22 +77,23 @@ class ScannerImpl : public android::net::wifi::BnWifiScannerImpl { void LogSsidList(std::vector<std::vector<uint8_t>>& ssid_list, std::string prefix); bool StartPnoScanDefault( - const ::com::android::server::wifi::wificond::PnoSettings& pno_settings); + const android::net::wifi::nl80211::PnoSettings& pno_settings); bool StopPnoScanDefault(); void ParsePnoSettings( - const ::com::android::server::wifi::wificond::PnoSettings& pno_settings, + const android::net::wifi::nl80211::PnoSettings& pno_settings, std::vector<std::vector<uint8_t>>* scan_ssids, std::vector<std::vector<uint8_t>>* match_ssids, std::vector<uint32_t>* freqs, std::vector<uint8_t>* match_security); SchedScanIntervalSetting GenerateIntervalSetting( - const ::com::android::server::wifi::wificond::PnoSettings& pno_settings) const; + const android::net::wifi::nl80211::PnoSettings& pno_settings) const; // Boolean variables describing current scanner status. bool valid_; bool scan_started_; bool pno_scan_started_; - ::com::android::server::wifi::wificond::PnoSettings pno_settings_; + android::net::wifi::nl80211::PnoSettings pno_settings_; + uint32_t nodev_counter_; const uint32_t interface_index_; // Scanning relevant capability information for this wiphy/interface. @@ -101,8 +102,8 @@ class ScannerImpl : public android::net::wifi::BnWifiScannerImpl { ClientInterfaceImpl* client_interface_; ScanUtils* const scan_utils_; - ::android::sp<::android::net::wifi::IPnoScanEvent> pno_scan_event_handler_; - ::android::sp<::android::net::wifi::IScanEvent> scan_event_handler_; + ::android::sp<::android::net::wifi::nl80211::IPnoScanEvent> pno_scan_event_handler_; + ::android::sp<::android::net::wifi::nl80211::IScanEvent> scan_event_handler_; DISALLOW_COPY_AND_ASSIGN(ScannerImpl); }; diff --git a/scanning/single_scan_settings.cpp b/scanning/single_scan_settings.cpp index fa6a079..ec89259 100644 --- a/scanning/single_scan_settings.cpp +++ b/scanning/single_scan_settings.cpp @@ -14,21 +14,20 @@ * limitations under the License. */ -#include "android/net/wifi/IWifiScannerImpl.h" +#include "android/net/wifi/nl80211/IWifiScannerImpl.h" #include "wificond/scanning/single_scan_settings.h" #include <android-base/logging.h> #include "wificond/parcelable_utils.h" -using android::net::wifi::IWifiScannerImpl; +using android::net::wifi::nl80211::IWifiScannerImpl; using android::status_t; -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { bool SingleScanSettings::isValidScanType() const { return (scan_type_ == IWifiScannerImpl::SCAN_TYPE_LOW_SPAN || scan_type_ == IWifiScannerImpl::SCAN_TYPE_LOW_POWER || @@ -109,8 +108,7 @@ status_t SingleScanSettings::readFromParcel(const ::android::Parcel* parcel) { return ::android::OK; } -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com diff --git a/scanning/single_scan_settings.h b/scanning/single_scan_settings.h index 9f61d41..6c70e71 100644 --- a/scanning/single_scan_settings.h +++ b/scanning/single_scan_settings.h @@ -25,11 +25,10 @@ #include "wificond/scanning/channel_settings.h" #include "wificond/scanning/hidden_network.h" -namespace com { namespace android { -namespace server { +namespace net { namespace wifi { -namespace wificond { +namespace nl80211 { class SingleScanSettings : public ::android::Parcelable { public: @@ -50,10 +49,9 @@ class SingleScanSettings : public ::android::Parcelable { bool isValidScanType() const; }; -} // namespace wificond +} // namespace nl80211 } // namespace wifi -} // namespace server +} // namespace net } // namespace android -} // namespace com #endif // WIFICOND_SCANNING_SINGLE_SCAN_SETTINGS_H_ |
