{
struct wilc_priv *priv;
u32 i;
- s32 s32Error = 0;
+ s32 ret = 0;
u8 au8ScanChanList[MAX_NUM_SCANNED_NETWORKS];
struct hidden_network strHiddenNetwork;
struct wilc_vif *vif;
strHiddenNetwork.n_ssids -= 1;
}
}
- s32Error = wilc_scan(vif, USER_SCAN, ACTIVE_SCAN,
+ ret = wilc_scan(vif, USER_SCAN, ACTIVE_SCAN,
au8ScanChanList,
request->n_channels,
(const u8 *)request->ie,
request->ie_len, CfgScanResult,
(void *)priv, &strHiddenNetwork);
} else {
- s32Error = wilc_scan(vif, USER_SCAN, ACTIVE_SCAN,
+ ret = wilc_scan(vif, USER_SCAN, ACTIVE_SCAN,
au8ScanChanList,
request->n_channels,
(const u8 *)request->ie,
netdev_err(priv->dev, "Requested scanned channels over\n");
}
- if (s32Error != 0)
- s32Error = -EBUSY;
+ if (ret != 0)
+ ret = -EBUSY;
- return s32Error;
+ return ret;
}
static int connect(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_connect_params *sme)
{
- s32 s32Error = 0;
+ s32 ret = 0;
u32 i;
u32 sel_bssi_idx = UINT_MAX;
u8 u8security = NO_ENCRYPT;
if (sel_bssi_idx < last_scanned_cnt) {
pstrNetworkInfo = &last_scanned_shadow[sel_bssi_idx];
} else {
- s32Error = -ENOENT;
+ ret = -ENOENT;
wilc_connecting = 0;
- return s32Error;
+ return ret;
}
memset(priv->WILC_WFI_wep_key, 0, sizeof(priv->WILC_WFI_wep_key));
else
u8security = ENCRYPT_ENABLED | WPA | AES;
} else {
- s32Error = -ENOTSUPP;
+ ret = -ENOTSUPP;
netdev_err(dev, "Not supported cipher\n");
wilc_connecting = 0;
- return s32Error;
+ return ret;
}
}
wilc_wlan_set_bssid(dev, pstrNetworkInfo->bssid, STATION_MODE);
- s32Error = wilc_set_join_req(vif, pstrNetworkInfo->bssid, sme->ssid,
+ ret = wilc_set_join_req(vif, pstrNetworkInfo->bssid, sme->ssid,
sme->ssid_len, sme->ie, sme->ie_len,
CfgConnectResult, (void *)priv,
u8security, tenuAuth_type,
pstrNetworkInfo->ch,
pstrNetworkInfo->join_params);
- if (s32Error != 0) {
+ if (ret != 0) {
netdev_err(dev, "wilc_set_join_req(): Error\n");
- s32Error = -ENOENT;
+ ret = -ENOENT;
wilc_connecting = 0;
- return s32Error;
+ return ret;
}
- return s32Error;
+ return ret;
}
static int disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_code)
{
- s32 s32Error = 0;
+ s32 ret = 0;
struct wilc_priv *priv;
struct host_if_drv *pstrWFIDrv;
struct wilc_vif *vif;
wilc_ie = false;
pstrWFIDrv->p2p_timeout = 0;
- s32Error = wilc_disconnect(vif, reason_code);
- if (s32Error != 0) {
+ ret = wilc_disconnect(vif, reason_code);
+ if (ret != 0) {
netdev_err(priv->dev, "Error in disconnecting\n");
- s32Error = -EINVAL;
+ ret = -EINVAL;
}
- return s32Error;
+ return ret;
}
static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
const u8 *mac_addr, struct key_params *params)
{
- s32 s32Error = 0, KeyLen = params->key_len;
+ s32 ret = 0, KeyLen = params->key_len;
struct wilc_priv *priv;
const u8 *pu8RxMic = NULL;
const u8 *pu8TxMic = NULL;
default:
netdev_err(netdev, "Not supported cipher\n");
- s32Error = -ENOTSUPP;
+ ret = -ENOTSUPP;
}
- return s32Error;
+ return ret;
}
static int del_key(struct wiphy *wiphy, struct net_device *netdev,
static int set_wiphy_params(struct wiphy *wiphy, u32 changed)
{
- s32 s32Error = 0;
+ s32 ret = 0;
struct cfg_param_attr pstrCfgParamVal;
struct wilc_priv *priv;
struct wilc_vif *vif;
pstrCfgParamVal.rts_threshold = priv->dev->ieee80211_ptr->wiphy->rts_threshold;
}
- s32Error = wilc_hif_set_cfg(vif, &pstrCfgParamVal);
- if (s32Error)
+ ret = wilc_hif_set_cfg(vif, &pstrCfgParamVal);
+ if (ret)
netdev_err(priv->dev, "Error in setting WIPHY PARAMS\n");
- return s32Error;
+ return ret;
}
static int set_pmksa(struct wiphy *wiphy, struct net_device *netdev,
struct cfg80211_pmksa *pmksa)
{
u32 i;
- s32 s32Error = 0;
+ s32 ret = 0;
u8 flag = 0;
struct wilc_vif *vif;
struct wilc_priv *priv = wiphy_priv(wiphy);
priv->pmkid_list.numpmkid++;
} else {
netdev_err(netdev, "Invalid PMKID index\n");
- s32Error = -EINVAL;
+ ret = -EINVAL;
}
- if (!s32Error)
- s32Error = wilc_set_pmkid_info(vif, &priv->pmkid_list);
+ if (!ret)
+ ret = wilc_set_pmkid_info(vif, &priv->pmkid_list);
- return s32Error;
+ return ret;
}
static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev,
struct cfg80211_pmksa *pmksa)
{
u32 i;
- s32 s32Error = 0;
+ s32 ret = 0;
struct wilc_priv *priv = wiphy_priv(wiphy);
}
priv->pmkid_list.numpmkid--;
} else {
- s32Error = -EINVAL;
+ ret = -EINVAL;
}
- return s32Error;
+ return ret;
}
static int flush_pmksa(struct wiphy *wiphy, struct net_device *netdev)
struct ieee80211_channel *chan,
unsigned int duration, u64 *cookie)
{
- s32 s32Error = 0;
+ s32 ret = 0;
struct wilc_priv *priv;
struct wilc_vif *vif;
if (wdev->iftype == NL80211_IFTYPE_AP) {
netdev_dbg(vif->ndev, "Required while in AP mode\n");
- return s32Error;
+ return ret;
}
curr_channel = chan->hw_value;
{
struct cfg80211_beacon_data *beacon = &(settings->beacon);
struct wilc_priv *priv;
- s32 s32Error = 0;
+ s32 ret = 0;
struct wilc *wl;
struct wilc_vif *vif;
vif = netdev_priv(dev);
wl = vif->wilc;
- s32Error = set_channel(wiphy, &settings->chandef);
+ ret = set_channel(wiphy, &settings->chandef);
- if (s32Error != 0)
+ if (ret != 0)
netdev_err(dev, "Error in setting channel\n");
wilc_wlan_set_bssid(dev, wl->vif[vif->idx]->src_addr, AP_MODE);
static int stop_ap(struct wiphy *wiphy, struct net_device *dev)
{
- s32 s32Error = 0;
+ s32 ret = 0;
struct wilc_priv *priv;
struct wilc_vif *vif;
u8 NullBssid[ETH_ALEN] = {0};
wilc_wlan_set_bssid(dev, NullBssid, AP_MODE);
- s32Error = wilc_del_beacon(vif);
+ ret = wilc_del_beacon(vif);
- if (s32Error)
+ if (ret)
netdev_err(dev, "Host delete beacon fail\n");
- return s32Error;
+ return ret;
}
static int add_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac, struct station_parameters *params)
{
- s32 s32Error = 0;
+ s32 ret = 0;
struct wilc_priv *priv;
struct add_sta_param strStaParams = { {0} };
struct wilc_vif *vif;
strStaParams.flags_mask = params->sta_flags_mask;
strStaParams.flags_set = params->sta_flags_set;
- s32Error = wilc_add_station(vif, &strStaParams);
- if (s32Error)
+ ret = wilc_add_station(vif, &strStaParams);
+ if (ret)
netdev_err(dev, "Host add station fail\n");
}
- return s32Error;
+ return ret;
}
static int del_station(struct wiphy *wiphy, struct net_device *dev,
struct station_del_parameters *params)
{
const u8 *mac = params->mac;
- s32 s32Error = 0;
+ s32 ret = 0;
struct wilc_priv *priv;
struct wilc_vif *vif;
if (vif->iftype == AP_MODE || vif->iftype == GO_MODE) {
if (!mac)
- s32Error = wilc_del_allstation(vif,
+ ret = wilc_del_allstation(vif,
priv->assoc_stainfo.sta_associated_bss);
- s32Error = wilc_del_station(vif, mac);
+ ret = wilc_del_station(vif, mac);
- if (s32Error)
+ if (ret)
netdev_err(dev, "Host delete station fail\n");
}
- return s32Error;
+ return ret;
}
static int change_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac, struct station_parameters *params)
{
- s32 s32Error = 0;
+ s32 ret = 0;
struct wilc_priv *priv;
struct add_sta_param strStaParams = { {0} };
struct wilc_vif *vif;
strStaParams.flags_mask = params->sta_flags_mask;
strStaParams.flags_set = params->sta_flags_set;
- s32Error = wilc_edit_station(vif, &strStaParams);
- if (s32Error)
+ ret = wilc_edit_station(vif, &strStaParams);
+ if (ret)
netdev_err(dev, "Host edit station fail\n");
}
- return s32Error;
+ return ret;
}
static struct wireless_dev *add_virtual_intf(struct wiphy *wiphy,
{
struct wilc_priv *priv;
struct wireless_dev *wdev;
- s32 s32Error = 0;
+ s32 ret = 0;
wdev = WILC_WFI_CfgAlloc();
if (!wdev) {
set_wiphy_dev(wdev->wiphy, dev);
- s32Error = wiphy_register(wdev->wiphy);
- if (s32Error)
+ ret = wiphy_register(wdev->wiphy);
+ if (ret)
netdev_err(net, "Cannot register wiphy device\n");
priv->dev = net;
int wilc_init_host_int(struct net_device *net)
{
- int s32Error = 0;
+ int ret = 0;
struct wilc_priv *priv;
priv->p2p_listen_state = false;
mutex_init(&priv->scan_req_lock);
- s32Error = wilc_init(net, &priv->hif_drv);
- if (s32Error)
+ ret = wilc_init(net, &priv->hif_drv);
+ if (ret)
netdev_err(net, "Error while initializing hostinterface\n");
- return s32Error;
+ return ret;
}
int wilc_deinit_host_int(struct net_device *net)
{
- int s32Error = 0;
+ int ret = 0;
struct wilc_vif *vif;
struct wilc_priv *priv;
op_ifcs--;
- s32Error = wilc_deinit(vif);
+ ret = wilc_deinit(vif);
clear_shadow_scan();
if (op_ifcs == 0)
del_timer_sync(&wilc_during_ip_timer);
- if (s32Error)
+ if (ret)
netdev_err(net, "Error while deinitializing host interface\n");
- return s32Error;
+ return ret;
}
void wilc_free_wiphy(struct net_device *net)