brcmfmac: rename check_sys_up() to check_vif_up()
The function now return the status for a virtual interface so
it seems better rename the function to understand what it does.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index da48894a..5ce0068 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -98,7 +98,7 @@
static u32 brcmf_dbg_level = WL_DBG_ERR;
-static bool check_sys_up(struct brcmf_cfg80211_vif *vif)
+static bool check_vif_up(struct brcmf_cfg80211_vif *vif)
{
if (!test_bit(BRCMF_VIF_STATUS_READY, &vif->sme_state)) {
WL_INFO("device is not ready : status (%lu)\n",
@@ -521,7 +521,7 @@
struct brcmf_if *ifp = netdev_priv(ndev);
s32 err = 0;
- if (check_sys_up(ifp->vif)) {
+ if (check_vif_up(ifp->vif)) {
err = brcmf_fil_iovar_int_set(ifp, "mpc", mpc);
if (err) {
WL_ERR("fail to set mpc\n");
@@ -1034,7 +1034,7 @@
WL_TRACE("Enter\n");
- if (!check_sys_up(container_of(request->wdev,
+ if (!check_vif_up(container_of(request->wdev,
struct brcmf_cfg80211_vif, wdev)))
return -EIO;
@@ -1095,7 +1095,7 @@
s32 err = 0;
WL_TRACE("Enter\n");
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
if (changed & WIPHY_PARAM_RTS_THRESHOLD &&
@@ -1197,7 +1197,7 @@
s32 bcnprd;
WL_TRACE("Enter\n");
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
if (params->ssid)
@@ -1336,7 +1336,7 @@
s32 err = 0;
WL_TRACE("Enter\n");
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
brcmf_link_down(cfg);
@@ -1614,7 +1614,7 @@
s32 err = 0;
WL_TRACE("Enter\n");
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
if (!sme->ssid) {
@@ -1704,7 +1704,7 @@
s32 err = 0;
WL_TRACE("Enter. Reason code = %d\n", reason_code);
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
clear_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state);
@@ -1736,7 +1736,7 @@
s32 dbm = MBM_TO_DBM(mbm);
WL_TRACE("Enter\n");
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
switch (type) {
@@ -1781,7 +1781,7 @@
s32 err = 0;
WL_TRACE("Enter\n");
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
err = brcmf_fil_iovar_int_get(ifp, "qtxpower", &txpwrdbm);
@@ -1809,7 +1809,7 @@
WL_TRACE("Enter\n");
WL_CONN("key index (%d)\n", key_idx);
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
err = brcmf_fil_bsscfg_int_get(ifp, "wsec", &wsec);
@@ -1925,7 +1925,7 @@
WL_TRACE("Enter\n");
WL_CONN("key index (%d)\n", key_idx);
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
if (mac_addr) {
@@ -2013,7 +2013,7 @@
s32 err = 0;
WL_TRACE("Enter\n");
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
memset(&key, 0, sizeof(key));
@@ -2054,7 +2054,7 @@
WL_TRACE("Enter\n");
WL_CONN("key index (%d)\n", key_idx);
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
memset(¶ms, 0, sizeof(params));
@@ -2121,7 +2121,7 @@
struct brcmf_sta_info_le sta_info_le;
WL_TRACE("Enter, MAC %pM\n", mac);
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
if (cfg->conf->mode == WL_MODE_AP) {
@@ -2200,7 +2200,7 @@
* FW later while initializing the dongle
*/
cfg->pwr_save = enabled;
- if (!check_sys_up(ifp->vif)) {
+ if (!check_vif_up(ifp->vif)) {
WL_INFO("Device is not ready, storing the value in cfg_info struct\n");
goto done;
@@ -2236,7 +2236,7 @@
s32 err = 0;
WL_TRACE("Enter\n");
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
/* addr param is always NULL. ignore it */
@@ -2998,7 +2998,7 @@
*/
WL_TRACE("Enter\n");
- if (check_sys_up(ifp->vif))
+ if (check_vif_up(ifp->vif))
brcmf_invoke_iscan(wiphy_to_cfg(wiphy));
WL_TRACE("Exit\n");
@@ -3026,7 +3026,7 @@
*/
if ((test_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state) ||
test_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state)) &&
- check_sys_up(ifp->vif)) {
+ check_vif_up(ifp->vif)) {
WL_INFO("Disassociating from AP"
" while entering suspend state\n");
brcmf_link_down(cfg);
@@ -3089,7 +3089,7 @@
int pmkid_len;
WL_TRACE("Enter\n");
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
pmkid_len = le32_to_cpu(pmkids->npmkid);
@@ -3128,7 +3128,7 @@
int i, pmkid_len;
WL_TRACE("Enter\n");
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
memcpy(&pmkid.pmkid[0].BSSID, pmksa->bssid, ETH_ALEN);
@@ -3177,7 +3177,7 @@
s32 err = 0;
WL_TRACE("Enter\n");
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
memset(cfg->pmk_list, 0, sizeof(*cfg->pmk_list));
@@ -4128,7 +4128,7 @@
WL_TRACE("Enter %pM\n", mac);
- if (!check_sys_up(ifp->vif))
+ if (!check_vif_up(ifp->vif))
return -EIO;
memcpy(&scbval.ea, mac, ETH_ALEN);
@@ -5288,7 +5288,7 @@
*/
if ((test_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state) ||
test_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state)) &&
- check_sys_up(ifp->vif)) {
+ check_vif_up(ifp->vif)) {
WL_INFO("Disassociating from AP");
brcmf_link_down(cfg);