Loading wifi/1.2/default/wifi_legacy_hal.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -309,6 +309,15 @@ void onAysncNanEventRangeReport(NanRangeReportInd* event) { on_nan_event_range_report_user_callback(*event); } } std::function<void(const NanDataPathScheduleUpdateInd&)> on_nan_event_schedule_update_user_callback; void onAsyncNanEventScheduleUpdate(NanDataPathScheduleUpdateInd* event) { const auto lock = hidl_sync_util::acquireGlobalLock(); if (on_nan_event_schedule_update_user_callback && event) { on_nan_event_schedule_update_user_callback(*event); } } // End of the free-standing "C" style callbacks. WifiLegacyHal::WifiLegacyHal() Loading Loading @@ -1061,6 +1070,8 @@ wifi_error WifiLegacyHal::nanRegisterCallbackHandlers( user_callbacks.on_event_range_request; on_nan_event_range_report_user_callback = user_callbacks.on_event_range_report; on_nan_event_schedule_update_user_callback = user_callbacks.on_event_schedule_update; return global_func_table_.wifi_nan_register_handler( getIfaceHandle(iface_name), Loading @@ -1072,7 +1083,7 @@ wifi_error WifiLegacyHal::nanRegisterCallbackHandlers( onAysncNanEventBeaconSdfPayload, onAysncNanEventDataPathRequest, onAysncNanEventDataPathConfirm, onAysncNanEventDataPathEnd, onAysncNanEventTransmitFollowUp, onAysncNanEventRangeRequest, onAysncNanEventRangeReport}); onAysncNanEventRangeReport, onAsyncNanEventScheduleUpdate}); } wifi_error WifiLegacyHal::nanEnableRequest(const std::string& iface_name, Loading Loading @@ -1330,6 +1341,7 @@ void WifiLegacyHal::invalidate() { on_nan_event_transmit_follow_up_user_callback = nullptr; on_nan_event_range_request_user_callback = nullptr; on_nan_event_range_report_user_callback = nullptr; on_nan_event_schedule_update_user_callback = nullptr; } } // namespace legacy_hal Loading wifi/1.2/default/wifi_legacy_hal.h +1 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ struct NanCallbackHandlers { on_event_transmit_follow_up; std::function<void(const NanRangeRequestInd&)> on_event_range_request; std::function<void(const NanRangeReportInd&)> on_event_range_report; std::function<void(const NanDataPathScheduleUpdateInd&)> on_event_schedule_update; }; // Full scan results contain IE info and are hence passed by reference, to Loading wifi/1.2/default/wifi_nan_iface.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -467,6 +467,11 @@ WifiNanIface::WifiNanIface( LOG(ERROR) << "on_event_range_report - should not be called"; }; callback_handlers.on_event_schedule_update = [weak_ptr_this](const legacy_hal::NanDataPathScheduleUpdateInd& /* msg */) { LOG(ERROR) << "on_event_schedule_update - should not be called"; }; legacy_hal::wifi_error legacy_status = legacy_hal_.lock()->nanRegisterCallbackHandlers(ifname_, callback_handlers); Loading Loading
wifi/1.2/default/wifi_legacy_hal.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -309,6 +309,15 @@ void onAysncNanEventRangeReport(NanRangeReportInd* event) { on_nan_event_range_report_user_callback(*event); } } std::function<void(const NanDataPathScheduleUpdateInd&)> on_nan_event_schedule_update_user_callback; void onAsyncNanEventScheduleUpdate(NanDataPathScheduleUpdateInd* event) { const auto lock = hidl_sync_util::acquireGlobalLock(); if (on_nan_event_schedule_update_user_callback && event) { on_nan_event_schedule_update_user_callback(*event); } } // End of the free-standing "C" style callbacks. WifiLegacyHal::WifiLegacyHal() Loading Loading @@ -1061,6 +1070,8 @@ wifi_error WifiLegacyHal::nanRegisterCallbackHandlers( user_callbacks.on_event_range_request; on_nan_event_range_report_user_callback = user_callbacks.on_event_range_report; on_nan_event_schedule_update_user_callback = user_callbacks.on_event_schedule_update; return global_func_table_.wifi_nan_register_handler( getIfaceHandle(iface_name), Loading @@ -1072,7 +1083,7 @@ wifi_error WifiLegacyHal::nanRegisterCallbackHandlers( onAysncNanEventBeaconSdfPayload, onAysncNanEventDataPathRequest, onAysncNanEventDataPathConfirm, onAysncNanEventDataPathEnd, onAysncNanEventTransmitFollowUp, onAysncNanEventRangeRequest, onAysncNanEventRangeReport}); onAysncNanEventRangeReport, onAsyncNanEventScheduleUpdate}); } wifi_error WifiLegacyHal::nanEnableRequest(const std::string& iface_name, Loading Loading @@ -1330,6 +1341,7 @@ void WifiLegacyHal::invalidate() { on_nan_event_transmit_follow_up_user_callback = nullptr; on_nan_event_range_request_user_callback = nullptr; on_nan_event_range_report_user_callback = nullptr; on_nan_event_schedule_update_user_callback = nullptr; } } // namespace legacy_hal Loading
wifi/1.2/default/wifi_legacy_hal.h +1 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ struct NanCallbackHandlers { on_event_transmit_follow_up; std::function<void(const NanRangeRequestInd&)> on_event_range_request; std::function<void(const NanRangeReportInd&)> on_event_range_report; std::function<void(const NanDataPathScheduleUpdateInd&)> on_event_schedule_update; }; // Full scan results contain IE info and are hence passed by reference, to Loading
wifi/1.2/default/wifi_nan_iface.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -467,6 +467,11 @@ WifiNanIface::WifiNanIface( LOG(ERROR) << "on_event_range_report - should not be called"; }; callback_handlers.on_event_schedule_update = [weak_ptr_this](const legacy_hal::NanDataPathScheduleUpdateInd& /* msg */) { LOG(ERROR) << "on_event_schedule_update - should not be called"; }; legacy_hal::wifi_error legacy_status = legacy_hal_.lock()->nanRegisterCallbackHandlers(ifname_, callback_handlers); Loading