MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / iw_supports_monitor_mode

Method iw_supports_monitor_mode

OpenHD/ohd_interface/src/wifi_command_helper.cpp:289–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287}
288
289bool wifi::commandhelper::iw_supports_monitor_mode(int phy_index) {
290 const std::string command =
291 "iw phy phy" + std::to_string(phy_index) + " info";
292 const auto res_opt = OHDUtil::run_command_out(command);
293 if (!res_opt.has_value()) {
294 openhd::log::get_default()->warn(
295 "iw_supports_monitor_mode for phy{} failed,assuming can do monitor "
296 "mode",
297 phy_index);
298 return true;
299 }
300 return OHDUtil::contains(res_opt.value(), "* monitor");
301}
302
303static char *OPENHD_DRIVER_RTL8812AU_CHANNEL_OVERRIDE =
304 "/sys/module/88XXau_ohd/parameters/openhd_override_channel";

Callers

nothing calls this directly

Calls 2

to_stringFunction · 0.85
containsFunction · 0.85

Tested by

no test coverage detected