From c63d9a6d0ca68990d2bc6e392ca2e2478ccbf5fe Mon Sep 17 00:00:00 2001 From: JaeMan Park Date: Wed, 29 Sep 2021 16:43:36 +0900 Subject: Add handler for set_snr and reload_config api command Add handler for api command set_snr and reload_config at wmediumd to control with CLI or web UI Bug: 201616800 Test: lunch aosp_cf_x86_64_phone-userdebug && m PRODUCT_ENFORCE_MAC80211_HWSIM=true droid wmediumd && launch_cvd --ap_rootfs_image=$(path for OpenWRT image) \ --ap_kernel_image=$(path for OpenWRT kernel image) Change-Id: I95186780cebf1766b1d68909e68e39fdff21baf5 --- wmediumd/api.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'wmediumd/api.h') diff --git a/wmediumd/api.h b/wmediumd/api.h index 24e9548..e68c776 100644 --- a/wmediumd/api.h +++ b/wmediumd/api.h @@ -36,6 +36,26 @@ enum wmediumd_message { * with struct wmediumd_tx_start as the payload. */ WMEDIUMD_MSG_TX_START, + + /* + * TODO(@jaeman) Get list of currnet nodes. + */ + WMEDIUMD_MSG_GET_NODES, + + /* + * Set SNR between two nodes. + */ + WMEDIUMD_MSG_SET_SNR, + + /* + * Clear and reload configuration at specified path + */ + WMEDIUMD_MSG_RELOAD_CONFIG, + + /* + * Clear and reload configuration loaded before + */ + WMEDIUMD_MSG_RELOAD_CURRENT_CONFIG, }; struct wmediumd_message_header { @@ -74,4 +94,20 @@ struct wmediumd_tx_start { uint32_t reserved[3]; }; +#pragma pack(push, 1) + struct wmediumd_set_snr { + /* MAC address of node 1 */ + uint8_t node1_mac[6]; + /* MAC address of node 2 */ + uint8_t node2_mac[6]; + /* New SNR between two nodes */ + uint8_t snr; +}; +#pragma pack(pop) + +struct wmediumd_reload_config { + /* path of wmediumd configuration file */ + char config_path[0]; +}; + #endif /* _WMEDIUMD_API_H */ -- cgit v1.2.3