wifi: Fix current PHY rate handling
Fix the name to include TX and also add units to the shell display. Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This commit is contained in:
parent
2e7f6311bf
commit
619cdb64f4
3 changed files with 6 additions and 4 deletions
|
@ -671,8 +671,8 @@ struct wifi_iface_status {
|
|||
unsigned short beacon_interval;
|
||||
/** is TWT capable? */
|
||||
bool twt_capable;
|
||||
/** The current 802.11 PHY data rate */
|
||||
int current_phy_rate;
|
||||
/** The current 802.11 PHY TX data rate (in Kbps) */
|
||||
int current_phy_tx_rate;
|
||||
};
|
||||
|
||||
/** @brief Wi-Fi power save parameters */
|
||||
|
|
|
@ -1538,7 +1538,7 @@ int supplicant_status(const struct device *dev, struct wifi_iface_status *status
|
|||
ret = z_wpa_ctrl_signal_poll(&signal_poll);
|
||||
if (!ret) {
|
||||
status->rssi = signal_poll.rssi;
|
||||
status->current_phy_rate = signal_poll.current_txrate;
|
||||
status->current_phy_tx_rate = signal_poll.current_txrate;
|
||||
} else {
|
||||
wpa_printf(MSG_WARNING, "%s: Failed to read signal poll info",
|
||||
__func__);
|
||||
|
|
|
@ -1113,7 +1113,9 @@ static int cmd_wifi_status(const struct shell *sh, size_t argc, char *argv[])
|
|||
PR("DTIM: %d\n", status.dtim_period);
|
||||
PR("TWT: %s\n",
|
||||
status.twt_capable ? "Supported" : "Not supported");
|
||||
PR("Current PHY rate : %d\n", status.current_phy_rate);
|
||||
PR("Current PHY TX rate (Mbps) : %d.%03d\n",
|
||||
status.current_phy_tx_rate / 1000,
|
||||
status.current_phy_tx_rate % 1000);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue