diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/silabs/wfx/hif_tx.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/silabs/wfx/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/silabs/wfx/sta.c | 20 |
3 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/wireless/silabs/wfx/hif_tx.c b/drivers/net/wireless/silabs/wfx/hif_tx.c index 2b92c227efbc..d35dd940d968 100644 --- a/drivers/net/wireless/silabs/wfx/hif_tx.c +++ b/drivers/net/wireless/silabs/wfx/hif_tx.c @@ -280,7 +280,7 @@ int wfx_hif_stop_scan(struct wfx_vif *wvif) } int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, - struct ieee80211_channel *channel, const u8 *ssid, int ssidlen) + struct ieee80211_channel *channel, const u8 *ssid, int ssid_len) { int ret; struct wfx_hif_msg *hif; @@ -288,8 +288,8 @@ int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, WARN_ON(!conf->beacon_int); WARN_ON(!conf->basic_rates); - WARN_ON(sizeof(body->ssid) < ssidlen); - WARN(!conf->ibss_joined && !ssidlen, "joining an unknown BSS"); + WARN_ON(sizeof(body->ssid) < ssid_len); + WARN(!conf->ibss_joined && !ssid_len, "joining an unknown BSS"); if (!hif) return -ENOMEM; body->infrastructure_bss_mode = !conf->ibss_joined; @@ -300,8 +300,8 @@ int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, body->basic_rate_set = cpu_to_le32(wfx_rate_mask_to_hw(wvif->wdev, conf->basic_rates)); memcpy(body->bssid, conf->bssid, sizeof(body->bssid)); if (ssid) { - body->ssid_length = cpu_to_le32(ssidlen); - memcpy(body->ssid, ssid, ssidlen); + body->ssid_length = cpu_to_le32(ssid_len); + memcpy(body->ssid, ssid, ssid_len); } wfx_fill_header(hif, wvif->id, HIF_REQ_ID_JOIN, sizeof(*body)); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false); diff --git a/drivers/net/wireless/silabs/wfx/main.c b/drivers/net/wireless/silabs/wfx/main.c index bbfd3fa51921..e015bfb8d221 100644 --- a/drivers/net/wireless/silabs/wfx/main.c +++ b/drivers/net/wireless/silabs/wfx/main.c @@ -170,7 +170,7 @@ bool wfx_api_older_than(struct wfx_dev *wdev, int major, int minor) * * The PDS file is an array of Time-Length-Value structs. */ - int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len) +int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len) { int ret, chunk_type, chunk_len, chunk_num = 0; diff --git a/drivers/net/wireless/silabs/wfx/sta.c b/drivers/net/wireless/silabs/wfx/sta.c index e551fa284a43..329d7f4a2b2e 100644 --- a/drivers/net/wireless/silabs/wfx/sta.c +++ b/drivers/net/wireless/silabs/wfx/sta.c @@ -409,8 +409,8 @@ static void wfx_join(struct wfx_vif *wvif) struct ieee80211_bss_conf *conf = &vif->bss_conf; struct cfg80211_bss *bss = NULL; u8 ssid[IEEE80211_MAX_SSID_LEN]; - const u8 *ssidie = NULL; - int ssidlen = 0; + const u8 *ssid_ie = NULL; + int ssid_len = 0; int ret; wfx_tx_lock_flush(wvif->wdev); @@ -422,21 +422,21 @@ static void wfx_join(struct wfx_vif *wvif) return; } - rcu_read_lock(); /* protect ssidie */ + rcu_read_lock(); /* protect ssid_ie */ if (bss) - ssidie = ieee80211_bss_get_ie(bss, WLAN_EID_SSID); - if (ssidie) { - ssidlen = ssidie[1]; - if (ssidlen > IEEE80211_MAX_SSID_LEN) - ssidlen = IEEE80211_MAX_SSID_LEN; - memcpy(ssid, &ssidie[2], ssidlen); + ssid_ie = ieee80211_bss_get_ie(bss, WLAN_EID_SSID); + if (ssid_ie) { + ssid_len = ssid_ie[1]; + if (ssid_len > IEEE80211_MAX_SSID_LEN) + ssid_len = IEEE80211_MAX_SSID_LEN; + memcpy(ssid, &ssid_ie[2], ssid_len); } rcu_read_unlock(); cfg80211_put_bss(wvif->wdev->hw->wiphy, bss); wvif->join_in_progress = true; - ret = wfx_hif_join(wvif, conf, wvif->channel, ssid, ssidlen); + ret = wfx_hif_join(wvif, conf, wvif->channel, ssid, ssid_len); if (ret) { ieee80211_connection_loss(vif); wfx_reset(wvif); |