Commit f09d0c02 authored by Hante Meuleman's avatar Hante Meuleman Committed by John W. Linville

brcmfmac: use different fw api for encryption,auth. config

This patch changes the commands being used to configure
encryption and authentication. These new methods are needed
for when p2p and hostap support are added.
Reviewed-by: default avatarArend Van Spriel <arend@broadcom.com>
Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 70398a59
...@@ -658,6 +658,8 @@ extern const struct bcmevent_name bcmevent_names[]; ...@@ -658,6 +658,8 @@ extern const struct bcmevent_name bcmevent_names[];
extern uint brcmf_c_mkiovar(char *name, char *data, uint datalen, extern uint brcmf_c_mkiovar(char *name, char *data, uint datalen,
char *buf, uint len); char *buf, uint len);
extern uint brcmf_c_mkiovar_bsscfg(char *name, char *data, uint datalen,
char *buf, uint buflen, s32 bssidx);
extern int brcmf_netdev_wait_pend8021x(struct net_device *ndev); extern int brcmf_netdev_wait_pend8021x(struct net_device *ndev);
......
...@@ -88,6 +88,52 @@ brcmf_c_mkiovar(char *name, char *data, uint datalen, char *buf, uint buflen) ...@@ -88,6 +88,52 @@ brcmf_c_mkiovar(char *name, char *data, uint datalen, char *buf, uint buflen)
return len; return len;
} }
uint
brcmf_c_mkiovar_bsscfg(char *name, char *data, uint datalen,
char *buf, uint buflen, s32 bssidx)
{
const s8 *prefix = "bsscfg:";
s8 *p;
u32 prefixlen;
u32 namelen;
u32 iolen;
__le32 bssidx_le;
if (bssidx == 0)
return brcmf_c_mkiovar(name, data, datalen, buf, buflen);
prefixlen = (u32) strlen(prefix); /* lengh of bsscfg prefix */
namelen = (u32) strlen(name) + 1; /* lengh of iovar name + null */
iolen = prefixlen + namelen + sizeof(bssidx_le) + datalen;
if (buflen < 0 || iolen > (u32)buflen) {
brcmf_dbg(ERROR, "buffer is too short\n");
return 0;
}
p = buf;
/* copy prefix, no null */
memcpy(p, prefix, prefixlen);
p += prefixlen;
/* copy iovar name including null */
memcpy(p, name, namelen);
p += namelen;
/* bss config index as first data */
bssidx_le = cpu_to_le32(bssidx);
memcpy(p, &bssidx_le, sizeof(bssidx_le));
p += sizeof(bssidx_le);
/* parameter buffer follows */
if (datalen)
memcpy(p, data, datalen);
return iolen;
}
bool brcmf_c_prec_enq(struct device *dev, struct pktq *q, bool brcmf_c_prec_enq(struct device *dev, struct pktq *q,
struct sk_buff *pkt, int prec) struct sk_buff *pkt, int prec)
{ {
......
...@@ -130,6 +130,8 @@ do { \ ...@@ -130,6 +130,8 @@ do { \
#define WL_ESCAN_ACTION_CONTINUE 2 #define WL_ESCAN_ACTION_CONTINUE 2
#define WL_ESCAN_ACTION_ABORT 3 #define WL_ESCAN_ACTION_ABORT 3
#define WL_AUTH_SHARED_KEY 1 /* d11 shared authentication */
/* dongle status */ /* dongle status */
enum wl_status { enum wl_status {
WL_STATUS_READY, WL_STATUS_READY,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment