DHD_INFO(("%s: Android private cmd \"%s\" on %s\n", __FUNCTION__, command, ifr->ifr_name));
- if (strnicmp(command, CMD_START, strlen(CMD_START)) == 0) {
+ if (strncasecmp(command, CMD_START, strlen(CMD_START)) == 0) {
DHD_INFO(("%s, Received regular START command\n", __FUNCTION__));
bytes_written = wl_android_wifi_on(net);
}
- else if (strnicmp(command, CMD_SETFWPATH, strlen(CMD_SETFWPATH)) == 0) {
+ else if (strncasecmp(command, CMD_SETFWPATH, strlen(CMD_SETFWPATH)) == 0) {
bytes_written = wl_android_set_fwpath(net, command, priv_cmd.total_len);
}
goto exit;
}
- if (strnicmp(command, CMD_STOP, strlen(CMD_STOP)) == 0) {
+ if (strncasecmp(command, CMD_STOP, strlen(CMD_STOP)) == 0) {
bytes_written = wl_android_wifi_off(net);
}
- else if (strnicmp(command, CMD_SCAN_ACTIVE, strlen(CMD_SCAN_ACTIVE)) == 0) {
+ else if (strncasecmp(command, CMD_SCAN_ACTIVE, strlen(CMD_SCAN_ACTIVE)) == 0) {
/* TBD: SCAN-ACTIVE */
}
- else if (strnicmp(command, CMD_SCAN_PASSIVE, strlen(CMD_SCAN_PASSIVE)) == 0) {
+ else if (strncasecmp(command, CMD_SCAN_PASSIVE, strlen(CMD_SCAN_PASSIVE)) == 0) {
/* TBD: SCAN-PASSIVE */
}
- else if (strnicmp(command, CMD_RSSI, strlen(CMD_RSSI)) == 0) {
+ else if (strncasecmp(command, CMD_RSSI, strlen(CMD_RSSI)) == 0) {
bytes_written = wl_android_get_rssi(net, command, priv_cmd.total_len);
}
- else if (strnicmp(command, CMD_LINKSPEED, strlen(CMD_LINKSPEED)) == 0) {
+ else if (strncasecmp(command, CMD_LINKSPEED, strlen(CMD_LINKSPEED)) == 0) {
bytes_written = wl_android_get_link_speed(net, command, priv_cmd.total_len);
}
#ifdef PKT_FILTER_SUPPORT
- else if (strnicmp(command, CMD_RXFILTER_START, strlen(CMD_RXFILTER_START)) == 0) {
+ else if (strncasecmp(command, CMD_RXFILTER_START, strlen(CMD_RXFILTER_START)) == 0) {
bytes_written = net_os_enable_packet_filter(net, 1);
}
- else if (strnicmp(command, CMD_RXFILTER_STOP, strlen(CMD_RXFILTER_STOP)) == 0) {
+ else if (strncasecmp(command, CMD_RXFILTER_STOP, strlen(CMD_RXFILTER_STOP)) == 0) {
bytes_written = net_os_enable_packet_filter(net, 0);
}
- else if (strnicmp(command, CMD_RXFILTER_ADD, strlen(CMD_RXFILTER_ADD)) == 0) {
+ else if (strncasecmp(command, CMD_RXFILTER_ADD, strlen(CMD_RXFILTER_ADD)) == 0) {
int filter_num = *(command + strlen(CMD_RXFILTER_ADD) + 1) - '0';
bytes_written = net_os_rxfilter_add_remove(net, TRUE, filter_num);
}
- else if (strnicmp(command, CMD_RXFILTER_REMOVE, strlen(CMD_RXFILTER_REMOVE)) == 0) {
+ else if (strncasecmp(command, CMD_RXFILTER_REMOVE, strlen(CMD_RXFILTER_REMOVE)) == 0) {
int filter_num = *(command + strlen(CMD_RXFILTER_REMOVE) + 1) - '0';
bytes_written = net_os_rxfilter_add_remove(net, FALSE, filter_num);
}
#endif /* PKT_FILTER_SUPPORT */
- else if (strnicmp(command, CMD_BTCOEXSCAN_START, strlen(CMD_BTCOEXSCAN_START)) == 0) {
+ else if (strncasecmp(command, CMD_BTCOEXSCAN_START, strlen(CMD_BTCOEXSCAN_START)) == 0) {
/* TBD: BTCOEXSCAN-START */
}
- else if (strnicmp(command, CMD_BTCOEXSCAN_STOP, strlen(CMD_BTCOEXSCAN_STOP)) == 0) {
+ else if (strncasecmp(command, CMD_BTCOEXSCAN_STOP, strlen(CMD_BTCOEXSCAN_STOP)) == 0) {
/* TBD: BTCOEXSCAN-STOP */
}
- else if (strnicmp(command, CMD_BTCOEXMODE, strlen(CMD_BTCOEXMODE)) == 0) {
+ else if (strncasecmp(command, CMD_BTCOEXMODE, strlen(CMD_BTCOEXMODE)) == 0) {
#ifdef WL_CFG80211
void *dhdp = wl_cfg80211_get_dhdp();
bytes_written = wl_cfg80211_set_btcoex_dhcp(net, dhdp, command);
#endif /* PKT_FILTER_SUPPORT */
#endif /* WL_CFG80211 */
}
- else if (strnicmp(command, CMD_SETSUSPENDOPT, strlen(CMD_SETSUSPENDOPT)) == 0) {
+ else if (strncasecmp(command, CMD_SETSUSPENDOPT, strlen(CMD_SETSUSPENDOPT)) == 0) {
bytes_written = wl_android_set_suspendopt(net, command, priv_cmd.total_len);
}
- else if (strnicmp(command, CMD_SETSUSPENDMODE, strlen(CMD_SETSUSPENDMODE)) == 0) {
+ else if (strncasecmp(command, CMD_SETSUSPENDMODE, strlen(CMD_SETSUSPENDMODE)) == 0) {
bytes_written = wl_android_set_suspendmode(net, command, priv_cmd.total_len);
}
- else if (strnicmp(command, CMD_SETBAND, strlen(CMD_SETBAND)) == 0) {
+ else if (strncasecmp(command, CMD_SETBAND, strlen(CMD_SETBAND)) == 0) {
uint band = *(command + strlen(CMD_SETBAND) + 1) - '0';
bytes_written = wldev_set_band(net, band);
}
- else if (strnicmp(command, CMD_GETBAND, strlen(CMD_GETBAND)) == 0) {
+ else if (strncasecmp(command, CMD_GETBAND, strlen(CMD_GETBAND)) == 0) {
bytes_written = wl_android_get_band(net, command, priv_cmd.total_len);
}
#ifdef WL_CFG80211
/* CUSTOMER_SET_COUNTRY feature is define for only GGSM model */
- else if (strnicmp(command, CMD_COUNTRY, strlen(CMD_COUNTRY)) == 0) {
+ else if (strncasecmp(command, CMD_COUNTRY, strlen(CMD_COUNTRY)) == 0) {
char *country_code = command + strlen(CMD_COUNTRY) + 1;
bytes_written = wldev_set_country(net, country_code, true, true);
}
#endif /* WL_CFG80211 */
- else if (strnicmp(command, CMD_80211_MODE, strlen(CMD_80211_MODE)) == 0) {
+ else if (strncasecmp(command, CMD_80211_MODE, strlen(CMD_80211_MODE)) == 0) {
bytes_written = wl_android_get_80211_mode(net, command, priv_cmd.total_len);
- } else if (strnicmp(command, CMD_CHANSPEC, strlen(CMD_CHANSPEC)) == 0) {
+ } else if (strncasecmp(command, CMD_CHANSPEC, strlen(CMD_CHANSPEC)) == 0) {
bytes_written = wl_android_get_chanspec(net, command, priv_cmd.total_len);
- } else if (strnicmp(command, CMD_DATARATE, strlen(CMD_DATARATE)) == 0) {
+ } else if (strncasecmp(command, CMD_DATARATE, strlen(CMD_DATARATE)) == 0) {
bytes_written = wl_android_get_datarate(net, command, priv_cmd.total_len);
- } else if (strnicmp(command, CMD_ASSOC_CLIENTS, strlen(CMD_ASSOC_CLIENTS)) == 0) {
+ } else if (strncasecmp(command, CMD_ASSOC_CLIENTS, strlen(CMD_ASSOC_CLIENTS)) == 0) {
bytes_written = wl_android_get_assoclist(net, command, priv_cmd.total_len);
}
#ifdef PNO_SUPPORT
- else if (strnicmp(command, CMD_PNOSSIDCLR_SET, strlen(CMD_PNOSSIDCLR_SET)) == 0) {
+ else if (strncasecmp(command, CMD_PNOSSIDCLR_SET, strlen(CMD_PNOSSIDCLR_SET)) == 0) {
bytes_written = dhd_dev_pno_stop_for_ssid(net);
}
#ifndef WL_SCHED_SCAN
- else if (strnicmp(command, CMD_PNOSETUP_SET, strlen(CMD_PNOSETUP_SET)) == 0) {
+ else if (strncasecmp(command, CMD_PNOSETUP_SET, strlen(CMD_PNOSETUP_SET)) == 0) {
bytes_written = wl_android_set_pno_setup(net, command, priv_cmd.total_len);
}
#endif /* !WL_SCHED_SCAN */
- else if (strnicmp(command, CMD_PNOENABLE_SET, strlen(CMD_PNOENABLE_SET)) == 0) {
+ else if (strncasecmp(command, CMD_PNOENABLE_SET, strlen(CMD_PNOENABLE_SET)) == 0) {
int enable = *(command + strlen(CMD_PNOENABLE_SET) + 1) - '0';
bytes_written = (enable)? 0 : dhd_dev_pno_stop_for_ssid(net);
}
- else if (strnicmp(command, CMD_WLS_BATCHING, strlen(CMD_WLS_BATCHING)) == 0) {
+ else if (strncasecmp(command, CMD_WLS_BATCHING, strlen(CMD_WLS_BATCHING)) == 0) {
bytes_written = wls_parse_batching_cmd(net, command, priv_cmd.total_len);
}
#endif /* PNO_SUPPORT */
- else if (strnicmp(command, CMD_P2P_DEV_ADDR, strlen(CMD_P2P_DEV_ADDR)) == 0) {
+ else if (strncasecmp(command, CMD_P2P_DEV_ADDR, strlen(CMD_P2P_DEV_ADDR)) == 0) {
bytes_written = wl_android_get_p2p_dev_addr(net, command, priv_cmd.total_len);
}
- else if (strnicmp(command, CMD_P2P_SET_NOA, strlen(CMD_P2P_SET_NOA)) == 0) {
+ else if (strncasecmp(command, CMD_P2P_SET_NOA, strlen(CMD_P2P_SET_NOA)) == 0) {
int skip = strlen(CMD_P2P_SET_NOA) + 1;
bytes_written = wl_cfg80211_set_p2p_noa(net, command + skip,
priv_cmd.total_len - skip);
}
#ifdef WL_NAN
- else if (strnicmp(command, CMD_NAN, strlen(CMD_NAN)) == 0) {
+ else if (strncasecmp(command, CMD_NAN, strlen(CMD_NAN)) == 0) {
bytes_written = wl_cfg80211_nan_cmd_handler(net, command,
priv_cmd.total_len);
}
#endif /* WL_NAN */
#if !defined WL_ENABLE_P2P_IF
- else if (strnicmp(command, CMD_P2P_GET_NOA, strlen(CMD_P2P_GET_NOA)) == 0) {
+ else if (strncasecmp(command, CMD_P2P_GET_NOA, strlen(CMD_P2P_GET_NOA)) == 0) {
bytes_written = wl_cfg80211_get_p2p_noa(net, command, priv_cmd.total_len);
}
#endif /* WL_ENABLE_P2P_IF */
- else if (strnicmp(command, CMD_P2P_SET_PS, strlen(CMD_P2P_SET_PS)) == 0) {
+ else if (strncasecmp(command, CMD_P2P_SET_PS, strlen(CMD_P2P_SET_PS)) == 0) {
int skip = strlen(CMD_P2P_SET_PS) + 1;
bytes_written = wl_cfg80211_set_p2p_ps(net, command + skip,
priv_cmd.total_len - skip);
}
#ifdef WL_CFG80211
- else if (strnicmp(command, CMD_SET_AP_WPS_P2P_IE,
+ else if (strncasecmp(command, CMD_SET_AP_WPS_P2P_IE,
strlen(CMD_SET_AP_WPS_P2P_IE)) == 0) {
int skip = strlen(CMD_SET_AP_WPS_P2P_IE) + 3;
bytes_written = wl_cfg80211_set_wps_p2p_ie(net, command + skip,
priv_cmd.total_len - skip, *(command + skip - 2) - '0');
}
#endif /* WL_CFG80211 */
- else if (strnicmp(command, CMD_OKC_SET_PMK, strlen(CMD_OKC_SET_PMK)) == 0)
+ else if (strncasecmp(command, CMD_OKC_SET_PMK, strlen(CMD_OKC_SET_PMK)) == 0)
bytes_written = wl_android_set_pmk(net, command, priv_cmd.total_len);
- else if (strnicmp(command, CMD_OKC_ENABLE, strlen(CMD_OKC_ENABLE)) == 0)
+ else if (strncasecmp(command, CMD_OKC_ENABLE, strlen(CMD_OKC_ENABLE)) == 0)
bytes_written = wl_android_okc_enable(net, command, priv_cmd.total_len);
#if defined(WL_SUPPORT_AUTO_CHANNEL)
- else if (strnicmp(command, CMD_GET_BEST_CHANNELS,
+ else if (strncasecmp(command, CMD_GET_BEST_CHANNELS,
strlen(CMD_GET_BEST_CHANNELS)) == 0) {
bytes_written = wl_cfg80211_get_best_channels(net, command,
priv_cmd.total_len);
}
#endif /* WL_SUPPORT_AUTO_CHANNEL */
- else if (strnicmp(command, CMD_HAPD_MAC_FILTER, strlen(CMD_HAPD_MAC_FILTER)) == 0) {
+ else if (strncasecmp(command, CMD_HAPD_MAC_FILTER, strlen(CMD_HAPD_MAC_FILTER)) == 0) {
int skip = strlen(CMD_HAPD_MAC_FILTER) + 1;
wl_android_set_mac_address_filter(net, (const char*)command+skip);
}
- else if (strnicmp(command, CMD_SETROAMMODE, strlen(CMD_SETROAMMODE)) == 0)
+ else if (strncasecmp(command, CMD_SETROAMMODE, strlen(CMD_SETROAMMODE)) == 0)
bytes_written = wl_android_set_roam_mode(net, command, priv_cmd.total_len);
#if defined(BCMFW_ROAM_ENABLE)
- else if (strnicmp(command, CMD_SET_ROAMPREF, strlen(CMD_SET_ROAMPREF)) == 0) {
+ else if (strncasecmp(command, CMD_SET_ROAMPREF, strlen(CMD_SET_ROAMPREF)) == 0) {
bytes_written = wl_android_set_roampref(net, command, priv_cmd.total_len);
}
#endif /* BCMFW_ROAM_ENABLE */
- else if (strnicmp(command, CMD_MIRACAST, strlen(CMD_MIRACAST)) == 0)
+ else if (strncasecmp(command, CMD_MIRACAST, strlen(CMD_MIRACAST)) == 0)
bytes_written = wl_android_set_miracast(net, command, priv_cmd.total_len);
- else if (strnicmp(command, CMD_SETIBSSBEACONOUIDATA, strlen(CMD_SETIBSSBEACONOUIDATA)) == 0)
+ else if (strncasecmp(command, CMD_SETIBSSBEACONOUIDATA, strlen(CMD_SETIBSSBEACONOUIDATA)) == 0)
bytes_written = wl_android_set_ibss_beacon_ouidata(net,
command, priv_cmd.total_len);
- else if (strnicmp(command, CMD_KEEP_ALIVE, strlen(CMD_KEEP_ALIVE)) == 0) {
+ else if (strncasecmp(command, CMD_KEEP_ALIVE, strlen(CMD_KEEP_ALIVE)) == 0) {
int skip = strlen(CMD_KEEP_ALIVE) + 1;
bytes_written = wl_keep_alive_set(net, command + skip, priv_cmd.total_len - skip);
}
- else if (strnicmp(command, CMD_ROAM_OFFLOAD, strlen(CMD_ROAM_OFFLOAD)) == 0) {
+ else if (strncasecmp(command, CMD_ROAM_OFFLOAD, strlen(CMD_ROAM_OFFLOAD)) == 0) {
int enable = *(command + strlen(CMD_ROAM_OFFLOAD) + 1) - '0';
bytes_written = wl_cfg80211_enable_roam_offload(net, enable);
}
#ifdef CONNECTION_STATISTICS
- else if (strnicmp(command, CMD_GET_CONNECTION_STATS,
+ else if (strncasecmp(command, CMD_GET_CONNECTION_STATS,
strlen(CMD_GET_CONNECTION_STATS)) == 0) {
bytes_written = wl_android_get_connection_stats(net, command,
priv_cmd.total_len);
static s32 wl_cfg80211_leave_ibss(struct wiphy *wiphy,
struct net_device *dev);
static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
- struct net_device *dev, u8 *mac,
+ struct net_device *dev, const u8 *mac,
struct station_info *sinfo);
static s32 wl_cfg80211_set_power_mgmt(struct wiphy *wiphy,
struct net_device *dev, bool enabled,
static s32 wl_cfg80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,
bcm_struct_cfgdev *cfgdev, u64 cookie);
static s32 wl_cfg80211_del_station(struct wiphy *wiphy,
- struct net_device *ndev, u8* mac_addr);
+ struct net_device *ndev,
+ struct station_del_parameters *params);
static s32 wl_cfg80211_change_station(struct wiphy *wiphy,
- struct net_device *dev, u8 *mac, struct station_parameters *params);
+ struct net_device *dev, const u8 *mac, struct station_parameters *params);
#endif /* WL_SUPPORT_BACKPORTED_KPATCHES || KERNEL_VER >= KERNEL_VERSION(3, 2, 0)) */
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39))
static s32 wl_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
struct net_device *ndev, bool aborted, bool fw_abort);
#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 2, 0))
static s32 wl_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
- u8 *peer, u8 action_code, u8 dialog_token, u16 status_code, const u8 *data,
+ const u8 *peer, u8 action_code, u8 dialog_token, u16 status_code,
+ u32 peer_capability, bool initiator, const u8 *data,
size_t len);
static s32 wl_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
- u8 *peer, enum nl80211_tdls_operation oper);
+ const u8 *peer, enum nl80211_tdls_operation oper);
#endif
#ifdef WL_SCHED_SCAN
static int wl_cfg80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev);
#else
char *name,
#endif /* WL_CFG80211_P2P_DEV_IF */
+ unsigned char name_assign_type,
enum nl80211_iftype type, u32 *flags,
struct vif_params *params)
{
swap_key_to_BE(&key);
memset(¶ms, 0, sizeof(params));
params.key_len = (u8) min_t(u8, DOT11_MAX_KEY_SIZE, key.len);
- memcpy(params.key, key.data, params.key_len);
+ memcpy((void *)params.key, key.data, params.key_len);
err = wldev_iovar_getint_bsscfg(dev, "wsec", &wsec, bssidx);
if (unlikely(err)) {
static s32
wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
- u8 *mac, struct station_info *sinfo)
+ const u8 *mac, struct station_info *sinfo)
{
struct bcm_cfg80211 *cfg = wiphy_priv(wiphy);
scb_val_t scb_val;
WL_ERR(("GET STA INFO failed, %d\n", err));
return err;
}
- sinfo->filled = STATION_INFO_INACTIVE_TIME;
+ sinfo->filled = BIT(NL80211_STA_INFO_INACTIVE_TIME);
sta = (sta_info_t *)cfg->ioctl_buf;
sta->len = dtoh16(sta->len);
sta->cap = dtoh16(sta->cap);
sinfo->inactive_time = sta->idle * 1000;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
if (sta->flags & WL_STA_ASSOC) {
- sinfo->filled |= STATION_INFO_CONNECTED_TIME;
+ sinfo->filled |= BIT(NL80211_STA_INFO_CONNECTED_TIME);
sinfo->connected_time = sta->in;
}
WL_INFO(("STA %s : idle time : %d sec, connected time :%d ms\n",
int rxpktglom;
#endif
rate = dtoh32(rate);
- sinfo->filled |= STATION_INFO_TX_BITRATE;
+ sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
sinfo->txrate.legacy = rate * 5;
WL_DBG(("Rate %d Mbps\n", (rate / 2)));
#if defined(USE_DYNAMIC_MAXPKT_RXGLOM)
goto get_station_err;
}
rssi = wl_rssi_offset(dtoh32(scb_val.val));
- sinfo->filled |= STATION_INFO_SIGNAL;
+ sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
sinfo->signal = rssi;
WL_DBG(("RSSI %d dBm\n", rssi));
err = wldev_ioctl(dev, WLC_GET_PKTCNTS, &pktcnt,
sizeof(pktcnt), false);
if (!err) {
- sinfo->filled |= (STATION_INFO_RX_PACKETS |
- STATION_INFO_RX_DROP_MISC |
- STATION_INFO_TX_PACKETS |
- STATION_INFO_TX_FAILED);
+ sinfo->filled |= (BIT(NL80211_STA_INFO_RX_PACKETS) |
+ BIT(NL80211_STA_INFO_RX_DROP_MISC) |
+ BIT(NL80211_STA_INFO_TX_PACKETS) |
+ BIT(NL80211_STA_INFO_TX_FAILED));
sinfo->rx_packets = pktcnt.rx_good_pkt;
sinfo->rx_dropped_misc = pktcnt.rx_bad_pkt;
sinfo->tx_packets = pktcnt.tx_good_pkt;
wl_cfg80211_del_station(
struct wiphy *wiphy,
struct net_device *ndev,
- u8* mac_addr)
+ struct station_del_parameters *params)
{
struct net_device *dev;
struct bcm_cfg80211 *cfg = wiphy_priv(wiphy);
int num_associated = 0;
WL_DBG(("Entry\n"));
- if (mac_addr == NULL) {
+ if (params->mac == NULL) {
WL_DBG(("mac_addr is NULL ignore it\n"));
return 0;
}
else
num_associated = assoc_maclist->count;
- memcpy(scb_val.ea.octet, mac_addr, ETHER_ADDR_LEN);
+ memcpy(scb_val.ea.octet, params->mac, ETHER_ADDR_LEN);
scb_val.val = DOT11_RC_DEAUTH_LEAVING;
err = wldev_ioctl(dev, WLC_SCB_DEAUTHENTICATE_FOR_REASON, &scb_val,
sizeof(scb_val_t), true);
if (err < 0)
WL_ERR(("WLC_SCB_DEAUTHENTICATE_FOR_REASON err %d\n", err));
WL_ERR(("Disconnect STA : %s scb_val.val %d\n",
- bcm_ether_ntoa((const struct ether_addr *)mac_addr, eabuf),
+ bcm_ether_ntoa((const struct ether_addr *)(params->mac), eabuf),
scb_val.val));
- if (num_associated > 0 && ETHER_ISBCAST(mac_addr))
+ if (num_associated > 0 && ETHER_ISBCAST(params->mac))
wl_delay(400);
return 0;
wl_cfg80211_change_station(
struct wiphy *wiphy,
struct net_device *dev,
- u8 *mac,
+ const u8 *mac,
struct station_parameters *params)
{
int err;
return -ENOTSUPP;
if (!(params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED))) {
- err = wldev_ioctl(primary_ndev, WLC_SCB_DEAUTHORIZE, mac, ETH_ALEN, true);
+ err = wldev_ioctl(primary_ndev, WLC_SCB_DEAUTHORIZE, (void *)mac, ETH_ALEN, true);
if (err)
WL_ERR(("WLC_SCB_DEAUTHORIZE error (%d)\n", err));
return err;
}
- err = wldev_ioctl(primary_ndev, WLC_SCB_AUTHORIZE, mac, ETH_ALEN, true);
+ err = wldev_ioctl(primary_ndev, WLC_SCB_AUTHORIZE, (void *)mac, ETH_ALEN, true);
if (err)
WL_ERR(("WLC_SCB_AUTHORIZE error (%d)\n", err));
return err;
if (event == WLC_E_ASSOC_IND && reason == DOT11_SC_SUCCESS) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
- cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0, GFP_ATOMIC);
+ cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0))
- cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, GFP_ATOMIC);
+ cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len);
#else
- cfg80211_rx_mgmt(ndev, freq, mgmt_frame, len, GFP_ATOMIC);
+ cfg80211_rx_mgmt(ndev, freq, mgmt_frame, len);
#endif /* KERNEL VERSION 3, 12 */
} else if (event == WLC_E_DISASSOC_IND) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
- cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0, GFP_ATOMIC);
+ cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0))
- cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, GFP_ATOMIC);
+ cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len);
#else
- cfg80211_rx_mgmt(ndev, freq, mgmt_frame, len, GFP_ATOMIC);
+ cfg80211_rx_mgmt(ndev, freq, mgmt_frame, len);
#endif /* version 3.12*/
} else if ((event == WLC_E_DEAUTH_IND) || (event == WLC_E_DEAUTH)) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
- cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0, GFP_ATOMIC);
+ cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0))
- cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, GFP_ATOMIC);
+ cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len);
#else
- cfg80211_rx_mgmt(ndev, freq, mgmt_frame, len, GFP_ATOMIC);
+ cfg80211_rx_mgmt(ndev, freq, mgmt_frame, len);
#endif /* version 3.12 */
}
sinfo.filled = 0;
if (((event == WLC_E_ASSOC_IND) || (event == WLC_E_REASSOC_IND)) &&
reason == DOT11_SC_SUCCESS) {
- sinfo.filled = STATION_INFO_ASSOC_REQ_IES;
if (!data) {
WL_ERR(("No IEs present in ASSOC/REASSOC_IND"));
return -EINVAL;
u16 flags = ntoh16(e->flags);
u32 status = ntoh32(e->status);
bool active;
+ struct ieee80211_channel *chan;
if (event == WLC_E_JOIN) {
WL_DBG(("joined in IBSS network\n"));
}
if (event == WLC_E_JOIN || event == WLC_E_START ||
(event == WLC_E_LINK && (flags == WLC_EVENT_MSG_LINK))) {
+ chan = ieee80211_get_channel(bcmcfg_to_wiphy(cfg), cfg->channel);
if (wl_get_drv_status(cfg, CONNECTED, ndev)) {
/* ROAM or Redundant */
u8 *cur_bssid = wl_read_prof(cfg, ndev, WL_PROF_BSSID);
wl_get_assoc_ies(cfg, ndev);
wl_update_prof(cfg, ndev, NULL, (void *)&e->addr, WL_PROF_BSSID);
wl_update_bss_info(cfg, ndev, false);
- cfg80211_ibss_joined(ndev, (s8 *)&e->addr, GFP_KERNEL);
+ cfg80211_ibss_joined(ndev, (s8 *)&e->addr, chan, GFP_KERNEL);
}
else {
/* New connection */
wl_get_assoc_ies(cfg, ndev);
wl_update_prof(cfg, ndev, NULL, (void *)&e->addr, WL_PROF_BSSID);
wl_update_bss_info(cfg, ndev, false);
- cfg80211_ibss_joined(ndev, (s8 *)&e->addr, GFP_KERNEL);
+ cfg80211_ibss_joined(ndev, (s8 *)&e->addr, chan, GFP_KERNEL);
wl_set_drv_status(cfg, CONNECTED, ndev);
active = true;
wl_update_prof(cfg, ndev, NULL, (void *)&active, WL_PROF_ACT);
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
- retval = cfg80211_rx_mgmt(cfgdev, freq, 0, mgmt_frame, mgmt_frame_len, 0, GFP_ATOMIC);
+ retval = cfg80211_rx_mgmt(cfgdev, freq, 0, mgmt_frame, mgmt_frame_len, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)) || \
defined(WL_COMPAT_WIRELESS)
- retval = cfg80211_rx_mgmt(cfgdev, freq, 0, mgmt_frame, mgmt_frame_len, GFP_ATOMIC);
+ retval = cfg80211_rx_mgmt(cfgdev, freq, 0, mgmt_frame, mgmt_frame_len);
#else
- retval = cfg80211_rx_mgmt(cfgdev, freq, mgmt_frame, mgmt_frame_len, GFP_ATOMIC);
+ retval = cfg80211_rx_mgmt(cfgdev, freq, mgmt_frame, mgmt_frame_len);
#endif /* LINUX_VERSION >= VERSION(3, 12, 0) */
WL_DBG(("mgmt_frame_len (%d) , e->datalen (%d), channel (%d), freq (%d) retval (%d)\n",
if (cfg->tdls_mgmt_frame) {
#if (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);
+ cfg->tdls_mgmt_frame, cfg->tdls_mgmt_frame_len, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)) || defined(WL_COMPAT_WIRELESS)
cfg80211_rx_mgmt(cfgdev, cfg->tdls_mgmt_freq, 0,
- cfg->tdls_mgmt_frame, cfg->tdls_mgmt_frame_len,
- GFP_ATOMIC);
+ cfg->tdls_mgmt_frame, cfg->tdls_mgmt_frame_len);
#else
cfg80211_rx_mgmt(cfgdev, cfg->tdls_mgmt_freq,
- cfg->tdls_mgmt_frame, cfg->tdls_mgmt_frame_len,
- GFP_ATOMIC);
+ cfg->tdls_mgmt_frame, cfg->tdls_mgmt_frame_len);
#endif
}
msg = " TDLS PEER CONNECTED ";
#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 2, 0))
static s32
wl_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
- u8 *peer, u8 action_code, u8 dialog_token, u16 status_code, const u8 *data,
+ const u8 *peer, u8 action_code, u8 dialog_token, u16 status_code,
+ u32 peer_capability, bool initiator, const u8 *data,
size_t len)
{
s32 ret = 0;
static s32
wl_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
- u8 *peer, enum nl80211_tdls_operation oper)
+ const u8 *peer, enum nl80211_tdls_operation oper)
{
s32 ret = 0;
#ifdef WLTDLS