#include "dhd.h"
#include "dhd_bus.h"
#include "dhd_dbg.h"
+#include "fwil.h"
static s32
}
s32
-brcmf_fil_bsscfg_data_set(struct net_device *ndev, s32 bssidx, char *name,
+brcmf_fil_bsscfg_data_set(struct net_device *ndev, char *name,
void *data, u32 len)
{
struct brcmf_if *ifp = netdev_priv(ndev);
mutex_lock(&drvr->proto_block);
- brcmf_dbg(FIL, "bssidx=%d, name=%s, len=%d\n", bssidx, name, len);
+ brcmf_dbg(FIL, "bssidx=%d, name=%s, len=%d\n", ifp->bssidx, name, len);
brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, len, "data");
- buflen = brcmf_create_bsscfg(bssidx, name, data, len, drvr->proto_buf,
- sizeof(drvr->proto_buf));
+ buflen = brcmf_create_bsscfg(ifp->bssidx, name, data, len,
+ drvr->proto_buf, sizeof(drvr->proto_buf));
if (buflen) {
err = brcmf_fil_cmd_data(ifp, BRCMF_C_SET_VAR, drvr->proto_buf,
buflen, true);
}
s32
-brcmf_fil_bsscfg_data_get(struct net_device *ndev, s32 bssidx, char *name,
+brcmf_fil_bsscfg_data_get(struct net_device *ndev, char *name,
void *data, u32 len)
{
struct brcmf_if *ifp = netdev_priv(ndev);
mutex_lock(&drvr->proto_block);
- buflen = brcmf_create_bsscfg(bssidx, name, NULL, len, drvr->proto_buf,
- sizeof(drvr->proto_buf));
+ buflen = brcmf_create_bsscfg(ifp->bssidx, name, NULL, len,
+ drvr->proto_buf, sizeof(drvr->proto_buf));
if (buflen) {
err = brcmf_fil_cmd_data(ifp, BRCMF_C_GET_VAR, drvr->proto_buf,
buflen, false);
err = -EPERM;
brcmf_dbg(ERROR, "Creating bsscfg failed\n");
}
- brcmf_dbg(FIL, "bssidx=%d, name=%s, len=%d\n", bssidx, name, len);
+ brcmf_dbg(FIL, "bssidx=%d, name=%s, len=%d\n", ifp->bssidx, name, len);
brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, len, "data");
mutex_unlock(&drvr->proto_block);
}
s32
-brcmf_fil_bsscfg_int_set(struct net_device *ndev, s32 bssidx, char *name,
- u32 data)
+brcmf_fil_bsscfg_int_set(struct net_device *ndev, char *name, u32 data)
{
__le32 data_le = cpu_to_le32(data);
- return brcmf_fil_bsscfg_data_set(ndev, bssidx, name, &data_le,
+ return brcmf_fil_bsscfg_data_set(ndev, name, &data_le,
sizeof(data_le));
}
s32
-brcmf_fil_bsscfg_int_get(struct net_device *ndev, s32 bssidx, char *name,
- u32 *data)
+brcmf_fil_bsscfg_int_get(struct net_device *ndev, char *name, u32 *data)
{
__le32 data_le = cpu_to_le32(*data);
s32 err;
- err = brcmf_fil_bsscfg_data_get(ndev, bssidx, name, &data_le,
+ err = brcmf_fil_bsscfg_data_get(ndev, name, &data_le,
sizeof(data_le));
if (err == 0)
*data = le32_to_cpu(data_le);
s32 brcmf_fil_iovar_int_set(struct net_device *ndev, char *name, u32 data);
s32 brcmf_fil_iovar_int_get(struct net_device *ndev, char *name, u32 *data);
-s32 brcmf_fil_bsscfg_data_set(struct net_device *ndev, s32 bssidx, char *name,
- void *data, u32 len);
-s32 brcmf_fil_bsscfg_data_get(struct net_device *ndev, s32 bssidx, char *name,
- void *data, u32 len);
-s32 brcmf_fil_bsscfg_int_set(struct net_device *ndev, s32 bssidx, char *name,
- u32 data);
-s32 brcmf_fil_bsscfg_int_get(struct net_device *ndev, s32 bssidx, char *name,
- u32 *data);
+s32 brcmf_fil_bsscfg_data_set(struct net_device *ndev, char *name, void *data,
+ u32 len);
+s32 brcmf_fil_bsscfg_data_get(struct net_device *ndev, char *name, void *data,
+ u32 len);
+s32 brcmf_fil_bsscfg_int_set(struct net_device *ndev, char *name, u32 data);
+s32 brcmf_fil_bsscfg_int_get(struct net_device *ndev, char *name, u32 *data);
#endif /* _fwil_h_ */
brcmf_netdev_wait_pend8021x(ndev);
- err = brcmf_fil_bsscfg_data_set(ndev, bssidx, "wsec_key", &key_le,
+ err = brcmf_fil_bsscfg_data_set(ndev, "wsec_key", &key_le,
sizeof(key_le));
if (err)
if (sec->auth_type == NL80211_AUTHTYPE_SHARED_KEY) {
WL_CONN("set auth_type to shared key\n");
val = WL_AUTH_SHARED_KEY; /* shared key */
- err = brcmf_fil_bsscfg_int_set(ndev, bssidx, "auth", val);
+ err = brcmf_fil_bsscfg_int_set(ndev, "auth", val);
if (err)
WL_ERR("set auth failed (%d)\n", err);
}
return -EIO;
bssidx = brcmf_find_bssidx(cfg, ndev);
- err = brcmf_fil_bsscfg_int_get(ndev, bssidx, "wsec", &wsec);
+ err = brcmf_fil_bsscfg_int_get(ndev, "wsec", &wsec);
if (err) {
WL_ERR("WLC_GET_WSEC error (%d)\n", err);
goto done;
if (err)
goto done;
- err = brcmf_fil_bsscfg_int_get(ndev, bssidx, "wsec", &wsec);
+ err = brcmf_fil_bsscfg_int_get(ndev, "wsec", &wsec);
if (err) {
WL_ERR("get wsec error (%d)\n", err);
goto done;
}
wsec |= val;
- err = brcmf_fil_bsscfg_int_set(ndev, bssidx, "wsec", wsec);
+ err = brcmf_fil_bsscfg_int_set(ndev, "wsec", wsec);
if (err) {
WL_ERR("set wsec error (%d)\n", err);
goto done;
memset(¶ms, 0, sizeof(params));
bssidx = brcmf_find_bssidx(cfg, ndev);
- err = brcmf_fil_bsscfg_int_get(ndev, bssidx, "wsec", &wsec);
+ err = brcmf_fil_bsscfg_int_get(ndev, "wsec", &wsec);
if (err) {
WL_ERR("WLC_GET_WSEC error (%d)\n", err);
/* Ignore this error, may happen during DISASSOC */
s32 err;
/* set auth */
- err = brcmf_fil_bsscfg_int_set(ndev, bssidx, "auth", 0);
+ err = brcmf_fil_bsscfg_int_set(ndev, "auth", 0);
if (err < 0) {
WL_ERR("auth error %d\n", err);
return err;
}
/* set wsec */
- err = brcmf_fil_bsscfg_int_set(ndev, bssidx, "wsec", 0);
+ err = brcmf_fil_bsscfg_int_set(ndev, "wsec", 0);
if (err < 0) {
WL_ERR("wsec error %d\n", err);
return err;
}
/* set upper-layer auth */
- err = brcmf_fil_bsscfg_int_set(ndev, bssidx, "wpa_auth", WPA_AUTH_NONE);
+ err = brcmf_fil_bsscfg_int_set(ndev, "wpa_auth", WPA_AUTH_NONE);
if (err < 0) {
WL_ERR("wpa_auth error %d\n", err);
return err;
wme_bss_disable = 0;
}
/* set wme_bss_disable to sync RSN Capabilities */
- err = brcmf_fil_bsscfg_int_set(ndev, bssidx, "wme_bss_disable",
+ err = brcmf_fil_bsscfg_int_set(ndev, "wme_bss_disable",
wme_bss_disable);
if (err < 0) {
WL_ERR("wme_bss_disable error %d\n", err);
wsec = (pval | gval | SES_OW_ENABLED);
/* set auth */
- err = brcmf_fil_bsscfg_int_set(ndev, bssidx, "auth", auth);
+ err = brcmf_fil_bsscfg_int_set(ndev, "auth", auth);
if (err < 0) {
WL_ERR("auth error %d\n", err);
goto exit;
}
/* set wsec */
- err = brcmf_fil_bsscfg_int_set(ndev, bssidx, "wsec", wsec);
+ err = brcmf_fil_bsscfg_int_set(ndev, "wsec", wsec);
if (err < 0) {
WL_ERR("wsec error %d\n", err);
goto exit;
}
/* set upper-layer auth */
- err = brcmf_fil_bsscfg_int_set(ndev, bssidx, "wpa_auth", wpa_auth);
+ err = brcmf_fil_bsscfg_int_set(ndev, "wpa_auth", wpa_auth);
if (err < 0) {
WL_ERR("wpa_auth error %d\n", err);
goto exit;
}
}
if (total_ie_buf_len) {
- err = brcmf_fil_bsscfg_data_set(ndev, bssidx, "vndr_ie",
+ err = brcmf_fil_bsscfg_data_set(ndev, "vndr_ie",
iovar_ie_buf,
total_ie_buf_len);
if (err)