static s32 wl_cfg80211_change_station(struct wiphy *wiphy,
struct net_device *dev, u8 *mac, struct station_parameters *params);
#endif /* WL_SUPPORT_BACKPORTED_KPATCHES || KERNEL_VER >= KERNEL_VERSION(3, 2, 0)) */
-static s32
+static s32
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) || defined(WL_COMPAT_WIRELESS)
wl_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
#else
chspec = wl_cfg80211_get_shared_freq(wiphy);
wlif_type = WL_P2P_IF_GO;
- printk("%s : ap (%d), infra (%d), iftype: (%d)\n",
+ printf("%s : ap (%d), infra (%d), iftype: (%d)\n",
ndev->name, ap, infra, type);
wl_set_p2p_status(cfg, IF_CHANGING);
wl_clr_p2p_status(cfg, IF_CHANGED);
err = wldev_iovar_setbuf_bsscfg(dev, "join", ext_join_params, join_params_size,
cfg->ioctl_buf, WLC_IOCTL_MAXLEN, bssidx, &cfg->ioctl_buf_sync);
- printk("Connectting with " MACDBG " channel (%d) ssid \"%s\", len (%d)\n\n",
+ printf("Connectting with " MACDBG " channel (%d) ssid \"%s\", len (%d)\n\n",
MAC2STRDBG((u8*)(&ext_join_params->assoc.bssid)), cfg->channel,
ext_join_params->ssid.SSID, ext_join_params->ssid.SSID_len);
dev = ndev_to_wlc_ndev(dev, cfg);
#endif
_chan = ieee80211_frequency_to_channel(chan->center_freq);
- printk("netdev_ifidx(%d), chan_type(%d) target channel(%d) \n",
+ printf("netdev_ifidx(%d), chan_type(%d) target channel(%d) \n",
dev->ifindex, channel_type, _chan);
#ifdef CUSTOM_PLATFORM_NV_TEGRA
sizeof(scb_val_t), true);
if (err < 0)
WL_ERR(("WLC_SCB_DEAUTHENTICATE_FOR_REASON err %d\n", err));
- printk("Disconnect STA : %s scb_val.val %d\n",
+ printf("Disconnect STA : %s scb_val.val %d\n",
bcm_ether_ntoa((const struct ether_addr *)mac_addr, eabuf),
scb_val.val);
return -EINVAL;
}
channel = ieee80211_get_channel(wiphy, freq);
+ WL_SCAN(("BSSID %pM, channel %d, rssi %d, capa 0x04%x, mgmt_type %d, "
+ "frame_len %d, SSID \"%s\"\n", &bi->BSSID, notif_bss_info->channel,
+ notif_bss_info->rssi, mgmt->u.beacon.capab_info, mgmt_type,
+ notif_bss_info->frame_len, bi->SSID));
if (unlikely(!channel)) {
WL_ERR(("ieee80211_get_channel error, freq=%d, channel=%d\n",
freq, notif_bss_info->channel));
kfree(notif_bss_info);
return -EINVAL;
}
- WL_SCAN(("BSSID %pM, channel %d, rssi %d, capa 0x04%x, mgmt_type %d, "
- "frame_len %d, SSID \"%s\"\n", &bi->BSSID, notif_bss_info->channel,
- notif_bss_info->rssi, mgmt->u.beacon.capab_info, mgmt_type,
- notif_bss_info->frame_len, bi->SSID));
signal = notif_bss_info->rssi * 100;
if (!mgmt->u.probe_resp.timestamp) {
isfree = true;
if (event == WLC_E_ASSOC_IND && reason == DOT11_SC_SUCCESS) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0))
+ cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0, GFP_ATOMIC);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)) || \
defined(WL_COMPAT_WIRELESS)
cfg80211_rx_mgmt(ndev, freq, mgmt_frame, len, GFP_ATOMIC);
#endif /* LINUX_VERSION >= VERSION(3, 12, 0) */
} else if (event == WLC_E_DISASSOC_IND) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0))
+ cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0, GFP_ATOMIC);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)) || \
defined(WL_COMPAT_WIRELESS)
cfg80211_rx_mgmt(ndev, freq, mgmt_frame, len, GFP_ATOMIC);
#endif /* LINUX_VERSION >= VERSION(3, 12, 0) */
} else if ((event == WLC_E_DEAUTH_IND) || (event == WLC_E_DEAUTH)) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0))
+ cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0, GFP_ATOMIC);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)) || \
defined(WL_COMPAT_WIRELESS)
}
sinfo.assoc_req_ies = data;
sinfo.assoc_req_ies_len = len;
- printk("%s: connected device "MACDBG"\n", __FUNCTION__, MAC2STRDBG(e->addr.octet));
+ printf("%s: connected device "MACDBG"\n", __FUNCTION__, MAC2STRDBG(e->addr.octet));
cfg80211_new_sta(ndev, e->addr.octet, &sinfo, GFP_ATOMIC);
} else if (event == WLC_E_DISASSOC_IND) {
- printk("%s: disassociated device "MACDBG"\n", __FUNCTION__, MAC2STRDBG(e->addr.octet));
+ printf("%s: disassociated device "MACDBG"\n", __FUNCTION__, MAC2STRDBG(e->addr.octet));
cfg80211_del_sta(ndev, e->addr.octet, GFP_ATOMIC);
} else if ((event == WLC_E_DEAUTH_IND) || (event == WLC_E_DEAUTH)) {
- printk("%s: deauthenticated device "MACDBG"\n", __FUNCTION__, MAC2STRDBG(e->addr.octet));
+ printf("%s: deauthenticated device "MACDBG"\n", __FUNCTION__, MAC2STRDBG(e->addr.octet));
cfg80211_del_sta(ndev, e->addr.octet, GFP_ATOMIC);
}
#endif /* LINUX_VERSION < VERSION(3,2,0) && !WL_CFG80211_STA_EVENT && !WL_COMPAT_WIRELESS */
wl_link_up(cfg);
act = true;
if (!wl_get_drv_status(cfg, DISCONNECTING, ndev)) {
- printk("wl_bss_connect_done succeeded with " MACDBG "\n",
+ printf("wl_bss_connect_done succeeded with " MACDBG "\n",
MAC2STRDBG((u8*)(&e->addr)));
wl_bss_connect_done(cfg, ndev, e, data, true);
dhd_conf_set_phyoclscdenable((dhd_pub_t *)cfg->pub);
/* WLAN_REASON_UNSPECIFIED is used for hang up event in Android */
reason = (reason == WLAN_REASON_UNSPECIFIED)? 0 : reason;
- printk("link down if %s may call cfg80211_disconnected. "
+ printf("link down if %s may call cfg80211_disconnected. "
"event : %d, reason=%d from " MACDBG "\n",
ndev->name, event, ntoh32(e->reason),
MAC2STRDBG((u8*)(&e->addr)));
}
}
else if (wl_get_drv_status(cfg, CONNECTING, ndev)) {
- printk("link down, during connecting\n");
+ printf("link down, during connecting\n");
#ifdef ESCAN_RESULT_PATCH
if ((memcmp(connect_req_bssid, broad_bssid, ETHER_ADDR_LEN) == 0) ||
(memcmp(&e->addr, broad_bssid, ETHER_ADDR_LEN) == 0) ||
complete(&cfg->iface_disable);
} else if (wl_is_nonetwork(cfg, e)) {
- printk("connect failed event=%d e->status %d e->reason %d \n",
+ printf("connect failed event=%d e->status %d e->reason %d \n",
event, (int)ntoh32(e->status), (int)ntoh32(e->reason));
/* Clean up any pending scan request */
if (cfg->scan_request)
memcpy(cfg->fbt_key, data, FBT_KEYLEN);
}
#endif /* WLFBT */
- printk("wl_bss_roaming_done succeeded to " MACDBG "\n",
+ printf("wl_bss_roaming_done succeeded to " MACDBG "\n",
MAC2STRDBG((u8*)(&e->addr)));
dhd_conf_set_wme((dhd_pub_t *)cfg->pub);
WL_DBG((" device name is ndev %s \n", ndev->name));
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0))
+ retval = cfg80211_rx_mgmt(cfgdev, freq, 0, mgmt_frame, mgmt_frame_len, 0);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
retval = cfg80211_rx_mgmt(cfgdev, freq, 0, mgmt_frame, mgmt_frame_len, 0, GFP_ATOMIC);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)) || \
defined(WL_COMPAT_WIRELESS)
static s32
wl_cfg80211_netdev_notifier_call(struct notifier_block * nb,
unsigned long state,
- void *ndev)
+ void *ptr)
{
- struct net_device *dev = ndev;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0))
+ struct net_device *dev = ptr;
+#else
+ // terence 20150701: fix for p2p connection issue
+ struct net_device *dev = netdev_notifier_info_to_dev(ptr);
+#endif
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct bcm_cfg80211 *cfg = g_bcm_cfg;
case NETDEV_UNREGISTER:
/* after calling list_del_rcu(&wdev->list) */
- wl_dealloc_netinfo(cfg, ndev);
+ wl_dealloc_netinfo(cfg, dev);
break;
case NETDEV_GOING_DOWN:
/* At NETDEV_DOWN state, wdev_cleanup_work work will be called.
}
}
}
- printk("%s concurrency is enabled\n", cfg->vsdb_mode ? "Multi Channel" : "Same Channel");
+ printf("%s concurrency is enabled\n", cfg->vsdb_mode ? "Multi Channel" : "Same Channel");
return;
}
/* Update MAC addr for p2p0 interface here. */
memcpy(cfg->p2p_net->dev_addr, ndev->dev_addr, ETH_ALEN);
cfg->p2p_net->dev_addr[0] |= 0x02;
- printk("%s: p2p_dev_addr="MACDBG "\n",
+ printf("%s: p2p_dev_addr="MACDBG "\n",
cfg->p2p_net->name,
MAC2STRDBG(cfg->p2p_net->dev_addr));
} else {
cfg = (struct bcm_cfg80211 *)tsk->parent;
- printk("tsk Enter, tsk = 0x%p\n", tsk);
+ printf("tsk Enter, tsk = 0x%p\n", tsk);
while (down_interruptible (&tsk->sema) == 0) {
SMP_RD_BARRIER_DEPENDS();
}
DHD_OS_WAKE_UNLOCK(cfg->pub);
}
- printk("%s: was terminated\n", __FUNCTION__);
+ printf("%s: was terminated\n", __FUNCTION__);
complete_and_exit(&tsk->completed, 0);
return 0;
}
dhd_tdls_update_peer_info(ndev, TRUE, (uint8 *)&e->addr.octet[0]);
#endif /* PCIE_FULL_DONGLE */
if (cfg->tdls_mgmt_frame) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0))
+ cfg80211_rx_mgmt(cfgdev, cfg->tdls_mgmt_freq, 0,
+ cfg->tdls_mgmt_frame, cfg->tdls_mgmt_frame_len, 0);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
cfg80211_rx_mgmt(cfgdev, cfg->tdls_mgmt_freq, 0,
cfg->tdls_mgmt_frame, cfg->tdls_mgmt_frame_len,
0, GFP_ATOMIC);
void wl_cfg80211_enable_trace(u32 level)
{
wl_dbg_level = level;
- printk("%s: wl_dbg_level = 0x%x\n", __FUNCTION__, wl_dbg_level);
+ printf("%s: wl_dbg_level = 0x%x\n", __FUNCTION__, wl_dbg_level);
}
#if defined(WL_SUPPORT_BACKPORTED_KPATCHES) || (LINUX_VERSION_CODE >= KERNEL_VERSION(3, \