Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327915
b: refs/heads/master
c: cbaa177
h: refs/heads/master
i:
  327913: 310cd69
  327911: 99bcfbb
v: v3
  • Loading branch information
Arend van Spriel authored and John W. Linville committed Sep 7, 2012
1 parent 14357a2 commit 500d866
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70f0822c5d430ddcca722cd8cd03760ca432c531
refs/heads/master: cbaa177d2b2f9364c7b9250d8ced75fae326c052
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ extern uint brcmf_c_mkiovar(char *name, char *data, uint datalen,
extern int brcmf_netdev_wait_pend8021x(struct net_device *ndev);

extern s32 brcmf_exec_dcmd(struct net_device *dev, u32 cmd, void *arg, u32 len);
extern int brcmf_netlink_dcmd(struct net_device *ndev, struct brcmf_dcmd *dcmd);

/* Return pointer to interface name */
extern char *brcmf_ifname(struct brcmf_pub *drvr, int idx);
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,14 @@ s32 brcmf_exec_dcmd(struct net_device *ndev, u32 cmd, void *arg, u32 len)
return err;
}

int brcmf_netlink_dcmd(struct net_device *ndev, struct brcmf_dcmd *dcmd)
{
brcmf_dbg(TRACE, "enter: cmd %x buf %p len %d\n",
dcmd->cmd, dcmd->buf, dcmd->len);

return brcmf_exec_dcmd(ndev, dcmd->cmd, dcmd->buf, dcmd->len);
}

static int brcmf_netdev_stop(struct net_device *ndev)
{
struct brcmf_if *ifp = netdev_priv(ndev);
Expand Down
25 changes: 24 additions & 1 deletion trunk/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/ieee80211.h>
#include <linux/uaccess.h>
#include <net/cfg80211.h>
#include <net/netlink.h>

#include <brcmu_utils.h>
#include <defs.h>
Expand Down Expand Up @@ -2723,6 +2724,25 @@ brcmf_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device *ndev)

}

#ifdef CONFIG_NL80211_TESTMODE
static int brcmf_cfg80211_testmode(struct wiphy *wiphy, void *data, int len)
{
struct brcmf_cfg80211_priv *cfg_priv = wiphy_to_cfg(wiphy);
struct net_device *ndev = cfg_priv->wdev->netdev;
struct brcmf_dcmd *dcmd = data;
struct sk_buff *reply;
int ret;

ret = brcmf_netlink_dcmd(ndev, dcmd);
if (ret == 0) {
reply = cfg80211_testmode_alloc_reply_skb(wiphy, sizeof(*dcmd));
nla_put(reply, NL80211_ATTR_TESTDATA, sizeof(*dcmd), dcmd);
ret = cfg80211_testmode_reply(reply);
}
return ret;
}
#endif

static struct cfg80211_ops wl_cfg80211_ops = {
.change_virtual_intf = brcmf_cfg80211_change_iface,
.scan = brcmf_cfg80211_scan,
Expand All @@ -2745,7 +2765,10 @@ static struct cfg80211_ops wl_cfg80211_ops = {
.resume = brcmf_cfg80211_resume,
.set_pmksa = brcmf_cfg80211_set_pmksa,
.del_pmksa = brcmf_cfg80211_del_pmksa,
.flush_pmksa = brcmf_cfg80211_flush_pmksa
.flush_pmksa = brcmf_cfg80211_flush_pmksa,
#ifdef CONFIG_NL80211_TESTMODE
.testmode_cmd = brcmf_cfg80211_testmode
#endif
};

static s32 brcmf_mode_to_nl80211_iftype(s32 mode)
Expand Down

0 comments on commit 500d866

Please sign in to comment.