Revert "wifi: virt_wifi: don't use strlen() in const context"
This reverts commit 8df54fa66a
.
This commit is contained in:
parent
ddb8f59b0a
commit
4f9bfbe9f1
1 changed files with 2 additions and 3 deletions
|
@ -139,7 +139,6 @@ static struct ieee80211_supported_band band_5ghz = {
|
|||
static u8 fake_router_bssid[ETH_ALEN] __ro_after_init = {};
|
||||
|
||||
#define VIRT_WIFI_SSID "VirtWifi"
|
||||
#define VIRT_WIFI_SSID_LEN 8
|
||||
|
||||
static void virt_wifi_inform_bss(struct wiphy *wiphy)
|
||||
{
|
||||
|
@ -151,7 +150,7 @@ static void virt_wifi_inform_bss(struct wiphy *wiphy)
|
|||
u8 ssid[8];
|
||||
} __packed ssid = {
|
||||
.tag = WLAN_EID_SSID,
|
||||
.len = VIRT_WIFI_SSID_LEN,
|
||||
.len = strlen(VIRT_WIFI_SSID),
|
||||
.ssid = VIRT_WIFI_SSID,
|
||||
};
|
||||
|
||||
|
@ -274,7 +273,7 @@ static void virt_wifi_connect_complete(struct work_struct *work)
|
|||
container_of(work, struct virt_wifi_netdev_priv, connect.work);
|
||||
u8 *requested_bss = priv->connect_requested_bss;
|
||||
bool right_addr = ether_addr_equal(requested_bss, fake_router_bssid);
|
||||
bool right_ssid = priv->connect_requested_ssid_len == VIRT_WIFI_SSID_LEN &&
|
||||
bool right_ssid = priv->connect_requested_ssid_len == strlen(VIRT_WIFI_SSID) &&
|
||||
!memcmp(priv->connect_requested_ssid, VIRT_WIFI_SSID,
|
||||
priv->connect_requested_ssid_len);
|
||||
u16 status = WLAN_STATUS_SUCCESS;
|
||||
|
|
Loading…
Add table
Reference in a new issue