summaryrefslogtreecommitdiff
path: root/wl_cfgvif.c
diff options
context:
space:
mode:
Diffstat (limited to 'wl_cfgvif.c')
-rw-r--r--wl_cfgvif.c43
1 files changed, 34 insertions, 9 deletions
diff --git a/wl_cfgvif.c b/wl_cfgvif.c
index 2de92ef..f80e4fa 100644
--- a/wl_cfgvif.c
+++ b/wl_cfgvif.c
@@ -894,6 +894,7 @@ wl_release_vif_macaddr(struct bcm_cfg80211 *cfg, const u8 *mac_addr, u16 wl_ifty
#ifdef WL_NAN
if (!((cfg->nancfg->mac_rand) && (wl_iftype == WL_IF_TYPE_NAN)))
#endif /* WL_NAN */
+#line 902
{
/* Fetch last two bytes of mac address */
org_toggle_bytes = ntoh16(*((u16 *)&ndev->dev_addr[4]));
@@ -901,14 +902,14 @@ wl_release_vif_macaddr(struct bcm_cfg80211 *cfg, const u8 *mac_addr, u16 wl_ifty
toggled_bit = (org_toggle_bytes ^ cur_toggle_bytes);
WL_DBG(("org_toggle_bytes:%04X cur_toggle_bytes:%04X\n",
- org_toggle_bytes, cur_toggle_bytes));
+ org_toggle_bytes, cur_toggle_bytes));
if (toggled_bit & cfg->vif_macaddr_mask) {
/* This toggled_bit is marked in the used mac addr
* mask. Clear it.
*/
cfg->vif_macaddr_mask &= ~toggled_bit;
- WL_INFORM(("MAC address - " MACDBG " released. toggled_bit:%04X"
- " vif_mask:%04X\n",
+ WL_INFORM(("MAC address - "
+ MACDBG " released. toggled_bit:%04X vif_mask:%04X\n",
MAC2STRDBG(mac_addr), toggled_bit, cfg->vif_macaddr_mask));
} else {
WL_ERR(("MAC address - " MACDBG " not found in the used list."
@@ -917,8 +918,8 @@ wl_release_vif_macaddr(struct bcm_cfg80211 *cfg, const u8 *mac_addr, u16 wl_ifty
return -EINVAL;
}
}
-
WL_INFORM_MEM(("vif deleted. vif_count:%d\n", cfg->vif_count));
+
return BCME_OK;
}
@@ -5569,6 +5570,25 @@ const wl_event_msg_t *e, void *data)
}
s32
+wl_cfgvif_csa_start_ind(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev,
+const wl_event_msg_t *e, void *data)
+{
+ struct net_device *ndev = NULL;
+
+ if (!cfgdev) {
+ WL_ERR(("invalid arg\n"));
+ return BCME_ERROR;
+ }
+
+ ndev = cfgdev_to_wlc_ndev(cfgdev, cfg);
+ WL_INFORM_MEM(("[%s] csa started\n", ndev->name));
+
+ wl_set_drv_status(cfg, CSA_ACTIVE, ndev);
+
+ return BCME_OK;
+}
+
+s32
wl_csa_complete_ind(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev,
const wl_event_msg_t *e, void *data)
{
@@ -5576,15 +5596,21 @@ const wl_event_msg_t *e, void *data)
u32 chanspec = 0;
struct net_device *ndev = NULL;
struct ether_addr bssid;
+ u32 status = dtoh32(e->status);
WL_DBG(("Enter\n"));
- if (unlikely(e->status)) {
- WL_ERR(("status:0x%x \n", e->status));
- return -1;
- }
if (likely(cfgdev)) {
ndev = cfgdev_to_wlc_ndev(cfgdev, cfg);
+ wl_clr_drv_status(cfg, CSA_ACTIVE, ndev);
+
+ WL_INFORM_MEM(("[%s] CSA ind. ch:0x%x status:%d\n",
+ ndev->name, chanspec, status));
+ if (status != WLC_E_STATUS_SUCCESS) {
+ WL_ERR(("csa complete error. status:0x%x\n", e->status));
+ return BCME_ERROR;
+ }
+
/* Get association state if not AP and then query chanspec */
if (!((wl_get_mode_by_netdev(cfg, ndev)) == WL_MODE_AP)) {
error = wldev_ioctl_get(ndev, WLC_GET_BSSID, &bssid, ETHER_ADDR_LEN);
@@ -5601,7 +5627,6 @@ const wl_event_msg_t *e, void *data)
return -1;
}
- WL_INFORM_MEM(("[%s] CSA ind. ch:0x%x\n", ndev->name, chanspec));
if (wl_get_mode_by_netdev(cfg, ndev) == WL_MODE_AP) {
/* For AP/GO role */
wl_ap_channel_ind(cfg, ndev, chanspec);