Merge tag 'wireless-drivers-next-for-davem-2016-07-13' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says: ==================== wireless-drivers-next patches for 4.8 Major changes: iwlwifi * more work on the RX path for the 9000 device series * some more dynamic queue allocation work * SAR BIOS implementation * some work on debugging capabilities * added support for GCMP encryption * data path rework in preparation for new HW * some cleanup to remove transport dependency on mac80211 * support for MSIx in preparation for new HW * lots of work in preparation for HW support (9000 and a000 series) mwifiex * implement get_tx_power and get_antenna cfg80211 operation callbacks wl18xx * add support for 64bit clock rtl8xxxu * aggregation support (optional for now) Also wireless-drivers is merged to fix some conflicts. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -789,12 +789,48 @@ s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg,
|
||||
return err;
|
||||
}
|
||||
|
||||
static int brcmf_cfg80211_del_ap_iface(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev)
|
||||
{
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_priv(wiphy);
|
||||
struct net_device *ndev = wdev->netdev;
|
||||
struct brcmf_if *ifp = netdev_priv(ndev);
|
||||
int ret;
|
||||
int err;
|
||||
|
||||
brcmf_cfg80211_arm_vif_event(cfg, ifp->vif);
|
||||
|
||||
err = brcmf_fil_bsscfg_data_set(ifp, "interface_remove", NULL, 0);
|
||||
if (err) {
|
||||
brcmf_err("interface_remove failed %d\n", err);
|
||||
goto err_unarm;
|
||||
}
|
||||
|
||||
/* wait for firmware event */
|
||||
ret = brcmf_cfg80211_wait_vif_event(cfg, BRCMF_E_IF_DEL,
|
||||
BRCMF_VIF_EVENT_TIMEOUT);
|
||||
if (!ret) {
|
||||
brcmf_err("timeout occurred\n");
|
||||
err = -EIO;
|
||||
goto err_unarm;
|
||||
}
|
||||
|
||||
brcmf_remove_interface(ifp, true);
|
||||
|
||||
err_unarm:
|
||||
brcmf_cfg80211_arm_vif_event(cfg, NULL);
|
||||
return err;
|
||||
}
|
||||
|
||||
static
|
||||
int brcmf_cfg80211_del_iface(struct wiphy *wiphy, struct wireless_dev *wdev)
|
||||
{
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_priv(wiphy);
|
||||
struct net_device *ndev = wdev->netdev;
|
||||
|
||||
if (ndev && ndev == cfg_to_ndev(cfg))
|
||||
return -ENOTSUPP;
|
||||
|
||||
/* vif event pending in firmware */
|
||||
if (brcmf_cfg80211_vif_event_armed(cfg))
|
||||
return -EBUSY;
|
||||
@@ -811,12 +847,13 @@ int brcmf_cfg80211_del_iface(struct wiphy *wiphy, struct wireless_dev *wdev)
|
||||
switch (wdev->iftype) {
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
case NL80211_IFTYPE_STATION:
|
||||
case NL80211_IFTYPE_AP:
|
||||
case NL80211_IFTYPE_AP_VLAN:
|
||||
case NL80211_IFTYPE_WDS:
|
||||
case NL80211_IFTYPE_MONITOR:
|
||||
case NL80211_IFTYPE_MESH_POINT:
|
||||
return -EOPNOTSUPP;
|
||||
case NL80211_IFTYPE_AP:
|
||||
return brcmf_cfg80211_del_ap_iface(wiphy, wdev);
|
||||
case NL80211_IFTYPE_P2P_CLIENT:
|
||||
case NL80211_IFTYPE_P2P_GO:
|
||||
case NL80211_IFTYPE_P2P_DEVICE:
|
||||
@@ -6288,29 +6325,15 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp)
|
||||
if (!combo)
|
||||
goto err;
|
||||
|
||||
c0_limits = kcalloc(p2p ? 3 : 2, sizeof(*c0_limits), GFP_KERNEL);
|
||||
if (!c0_limits)
|
||||
goto err;
|
||||
|
||||
if (p2p) {
|
||||
p2p_limits = kcalloc(4, sizeof(*p2p_limits), GFP_KERNEL);
|
||||
if (!p2p_limits)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (mbss) {
|
||||
mbss_limits = kcalloc(1, sizeof(*mbss_limits), GFP_KERNEL);
|
||||
if (!mbss_limits)
|
||||
goto err;
|
||||
}
|
||||
|
||||
wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
||||
BIT(NL80211_IFTYPE_ADHOC) |
|
||||
BIT(NL80211_IFTYPE_AP);
|
||||
|
||||
c = 0;
|
||||
i = 0;
|
||||
combo[c].num_different_channels = 1;
|
||||
c0_limits = kcalloc(p2p ? 3 : 2, sizeof(*c0_limits), GFP_KERNEL);
|
||||
if (!c0_limits)
|
||||
goto err;
|
||||
c0_limits[i].max = 1;
|
||||
c0_limits[i++].types = BIT(NL80211_IFTYPE_STATION);
|
||||
if (p2p) {
|
||||
@@ -6328,6 +6351,7 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp)
|
||||
c0_limits[i].max = 1;
|
||||
c0_limits[i++].types = BIT(NL80211_IFTYPE_AP);
|
||||
}
|
||||
combo[c].num_different_channels = 1;
|
||||
combo[c].max_interfaces = i;
|
||||
combo[c].n_limits = i;
|
||||
combo[c].limits = c0_limits;
|
||||
@@ -6335,7 +6359,9 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp)
|
||||
if (p2p) {
|
||||
c++;
|
||||
i = 0;
|
||||
combo[c].num_different_channels = 1;
|
||||
p2p_limits = kcalloc(4, sizeof(*p2p_limits), GFP_KERNEL);
|
||||
if (!p2p_limits)
|
||||
goto err;
|
||||
p2p_limits[i].max = 1;
|
||||
p2p_limits[i++].types = BIT(NL80211_IFTYPE_STATION);
|
||||
p2p_limits[i].max = 1;
|
||||
@@ -6344,6 +6370,7 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp)
|
||||
p2p_limits[i++].types = BIT(NL80211_IFTYPE_P2P_CLIENT);
|
||||
p2p_limits[i].max = 1;
|
||||
p2p_limits[i++].types = BIT(NL80211_IFTYPE_P2P_DEVICE);
|
||||
combo[c].num_different_channels = 1;
|
||||
combo[c].max_interfaces = i;
|
||||
combo[c].n_limits = i;
|
||||
combo[c].limits = p2p_limits;
|
||||
@@ -6351,14 +6378,19 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp)
|
||||
|
||||
if (mbss) {
|
||||
c++;
|
||||
i = 0;
|
||||
mbss_limits = kcalloc(1, sizeof(*mbss_limits), GFP_KERNEL);
|
||||
if (!mbss_limits)
|
||||
goto err;
|
||||
mbss_limits[i].max = 4;
|
||||
mbss_limits[i++].types = BIT(NL80211_IFTYPE_AP);
|
||||
combo[c].beacon_int_infra_match = true;
|
||||
combo[c].num_different_channels = 1;
|
||||
mbss_limits[0].max = 4;
|
||||
mbss_limits[0].types = BIT(NL80211_IFTYPE_AP);
|
||||
combo[c].max_interfaces = 4;
|
||||
combo[c].n_limits = 1;
|
||||
combo[c].n_limits = i;
|
||||
combo[c].limits = mbss_limits;
|
||||
}
|
||||
|
||||
wiphy->n_iface_combinations = n_combos;
|
||||
wiphy->iface_combinations = combo;
|
||||
return 0;
|
||||
|
@@ -20,6 +20,7 @@
|
||||
/* for brcmu_d11inf */
|
||||
#include <brcmu_d11.h>
|
||||
|
||||
#include "core.h"
|
||||
#include "fwil_types.h"
|
||||
#include "p2p.h"
|
||||
|
||||
|
@@ -548,12 +548,16 @@ fail:
|
||||
return -EBADE;
|
||||
}
|
||||
|
||||
static void brcmf_net_detach(struct net_device *ndev)
|
||||
static void brcmf_net_detach(struct net_device *ndev, bool rtnl_locked)
|
||||
{
|
||||
if (ndev->reg_state == NETREG_REGISTERED)
|
||||
unregister_netdev(ndev);
|
||||
else
|
||||
if (ndev->reg_state == NETREG_REGISTERED) {
|
||||
if (rtnl_locked)
|
||||
unregister_netdevice(ndev);
|
||||
else
|
||||
unregister_netdev(ndev);
|
||||
} else {
|
||||
brcmf_cfg80211_free_netdev(ndev);
|
||||
}
|
||||
}
|
||||
|
||||
void brcmf_net_setcarrier(struct brcmf_if *ifp, bool on)
|
||||
@@ -634,7 +638,7 @@ fail:
|
||||
}
|
||||
|
||||
struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
|
||||
bool is_p2pdev, char *name, u8 *mac_addr)
|
||||
bool is_p2pdev, const char *name, u8 *mac_addr)
|
||||
{
|
||||
struct brcmf_if *ifp;
|
||||
struct net_device *ndev;
|
||||
@@ -651,7 +655,7 @@ struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
|
||||
brcmf_err("ERROR: netdev:%s already exists\n",
|
||||
ifp->ndev->name);
|
||||
netif_stop_queue(ifp->ndev);
|
||||
brcmf_net_detach(ifp->ndev);
|
||||
brcmf_net_detach(ifp->ndev, false);
|
||||
drvr->iflist[bsscfgidx] = NULL;
|
||||
} else {
|
||||
brcmf_dbg(INFO, "netdev:%s ignore IF event\n",
|
||||
@@ -699,7 +703,8 @@ struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
|
||||
return ifp;
|
||||
}
|
||||
|
||||
static void brcmf_del_if(struct brcmf_pub *drvr, s32 bsscfgidx)
|
||||
static void brcmf_del_if(struct brcmf_pub *drvr, s32 bsscfgidx,
|
||||
bool rtnl_locked)
|
||||
{
|
||||
struct brcmf_if *ifp;
|
||||
|
||||
@@ -729,7 +734,7 @@ static void brcmf_del_if(struct brcmf_pub *drvr, s32 bsscfgidx)
|
||||
cancel_work_sync(&ifp->multicast_work);
|
||||
cancel_work_sync(&ifp->ndoffload_work);
|
||||
}
|
||||
brcmf_net_detach(ifp->ndev);
|
||||
brcmf_net_detach(ifp->ndev, rtnl_locked);
|
||||
} else {
|
||||
/* Only p2p device interfaces which get dynamically created
|
||||
* end up here. In this case the p2p module should be informed
|
||||
@@ -743,14 +748,14 @@ static void brcmf_del_if(struct brcmf_pub *drvr, s32 bsscfgidx)
|
||||
}
|
||||
}
|
||||
|
||||
void brcmf_remove_interface(struct brcmf_if *ifp)
|
||||
void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked)
|
||||
{
|
||||
if (!ifp || WARN_ON(ifp->drvr->iflist[ifp->bsscfgidx] != ifp))
|
||||
return;
|
||||
brcmf_dbg(TRACE, "Enter, bsscfgidx=%d, ifidx=%d\n", ifp->bsscfgidx,
|
||||
ifp->ifidx);
|
||||
brcmf_fws_del_interface(ifp);
|
||||
brcmf_del_if(ifp->drvr, ifp->bsscfgidx);
|
||||
brcmf_del_if(ifp->drvr, ifp->bsscfgidx, rtnl_locked);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_INET
|
||||
@@ -1057,9 +1062,9 @@ fail:
|
||||
brcmf_fws_deinit(drvr);
|
||||
}
|
||||
if (ifp)
|
||||
brcmf_net_detach(ifp->ndev);
|
||||
brcmf_net_detach(ifp->ndev, false);
|
||||
if (p2p_ifp)
|
||||
brcmf_net_detach(p2p_ifp->ndev);
|
||||
brcmf_net_detach(p2p_ifp->ndev, false);
|
||||
drvr->iflist[0] = NULL;
|
||||
drvr->iflist[1] = NULL;
|
||||
if (drvr->settings->ignore_probe_fail)
|
||||
@@ -1128,7 +1133,7 @@ void brcmf_detach(struct device *dev)
|
||||
|
||||
/* make sure primary interface removed last */
|
||||
for (i = BRCMF_MAX_IFS-1; i > -1; i--)
|
||||
brcmf_remove_interface(drvr->iflist[i]);
|
||||
brcmf_remove_interface(drvr->iflist[i], false);
|
||||
|
||||
brcmf_cfg80211_detach(drvr->config);
|
||||
|
||||
|
@@ -215,8 +215,8 @@ char *brcmf_ifname(struct brcmf_if *ifp);
|
||||
struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx);
|
||||
int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked);
|
||||
struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
|
||||
bool is_p2pdev, char *name, u8 *mac_addr);
|
||||
void brcmf_remove_interface(struct brcmf_if *ifp);
|
||||
bool is_p2pdev, const char *name, u8 *mac_addr);
|
||||
void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked);
|
||||
void brcmf_txflowblock_if(struct brcmf_if *ifp,
|
||||
enum brcmf_netif_stop_reason reason, bool state);
|
||||
void brcmf_txfinalize(struct brcmf_if *ifp, struct sk_buff *txp, bool success);
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include "brcmu_wifi.h"
|
||||
#include "brcmu_utils.h"
|
||||
|
||||
#include "cfg80211.h"
|
||||
#include "core.h"
|
||||
#include "debug.h"
|
||||
#include "tracepoint.h"
|
||||
@@ -182,8 +183,13 @@ static void brcmf_fweh_handle_if_event(struct brcmf_pub *drvr,
|
||||
|
||||
err = brcmf_fweh_call_event_handler(ifp, emsg->event_code, emsg, data);
|
||||
|
||||
if (ifp && ifevent->action == BRCMF_E_IF_DEL)
|
||||
brcmf_remove_interface(ifp);
|
||||
if (ifp && ifevent->action == BRCMF_E_IF_DEL) {
|
||||
bool armed = brcmf_cfg80211_vif_event_armed(drvr->config);
|
||||
|
||||
/* Default handling in case no-one waits for this event */
|
||||
if (!armed)
|
||||
brcmf_remove_interface(ifp, false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -2261,6 +2261,8 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev)
|
||||
return 0;
|
||||
brcmf_p2p_cancel_remain_on_channel(vif->ifp);
|
||||
brcmf_p2p_deinit_discovery(p2p);
|
||||
break;
|
||||
|
||||
default:
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
@@ -2286,8 +2288,7 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev)
|
||||
else
|
||||
err = 0;
|
||||
}
|
||||
if (err)
|
||||
brcmf_remove_interface(vif->ifp);
|
||||
brcmf_remove_interface(vif->ifp, true);
|
||||
|
||||
brcmf_cfg80211_arm_vif_event(cfg, NULL);
|
||||
if (vif->wdev.iftype != NL80211_IFTYPE_P2P_DEVICE)
|
||||
@@ -2393,7 +2394,7 @@ void brcmf_p2p_detach(struct brcmf_p2p_info *p2p)
|
||||
if (vif != NULL) {
|
||||
brcmf_p2p_cancel_remain_on_channel(vif->ifp);
|
||||
brcmf_p2p_deinit_discovery(p2p);
|
||||
brcmf_remove_interface(vif->ifp);
|
||||
brcmf_remove_interface(vif->ifp, false);
|
||||
}
|
||||
/* just set it all to zero */
|
||||
memset(p2p, 0, sizeof(*p2p));
|
||||
|
@@ -3349,8 +3349,8 @@ static void brcms_b_coreinit(struct brcms_c_info *wlc)
|
||||
dma_rxfill(wlc_hw->di[RX_FIFO]);
|
||||
}
|
||||
|
||||
void
|
||||
static brcms_b_init(struct brcms_hardware *wlc_hw, u16 chanspec) {
|
||||
static void brcms_b_init(struct brcms_hardware *wlc_hw, u16 chanspec)
|
||||
{
|
||||
u32 macintmask;
|
||||
bool fastclk;
|
||||
struct brcms_c_info *wlc = wlc_hw->wlc;
|
||||
|
Reference in New Issue
Block a user