simwifi: Support that get the connected Chinese essid.
The Chinese essid obtained by wpa_cli is encoded. So, we directly use the essid saved in wifidev. Signed-off-by: liqinhui <liqinhui@xiaomi.com>
This commit is contained in:
parent
d0a5489ac5
commit
c7d0b32e4f
@ -643,21 +643,11 @@ static bool get_wpa_state(struct sim_netdev_s *wifidev)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_wpa_ssid(struct sim_netdev_s *wifidev, struct iw_point *essid)
|
static void get_wpa_ssid(struct sim_netdev_s *wifidev,
|
||||||
|
struct iw_point *essid)
|
||||||
{
|
{
|
||||||
int ret;
|
essid->length = strlen(wifidev->ssid);
|
||||||
char rbuf[BUF_LEN];
|
strlcpy(essid->pointer, wifidev->ssid, essid->length + 1);
|
||||||
|
|
||||||
ret = get_cmd(wifidev, rbuf, BUF_LEN, "%s",
|
|
||||||
"status | grep ^ssid | awk -F'=' '{print $2}'");
|
|
||||||
|
|
||||||
if (ret > 0 && ret <= essid->length)
|
|
||||||
{
|
|
||||||
strlcpy(essid->pointer, rbuf, ret);
|
|
||||||
essid->length = ret - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_wpa_freq(struct sim_netdev_s *wifidev)
|
static int get_wpa_freq(struct sim_netdev_s *wifidev)
|
||||||
|
Loading…
Reference in New Issue
Block a user