diff options
author | Arend van Spriel <arend@broadcom.com> | 2012-10-22 16:55:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-29 15:28:53 -0400 |
commit | ce81e3175ed5b86b19ef068246fc2c829aff84d5 (patch) | |
tree | 2ce43c355c5bbc464f6671832dcadf26920d1e69 | |
parent | 1c90fba59b0d4b81396231c8db7bb94e28973aab (diff) |
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>
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index da48894a368..5ce0068c097 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
@@ -98,7 +98,7 @@ static const u8 ether_bcast[ETH_ALEN] = {255, 255, 255, 255, 255, 255}; | |||
98 | 98 | ||
99 | static u32 brcmf_dbg_level = WL_DBG_ERR; | 99 | static u32 brcmf_dbg_level = WL_DBG_ERR; |
100 | 100 | ||
101 | static bool check_sys_up(struct brcmf_cfg80211_vif *vif) | 101 | static bool check_vif_up(struct brcmf_cfg80211_vif *vif) |
102 | { | 102 | { |
103 | if (!test_bit(BRCMF_VIF_STATUS_READY, &vif->sme_state)) { | 103 | if (!test_bit(BRCMF_VIF_STATUS_READY, &vif->sme_state)) { |
104 | WL_INFO("device is not ready : status (%lu)\n", | 104 | WL_INFO("device is not ready : status (%lu)\n", |
@@ -521,7 +521,7 @@ static void brcmf_set_mpc(struct net_device *ndev, int mpc) | |||
521 | struct brcmf_if *ifp = netdev_priv(ndev); | 521 | struct brcmf_if *ifp = netdev_priv(ndev); |
522 | s32 err = 0; | 522 | s32 err = 0; |
523 | 523 | ||
524 | if (check_sys_up(ifp->vif)) { | 524 | if (check_vif_up(ifp->vif)) { |
525 | err = brcmf_fil_iovar_int_set(ifp, "mpc", mpc); | 525 | err = brcmf_fil_iovar_int_set(ifp, "mpc", mpc); |
526 | if (err) { | 526 | if (err) { |
527 | WL_ERR("fail to set mpc\n"); | 527 | WL_ERR("fail to set mpc\n"); |
@@ -1034,7 +1034,7 @@ brcmf_cfg80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) | |||
1034 | 1034 | ||
1035 | WL_TRACE("Enter\n"); | 1035 | WL_TRACE("Enter\n"); |
1036 | 1036 | ||
1037 | if (!check_sys_up(container_of(request->wdev, | 1037 | if (!check_vif_up(container_of(request->wdev, |
1038 | struct brcmf_cfg80211_vif, wdev))) | 1038 | struct brcmf_cfg80211_vif, wdev))) |
1039 | return -EIO; | 1039 | return -EIO; |
1040 | 1040 | ||
@@ -1095,7 +1095,7 @@ static s32 brcmf_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) | |||
1095 | s32 err = 0; | 1095 | s32 err = 0; |
1096 | 1096 | ||
1097 | WL_TRACE("Enter\n"); | 1097 | WL_TRACE("Enter\n"); |
1098 | if (!check_sys_up(ifp->vif)) | 1098 | if (!check_vif_up(ifp->vif)) |
1099 | return -EIO; | 1099 | return -EIO; |
1100 | 1100 | ||
1101 | if (changed & WIPHY_PARAM_RTS_THRESHOLD && | 1101 | if (changed & WIPHY_PARAM_RTS_THRESHOLD && |
@@ -1197,7 +1197,7 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *ndev, | |||
1197 | s32 bcnprd; | 1197 | s32 bcnprd; |
1198 | 1198 | ||
1199 | WL_TRACE("Enter\n"); | 1199 | WL_TRACE("Enter\n"); |
1200 | if (!check_sys_up(ifp->vif)) | 1200 | if (!check_vif_up(ifp->vif)) |
1201 | return -EIO; | 1201 | return -EIO; |
1202 | 1202 | ||
1203 | if (params->ssid) | 1203 | if (params->ssid) |
@@ -1336,7 +1336,7 @@ brcmf_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *ndev) | |||
1336 | s32 err = 0; | 1336 | s32 err = 0; |
1337 | 1337 | ||
1338 | WL_TRACE("Enter\n"); | 1338 | WL_TRACE("Enter\n"); |
1339 | if (!check_sys_up(ifp->vif)) | 1339 | if (!check_vif_up(ifp->vif)) |
1340 | return -EIO; | 1340 | return -EIO; |
1341 | 1341 | ||
1342 | brcmf_link_down(cfg); | 1342 | brcmf_link_down(cfg); |
@@ -1614,7 +1614,7 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev, | |||
1614 | s32 err = 0; | 1614 | s32 err = 0; |
1615 | 1615 | ||
1616 | WL_TRACE("Enter\n"); | 1616 | WL_TRACE("Enter\n"); |
1617 | if (!check_sys_up(ifp->vif)) | 1617 | if (!check_vif_up(ifp->vif)) |
1618 | return -EIO; | 1618 | return -EIO; |
1619 | 1619 | ||
1620 | if (!sme->ssid) { | 1620 | if (!sme->ssid) { |
@@ -1704,7 +1704,7 @@ brcmf_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *ndev, | |||
1704 | s32 err = 0; | 1704 | s32 err = 0; |
1705 | 1705 | ||
1706 | WL_TRACE("Enter. Reason code = %d\n", reason_code); | 1706 | WL_TRACE("Enter. Reason code = %d\n", reason_code); |
1707 | if (!check_sys_up(ifp->vif)) | 1707 | if (!check_vif_up(ifp->vif)) |
1708 | return -EIO; | 1708 | return -EIO; |
1709 | 1709 | ||
1710 | clear_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state); | 1710 | clear_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state); |
@@ -1736,7 +1736,7 @@ brcmf_cfg80211_set_tx_power(struct wiphy *wiphy, | |||
1736 | s32 dbm = MBM_TO_DBM(mbm); | 1736 | s32 dbm = MBM_TO_DBM(mbm); |
1737 | 1737 | ||
1738 | WL_TRACE("Enter\n"); | 1738 | WL_TRACE("Enter\n"); |
1739 | if (!check_sys_up(ifp->vif)) | 1739 | if (!check_vif_up(ifp->vif)) |
1740 | return -EIO; | 1740 | return -EIO; |
1741 | 1741 | ||
1742 | switch (type) { | 1742 | switch (type) { |
@@ -1781,7 +1781,7 @@ static s32 brcmf_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm) | |||
1781 | s32 err = 0; | 1781 | s32 err = 0; |
1782 | 1782 | ||
1783 | WL_TRACE("Enter\n"); | 1783 | WL_TRACE("Enter\n"); |
1784 | if (!check_sys_up(ifp->vif)) | 1784 | if (!check_vif_up(ifp->vif)) |
1785 | return -EIO; | 1785 | return -EIO; |
1786 | 1786 | ||
1787 | err = brcmf_fil_iovar_int_get(ifp, "qtxpower", &txpwrdbm); | 1787 | err = brcmf_fil_iovar_int_get(ifp, "qtxpower", &txpwrdbm); |
@@ -1809,7 +1809,7 @@ brcmf_cfg80211_config_default_key(struct wiphy *wiphy, struct net_device *ndev, | |||
1809 | 1809 | ||
1810 | WL_TRACE("Enter\n"); | 1810 | WL_TRACE("Enter\n"); |
1811 | WL_CONN("key index (%d)\n", key_idx); | 1811 | WL_CONN("key index (%d)\n", key_idx); |
1812 | if (!check_sys_up(ifp->vif)) | 1812 | if (!check_vif_up(ifp->vif)) |
1813 | return -EIO; | 1813 | return -EIO; |
1814 | 1814 | ||
1815 | err = brcmf_fil_bsscfg_int_get(ifp, "wsec", &wsec); | 1815 | err = brcmf_fil_bsscfg_int_get(ifp, "wsec", &wsec); |
@@ -1925,7 +1925,7 @@ brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, | |||
1925 | 1925 | ||
1926 | WL_TRACE("Enter\n"); | 1926 | WL_TRACE("Enter\n"); |
1927 | WL_CONN("key index (%d)\n", key_idx); | 1927 | WL_CONN("key index (%d)\n", key_idx); |
1928 | if (!check_sys_up(ifp->vif)) | 1928 | if (!check_vif_up(ifp->vif)) |
1929 | return -EIO; | 1929 | return -EIO; |
1930 | 1930 | ||
1931 | if (mac_addr) { | 1931 | if (mac_addr) { |
@@ -2013,7 +2013,7 @@ brcmf_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev, | |||
2013 | s32 err = 0; | 2013 | s32 err = 0; |
2014 | 2014 | ||
2015 | WL_TRACE("Enter\n"); | 2015 | WL_TRACE("Enter\n"); |
2016 | if (!check_sys_up(ifp->vif)) | 2016 | if (!check_vif_up(ifp->vif)) |
2017 | return -EIO; | 2017 | return -EIO; |
2018 | 2018 | ||
2019 | memset(&key, 0, sizeof(key)); | 2019 | memset(&key, 0, sizeof(key)); |
@@ -2054,7 +2054,7 @@ brcmf_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev, | |||
2054 | 2054 | ||
2055 | WL_TRACE("Enter\n"); | 2055 | WL_TRACE("Enter\n"); |
2056 | WL_CONN("key index (%d)\n", key_idx); | 2056 | WL_CONN("key index (%d)\n", key_idx); |
2057 | if (!check_sys_up(ifp->vif)) | 2057 | if (!check_vif_up(ifp->vif)) |
2058 | return -EIO; | 2058 | return -EIO; |
2059 | 2059 | ||
2060 | memset(¶ms, 0, sizeof(params)); | 2060 | memset(¶ms, 0, sizeof(params)); |
@@ -2121,7 +2121,7 @@ brcmf_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev, | |||
2121 | struct brcmf_sta_info_le sta_info_le; | 2121 | struct brcmf_sta_info_le sta_info_le; |
2122 | 2122 | ||
2123 | WL_TRACE("Enter, MAC %pM\n", mac); | 2123 | WL_TRACE("Enter, MAC %pM\n", mac); |
2124 | if (!check_sys_up(ifp->vif)) | 2124 | if (!check_vif_up(ifp->vif)) |
2125 | return -EIO; | 2125 | return -EIO; |
2126 | 2126 | ||
2127 | if (cfg->conf->mode == WL_MODE_AP) { | 2127 | if (cfg->conf->mode == WL_MODE_AP) { |
@@ -2200,7 +2200,7 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev, | |||
2200 | * FW later while initializing the dongle | 2200 | * FW later while initializing the dongle |
2201 | */ | 2201 | */ |
2202 | cfg->pwr_save = enabled; | 2202 | cfg->pwr_save = enabled; |
2203 | if (!check_sys_up(ifp->vif)) { | 2203 | if (!check_vif_up(ifp->vif)) { |
2204 | 2204 | ||
2205 | WL_INFO("Device is not ready, storing the value in cfg_info struct\n"); | 2205 | WL_INFO("Device is not ready, storing the value in cfg_info struct\n"); |
2206 | goto done; | 2206 | goto done; |
@@ -2236,7 +2236,7 @@ brcmf_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *ndev, | |||
2236 | s32 err = 0; | 2236 | s32 err = 0; |
2237 | 2237 | ||
2238 | WL_TRACE("Enter\n"); | 2238 | WL_TRACE("Enter\n"); |
2239 | if (!check_sys_up(ifp->vif)) | 2239 | if (!check_vif_up(ifp->vif)) |
2240 | return -EIO; | 2240 | return -EIO; |
2241 | 2241 | ||
2242 | /* addr param is always NULL. ignore it */ | 2242 | /* addr param is always NULL. ignore it */ |
@@ -2998,7 +2998,7 @@ static s32 brcmf_cfg80211_resume(struct wiphy *wiphy) | |||
2998 | */ | 2998 | */ |
2999 | WL_TRACE("Enter\n"); | 2999 | WL_TRACE("Enter\n"); |
3000 | 3000 | ||
3001 | if (check_sys_up(ifp->vif)) | 3001 | if (check_vif_up(ifp->vif)) |
3002 | brcmf_invoke_iscan(wiphy_to_cfg(wiphy)); | 3002 | brcmf_invoke_iscan(wiphy_to_cfg(wiphy)); |
3003 | 3003 | ||
3004 | WL_TRACE("Exit\n"); | 3004 | WL_TRACE("Exit\n"); |
@@ -3026,7 +3026,7 @@ static s32 brcmf_cfg80211_suspend(struct wiphy *wiphy, | |||
3026 | */ | 3026 | */ |
3027 | if ((test_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state) || | 3027 | if ((test_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state) || |
3028 | test_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state)) && | 3028 | test_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state)) && |
3029 | check_sys_up(ifp->vif)) { | 3029 | check_vif_up(ifp->vif)) { |
3030 | WL_INFO("Disassociating from AP" | 3030 | WL_INFO("Disassociating from AP" |
3031 | " while entering suspend state\n"); | 3031 | " while entering suspend state\n"); |
3032 | brcmf_link_down(cfg); | 3032 | brcmf_link_down(cfg); |
@@ -3089,7 +3089,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *ndev, | |||
3089 | int pmkid_len; | 3089 | int pmkid_len; |
3090 | 3090 | ||
3091 | WL_TRACE("Enter\n"); | 3091 | WL_TRACE("Enter\n"); |
3092 | if (!check_sys_up(ifp->vif)) | 3092 | if (!check_vif_up(ifp->vif)) |
3093 | return -EIO; | 3093 | return -EIO; |
3094 | 3094 | ||
3095 | pmkid_len = le32_to_cpu(pmkids->npmkid); | 3095 | pmkid_len = le32_to_cpu(pmkids->npmkid); |
@@ -3128,7 +3128,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *ndev, | |||
3128 | int i, pmkid_len; | 3128 | int i, pmkid_len; |
3129 | 3129 | ||
3130 | WL_TRACE("Enter\n"); | 3130 | WL_TRACE("Enter\n"); |
3131 | if (!check_sys_up(ifp->vif)) | 3131 | if (!check_vif_up(ifp->vif)) |
3132 | return -EIO; | 3132 | return -EIO; |
3133 | 3133 | ||
3134 | memcpy(&pmkid.pmkid[0].BSSID, pmksa->bssid, ETH_ALEN); | 3134 | memcpy(&pmkid.pmkid[0].BSSID, pmksa->bssid, ETH_ALEN); |
@@ -3177,7 +3177,7 @@ brcmf_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device *ndev) | |||
3177 | s32 err = 0; | 3177 | s32 err = 0; |
3178 | 3178 | ||
3179 | WL_TRACE("Enter\n"); | 3179 | WL_TRACE("Enter\n"); |
3180 | if (!check_sys_up(ifp->vif)) | 3180 | if (!check_vif_up(ifp->vif)) |
3181 | return -EIO; | 3181 | return -EIO; |
3182 | 3182 | ||
3183 | memset(cfg->pmk_list, 0, sizeof(*cfg->pmk_list)); | 3183 | memset(cfg->pmk_list, 0, sizeof(*cfg->pmk_list)); |
@@ -4128,7 +4128,7 @@ brcmf_cfg80211_del_station(struct wiphy *wiphy, struct net_device *ndev, | |||
4128 | 4128 | ||
4129 | WL_TRACE("Enter %pM\n", mac); | 4129 | WL_TRACE("Enter %pM\n", mac); |
4130 | 4130 | ||
4131 | if (!check_sys_up(ifp->vif)) | 4131 | if (!check_vif_up(ifp->vif)) |
4132 | return -EIO; | 4132 | return -EIO; |
4133 | 4133 | ||
4134 | memcpy(&scbval.ea, mac, ETH_ALEN); | 4134 | memcpy(&scbval.ea, mac, ETH_ALEN); |
@@ -5288,7 +5288,7 @@ static s32 __brcmf_cfg80211_down(struct brcmf_cfg80211_info *cfg) | |||
5288 | */ | 5288 | */ |
5289 | if ((test_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state) || | 5289 | if ((test_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state) || |
5290 | test_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state)) && | 5290 | test_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state)) && |
5291 | check_sys_up(ifp->vif)) { | 5291 | check_vif_up(ifp->vif)) { |
5292 | WL_INFO("Disassociating from AP"); | 5292 | WL_INFO("Disassociating from AP"); |
5293 | brcmf_link_down(cfg); | 5293 | brcmf_link_down(cfg); |
5294 | 5294 | ||