| 287 | } |
| 288 | |
| 289 | bool 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 | |
| 303 | static char *OPENHD_DRIVER_RTL8812AU_CHANNEL_OVERRIDE = |
| 304 | "/sys/module/88XXau_ohd/parameters/openhd_override_channel"; |