mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2025-01-15 16:25:35 +00:00
mxm_wifiex: fix the build errors with the API changes on next-20220719 kernel tag
There are many cfg80211 common api and struct changes on next-20220719 kernel tag, which is based on v5.19-rc7 Linus tree tag with the for-next branch patches on each kernel IP repo, target for v6.0 kernel version. So need to change the local wifi driver accordingly to avoid the build errors. Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Signed-off-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
This commit is contained in:
parent
30f40263eb
commit
9a15e44e49
6 changed files with 174 additions and 4 deletions
|
@ -1148,7 +1148,11 @@ int woal_cfg80211_change_virtual_intf(struct wiphy *wiphy,
|
||||||
#endif /* WIFI_DIRECT_SUPPORT */
|
#endif /* WIFI_DIRECT_SUPPORT */
|
||||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||||
if (priv->bss_type == MLAN_BSS_TYPE_UAP) {
|
if (priv->bss_type == MLAN_BSS_TYPE_UAP) {
|
||||||
|
#if KERNEL_VERSION(5, 19, 0) <= CFG80211_VERSION_CODE
|
||||||
|
woal_cfg80211_del_beacon(wiphy, dev, 0);
|
||||||
|
#else
|
||||||
woal_cfg80211_del_beacon(wiphy, dev);
|
woal_cfg80211_del_beacon(wiphy, dev);
|
||||||
|
#endif
|
||||||
bss_role = MLAN_BSS_ROLE_STA;
|
bss_role = MLAN_BSS_ROLE_STA;
|
||||||
woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET,
|
woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET,
|
||||||
&bss_role);
|
&bss_role);
|
||||||
|
@ -2115,6 +2119,9 @@ done:
|
||||||
* @return 0 -- success, otherwise fail
|
* @return 0 -- success, otherwise fail
|
||||||
*/
|
*/
|
||||||
int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,
|
int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,
|
||||||
|
#if KERNEL_VERSION(5, 19, 0) <= CFG80211_VERSION_CODE
|
||||||
|
unsigned int link_id,
|
||||||
|
#endif
|
||||||
const u8 *peer,
|
const u8 *peer,
|
||||||
const struct cfg80211_bitrate_mask *mask)
|
const struct cfg80211_bitrate_mask *mask)
|
||||||
{
|
{
|
||||||
|
@ -4789,7 +4796,11 @@ void woal_cfg80211_notify_channel(moal_private *priv,
|
||||||
#if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
|
#if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
|
||||||
if (MLAN_STATUS_SUCCESS ==
|
if (MLAN_STATUS_SUCCESS ==
|
||||||
woal_chandef_create(priv, &chandef, pchan_info)) {
|
woal_chandef_create(priv, &chandef, pchan_info)) {
|
||||||
|
#if KERNEL_VERSION(5, 19, 0) <= CFG80211_VERSION_CODE
|
||||||
|
cfg80211_ch_switch_notify(priv->netdev, &chandef, 0);
|
||||||
|
#else
|
||||||
cfg80211_ch_switch_notify(priv->netdev, &chandef);
|
cfg80211_ch_switch_notify(priv->netdev, &chandef);
|
||||||
|
#endif
|
||||||
priv->channel = pchan_info->channel;
|
priv->channel = pchan_info->channel;
|
||||||
#ifdef UAP_CFG80211
|
#ifdef UAP_CFG80211
|
||||||
moal_memcpy_ext(priv->phandle, &priv->chan, &chandef,
|
moal_memcpy_ext(priv->phandle, &priv->chan, &chandef,
|
||||||
|
|
|
@ -164,6 +164,9 @@ int woal_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device *dev);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,
|
int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,
|
||||||
|
#if KERNEL_VERSION(5, 19, 0) <= CFG80211_VERSION_CODE
|
||||||
|
unsigned int link_id,
|
||||||
|
#endif
|
||||||
const u8 *peer,
|
const u8 *peer,
|
||||||
const struct cfg80211_bitrate_mask *mask);
|
const struct cfg80211_bitrate_mask *mask);
|
||||||
#if KERNEL_VERSION(2, 6, 38) <= CFG80211_VERSION_CODE
|
#if KERNEL_VERSION(2, 6, 38) <= CFG80211_VERSION_CODE
|
||||||
|
@ -430,7 +433,11 @@ int woal_cfg80211_set_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||||
struct beacon_parameters *params);
|
struct beacon_parameters *params);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if KERNEL_VERSION(5, 19, 0) <= CFG80211_VERSION_CODE
|
||||||
|
int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev, unsigned int link_id);
|
||||||
|
#else
|
||||||
int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev);
|
int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev);
|
||||||
|
#endif
|
||||||
int woal_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
|
int woal_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
|
||||||
#if KERNEL_VERSION(3, 19, 0) <= CFG80211_VERSION_CODE
|
#if KERNEL_VERSION(3, 19, 0) <= CFG80211_VERSION_CODE
|
||||||
struct station_del_parameters *param);
|
struct station_del_parameters *param);
|
||||||
|
|
|
@ -969,7 +969,11 @@ static void woal_hang_work_queue(struct work_struct *work)
|
||||||
#ifdef STA_CFG80211
|
#ifdef STA_CFG80211
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
|
||||||
if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev &&
|
if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev &&
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
priv->wdev->connected) {
|
||||||
|
#else
|
||||||
priv->wdev->current_bss) {
|
priv->wdev->current_bss) {
|
||||||
|
#endif
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||||
if (priv->host_mlme)
|
if (priv->host_mlme)
|
||||||
woal_host_mlme_disconnect(
|
woal_host_mlme_disconnect(
|
||||||
|
@ -5688,7 +5692,11 @@ int woal_close(struct net_device *dev)
|
||||||
woal_cancel_scan(priv, MOAL_IOCTL_WAIT);
|
woal_cancel_scan(priv, MOAL_IOCTL_WAIT);
|
||||||
|
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev->connected) {
|
||||||
|
#else
|
||||||
if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev->current_bss) {
|
if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev->current_bss) {
|
||||||
|
#endif
|
||||||
priv->cfg_disconnect = MTRUE;
|
priv->cfg_disconnect = MTRUE;
|
||||||
cfg80211_disconnected(priv->netdev, 0, NULL, 0,
|
cfg80211_disconnected(priv->netdev, 0, NULL, 0,
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||||
|
@ -8642,7 +8650,11 @@ t_void woal_send_disconnect_to_system(moal_private *priv,
|
||||||
if (IS_STA_CFG80211(cfg80211_wext)) {
|
if (IS_STA_CFG80211(cfg80211_wext)) {
|
||||||
spin_lock_irqsave(&priv->connect_lock, flags);
|
spin_lock_irqsave(&priv->connect_lock, flags);
|
||||||
if (!priv->cfg_disconnect && !priv->cfg_connect && priv->wdev &&
|
if (!priv->cfg_disconnect && !priv->cfg_connect && priv->wdev &&
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
priv->wdev->connected) {
|
||||||
|
#else
|
||||||
priv->wdev->current_bss) {
|
priv->wdev->current_bss) {
|
||||||
|
#endif
|
||||||
PRINTM(MMSG,
|
PRINTM(MMSG,
|
||||||
"wlan: Disconnected from " MACSTR
|
"wlan: Disconnected from " MACSTR
|
||||||
": Reason code %d\n",
|
": Reason code %d\n",
|
||||||
|
|
|
@ -3361,7 +3361,11 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
||||||
PRINTM(MMSG,
|
PRINTM(MMSG,
|
||||||
"Channel Under Nop: notify cfg80211 new channel=%d\n",
|
"Channel Under Nop: notify cfg80211 new channel=%d\n",
|
||||||
priv->channel);
|
priv->channel);
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0);
|
||||||
|
#else
|
||||||
cfg80211_ch_switch_notify(priv->netdev, &priv->chan);
|
cfg80211_ch_switch_notify(priv->netdev, &priv->chan);
|
||||||
|
#endif
|
||||||
priv->chan_under_nop = MFALSE;
|
priv->chan_under_nop = MFALSE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3682,7 +3686,11 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
||||||
PRINTM(MEVENT,
|
PRINTM(MEVENT,
|
||||||
"HostMlme %s: Receive deauth/disassociate\n",
|
"HostMlme %s: Receive deauth/disassociate\n",
|
||||||
priv->netdev->name);
|
priv->netdev->name);
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (!priv->wdev->connected) {
|
||||||
|
#else
|
||||||
if (!priv->wdev->current_bss) {
|
if (!priv->wdev->current_bss) {
|
||||||
|
#endif
|
||||||
PRINTM(MEVENT,
|
PRINTM(MEVENT,
|
||||||
"HostMlme: Drop deauth/disassociate, current_bss = null\n");
|
"HostMlme: Drop deauth/disassociate, current_bss = null\n");
|
||||||
break;
|
break;
|
||||||
|
@ -4052,7 +4060,11 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
||||||
roam_info =
|
roam_info =
|
||||||
kzalloc(sizeof(struct cfg80211_roam_info), GFP_ATOMIC);
|
kzalloc(sizeof(struct cfg80211_roam_info), GFP_ATOMIC);
|
||||||
if (roam_info) {
|
if (roam_info) {
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
roam_info->links[0].bssid = priv->cfg_bssid;
|
||||||
|
#else
|
||||||
roam_info->bssid = priv->cfg_bssid;
|
roam_info->bssid = priv->cfg_bssid;
|
||||||
|
#endif
|
||||||
roam_info->req_ie = req_ie;
|
roam_info->req_ie = req_ie;
|
||||||
roam_info->req_ie_len = ie_len;
|
roam_info->req_ie_len = ie_len;
|
||||||
roam_info->resp_ie = pinfo->rsp_ie;
|
roam_info->resp_ie = pinfo->rsp_ie;
|
||||||
|
|
|
@ -111,6 +111,9 @@ static int woal_cfg80211_dump_survey(struct wiphy *wiphy,
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||||
static int woal_cfg80211_get_channel(struct wiphy *wiphy,
|
static int woal_cfg80211_get_channel(struct wiphy *wiphy,
|
||||||
struct wireless_dev *wdev,
|
struct wireless_dev *wdev,
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
unsigned int link_id,
|
||||||
|
#endif
|
||||||
struct cfg80211_chan_def *chandef);
|
struct cfg80211_chan_def *chandef);
|
||||||
#endif
|
#endif
|
||||||
static int woal_cfg80211_set_power_mgmt(struct wiphy *wiphy,
|
static int woal_cfg80211_set_power_mgmt(struct wiphy *wiphy,
|
||||||
|
@ -2489,6 +2492,11 @@ void woal_host_mlme_process_assoc_resp(moal_private *priv,
|
||||||
struct cfg80211_bss *bss = NULL;
|
struct cfg80211_bss *bss = NULL;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u8 *assoc_req_buf = NULL;
|
u8 *assoc_req_buf = NULL;
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
struct cfg80211_rx_assoc_resp resp = {
|
||||||
|
.uapsd_queues = -1,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
if (priv) {
|
if (priv) {
|
||||||
if (priv->auth_flag & HOST_MLME_ASSOC_DONE) {
|
if (priv->auth_flag & HOST_MLME_ASSOC_DONE) {
|
||||||
|
@ -2545,6 +2553,16 @@ void woal_host_mlme_process_assoc_resp(moal_private *priv,
|
||||||
assoc_info
|
assoc_info
|
||||||
->assoc_req_buf;
|
->assoc_req_buf;
|
||||||
|
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
resp.links[0].bss = bss;
|
||||||
|
resp.buf = assoc_info->assoc_resp_buf;
|
||||||
|
resp.len = assoc_info->assoc_resp_len;
|
||||||
|
resp.req_ies = assoc_req_buf;
|
||||||
|
resp.req_ies_len = assoc_info->assoc_req_len;
|
||||||
|
mutex_lock(&priv->wdev->mtx);
|
||||||
|
cfg80211_rx_assoc_resp(priv->netdev, &resp);
|
||||||
|
mutex_unlock(&priv->wdev->mtx);
|
||||||
|
#else
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
|
||||||
mutex_lock(&priv->wdev->mtx);
|
mutex_lock(&priv->wdev->mtx);
|
||||||
cfg80211_rx_assoc_resp(
|
cfg80211_rx_assoc_resp(
|
||||||
|
@ -2577,6 +2595,7 @@ void woal_host_mlme_process_assoc_resp(moal_private *priv,
|
||||||
assoc_info->assoc_resp_len);
|
assoc_info->assoc_resp_len);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5347,7 +5366,11 @@ static int woal_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev,
|
||||||
if (priv->media_connected == MFALSE) {
|
if (priv->media_connected == MFALSE) {
|
||||||
PRINTM(MMSG, " Already disconnected\n");
|
PRINTM(MMSG, " Already disconnected\n");
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (priv->wdev->connected &&
|
||||||
|
#else
|
||||||
if (priv->wdev->current_bss &&
|
if (priv->wdev->current_bss &&
|
||||||
|
#endif
|
||||||
(priv->wdev->iftype == NL80211_IFTYPE_STATION ||
|
(priv->wdev->iftype == NL80211_IFTYPE_STATION ||
|
||||||
priv->wdev->iftype == NL80211_IFTYPE_P2P_CLIENT)) {
|
priv->wdev->iftype == NL80211_IFTYPE_P2P_CLIENT)) {
|
||||||
priv->cfg_disconnect = MTRUE;
|
priv->cfg_disconnect = MTRUE;
|
||||||
|
@ -5675,6 +5698,9 @@ done:
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||||
static int woal_cfg80211_get_channel(struct wiphy *wiphy,
|
static int woal_cfg80211_get_channel(struct wiphy *wiphy,
|
||||||
struct wireless_dev *wdev,
|
struct wireless_dev *wdev,
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
unsigned int link_id,
|
||||||
|
#endif
|
||||||
struct cfg80211_chan_def *chandef)
|
struct cfg80211_chan_def *chandef)
|
||||||
{
|
{
|
||||||
moal_private *priv = (moal_private *)woal_get_netdev_priv(wdev->netdev);
|
moal_private *priv = (moal_private *)woal_get_netdev_priv(wdev->netdev);
|
||||||
|
@ -8552,7 +8578,11 @@ int woal_cfg80211_update_ft_ies(struct wiphy *wiphy, struct net_device *dev,
|
||||||
passoc_rsp = (IEEEtypes_AssocRsp_t *)
|
passoc_rsp = (IEEEtypes_AssocRsp_t *)
|
||||||
assoc_rsp->assoc_resp_buf;
|
assoc_rsp->assoc_resp_buf;
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
roam_info.links[0].bssid = priv->cfg_bssid;
|
||||||
|
#else
|
||||||
roam_info.bssid = priv->cfg_bssid;
|
roam_info.bssid = priv->cfg_bssid;
|
||||||
|
#endif
|
||||||
roam_info.req_ie = priv->sme_current.ie;
|
roam_info.req_ie = priv->sme_current.ie;
|
||||||
roam_info.req_ie_len = priv->sme_current.ie_len;
|
roam_info.req_ie_len = priv->sme_current.ie_len;
|
||||||
roam_info.resp_ie = passoc_rsp->ie_buffer;
|
roam_info.resp_ie = passoc_rsp->ie_buffer;
|
||||||
|
@ -9020,7 +9050,11 @@ void woal_start_roaming(moal_private *priv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
roam_info.links[0].bssid = priv->cfg_bssid;
|
||||||
|
#else
|
||||||
roam_info.bssid = priv->cfg_bssid;
|
roam_info.bssid = priv->cfg_bssid;
|
||||||
|
#endif
|
||||||
roam_info.req_ie = ie;
|
roam_info.req_ie = ie;
|
||||||
roam_info.req_ie_len = ie_len;
|
roam_info.req_ie_len = ie_len;
|
||||||
roam_info.resp_ie = passoc_rsp->ie_buffer;
|
roam_info.resp_ie = passoc_rsp->ie_buffer;
|
||||||
|
@ -9095,23 +9129,44 @@ int woal_cfg80211_uap_add_station(struct wiphy *wiphy, struct net_device *dev,
|
||||||
if (params->ext_capab_len)
|
if (params->ext_capab_len)
|
||||||
req_len += sizeof(MrvlIEtypesHeader_t) + params->ext_capab_len;
|
req_len += sizeof(MrvlIEtypesHeader_t) + params->ext_capab_len;
|
||||||
#endif
|
#endif
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (params->link_sta_params.supported_rates_len)
|
||||||
|
req_len += sizeof(MrvlIEtypesHeader_t) +
|
||||||
|
params->link_sta_params.supported_rates_len;
|
||||||
|
|
||||||
|
#else
|
||||||
if (params->supported_rates_len)
|
if (params->supported_rates_len)
|
||||||
req_len += sizeof(MrvlIEtypesHeader_t) +
|
req_len += sizeof(MrvlIEtypesHeader_t) +
|
||||||
params->supported_rates_len;
|
params->supported_rates_len;
|
||||||
|
#endif
|
||||||
if (params->uapsd_queues || params->max_sp)
|
if (params->uapsd_queues || params->max_sp)
|
||||||
req_len += sizeof(MrvlIEtypesHeader_t) + sizeof(qosinfo);
|
req_len += sizeof(MrvlIEtypesHeader_t) + sizeof(qosinfo);
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (params->link_sta_params.ht_capa)
|
||||||
|
#else
|
||||||
if (params->ht_capa)
|
if (params->ht_capa)
|
||||||
|
#endif
|
||||||
req_len += sizeof(MrvlIEtypesHeader_t) +
|
req_len += sizeof(MrvlIEtypesHeader_t) +
|
||||||
sizeof(struct ieee80211_ht_cap);
|
sizeof(struct ieee80211_ht_cap);
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (params->link_sta_params.vht_capa)
|
||||||
|
#else
|
||||||
if (params->vht_capa)
|
if (params->vht_capa)
|
||||||
|
#endif
|
||||||
req_len += sizeof(MrvlIEtypesHeader_t) +
|
req_len += sizeof(MrvlIEtypesHeader_t) +
|
||||||
sizeof(struct ieee80211_vht_cap);
|
sizeof(struct ieee80211_vht_cap);
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (params->link_sta_params.opmode_notif_used)
|
||||||
|
req_len += sizeof(MrvlIEtypesHeader_t) + sizeof(u8);
|
||||||
|
#elif CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||||
if (params->opmode_notif_used)
|
if (params->opmode_notif_used)
|
||||||
req_len += sizeof(MrvlIEtypesHeader_t) + sizeof(u8);
|
req_len += sizeof(MrvlIEtypesHeader_t) + sizeof(u8);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (params->link_sta_params.he_capa_len)
|
||||||
|
req_len += sizeof(MrvlExtIEtypesHeader_t) + params->link_sta_params.he_capa_len;
|
||||||
|
#elif CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
||||||
if (params->he_capa_len)
|
if (params->he_capa_len)
|
||||||
req_len += sizeof(MrvlExtIEtypesHeader_t) + params->he_capa_len;
|
req_len += sizeof(MrvlExtIEtypesHeader_t) + params->he_capa_len;
|
||||||
#endif
|
#endif
|
||||||
|
@ -9161,12 +9216,24 @@ int woal_cfg80211_uap_add_station(struct wiphy *wiphy, struct net_device *dev,
|
||||||
tlv = (MrvlIEtypes_Data_t *)pos;
|
tlv = (MrvlIEtypes_Data_t *)pos;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (params->link_sta_params.supported_rates_len) {
|
||||||
|
#else
|
||||||
if (params->supported_rates_len) {
|
if (params->supported_rates_len) {
|
||||||
|
#endif
|
||||||
tlv = (MrvlIEtypes_Data_t *)pos;
|
tlv = (MrvlIEtypes_Data_t *)pos;
|
||||||
tlv->header.type = SUPPORTED_RATES;
|
tlv->header.type = SUPPORTED_RATES;
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
tlv->header.len = params->link_sta_params.supported_rates_len;
|
||||||
|
#else
|
||||||
tlv->header.len = params->supported_rates_len;
|
tlv->header.len = params->supported_rates_len;
|
||||||
|
#endif
|
||||||
moal_memcpy_ext(priv->phandle, tlv->data,
|
moal_memcpy_ext(priv->phandle, tlv->data,
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
params->link_sta_params.supported_rates, tlv->header.len,
|
||||||
|
#else
|
||||||
params->supported_rates, tlv->header.len,
|
params->supported_rates, tlv->header.len,
|
||||||
|
#endif
|
||||||
tlv->header.len);
|
tlv->header.len);
|
||||||
pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len;
|
pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len;
|
||||||
bss->param.sta_info.tlv_len +=
|
bss->param.sta_info.tlv_len +=
|
||||||
|
@ -9185,22 +9252,38 @@ int woal_cfg80211_uap_add_station(struct wiphy *wiphy, struct net_device *dev,
|
||||||
sizeof(MrvlIEtypesHeader_t) + tlv->header.len;
|
sizeof(MrvlIEtypesHeader_t) + tlv->header.len;
|
||||||
tlv = (MrvlIEtypes_Data_t *)pos;
|
tlv = (MrvlIEtypes_Data_t *)pos;
|
||||||
}
|
}
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (params->link_sta_params.ht_capa) {
|
||||||
|
#else
|
||||||
if (params->ht_capa) {
|
if (params->ht_capa) {
|
||||||
|
#endif
|
||||||
tlv = (MrvlIEtypes_Data_t *)pos;
|
tlv = (MrvlIEtypes_Data_t *)pos;
|
||||||
tlv->header.type = HT_CAPABILITY;
|
tlv->header.type = HT_CAPABILITY;
|
||||||
tlv->header.len = sizeof(struct ieee80211_ht_cap);
|
tlv->header.len = sizeof(struct ieee80211_ht_cap);
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
moal_memcpy_ext(priv->phandle, tlv->data, params->link_sta_params.ht_capa,
|
||||||
|
#else
|
||||||
moal_memcpy_ext(priv->phandle, tlv->data, params->ht_capa,
|
moal_memcpy_ext(priv->phandle, tlv->data, params->ht_capa,
|
||||||
|
#endif
|
||||||
tlv->header.len, tlv->header.len);
|
tlv->header.len, tlv->header.len);
|
||||||
pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len;
|
pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len;
|
||||||
bss->param.sta_info.tlv_len +=
|
bss->param.sta_info.tlv_len +=
|
||||||
sizeof(MrvlIEtypesHeader_t) + tlv->header.len;
|
sizeof(MrvlIEtypesHeader_t) + tlv->header.len;
|
||||||
tlv = (MrvlIEtypes_Data_t *)pos;
|
tlv = (MrvlIEtypes_Data_t *)pos;
|
||||||
}
|
}
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (params->link_sta_params.vht_capa) {
|
||||||
|
#else
|
||||||
if (params->vht_capa) {
|
if (params->vht_capa) {
|
||||||
|
#endif
|
||||||
tlv = (MrvlIEtypes_Data_t *)pos;
|
tlv = (MrvlIEtypes_Data_t *)pos;
|
||||||
tlv->header.type = VHT_CAPABILITY;
|
tlv->header.type = VHT_CAPABILITY;
|
||||||
tlv->header.len = sizeof(struct ieee80211_vht_cap);
|
tlv->header.len = sizeof(struct ieee80211_vht_cap);
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
moal_memcpy_ext(priv->phandle, tlv->data, params->link_sta_params.vht_capa,
|
||||||
|
#else
|
||||||
moal_memcpy_ext(priv->phandle, tlv->data, params->vht_capa,
|
moal_memcpy_ext(priv->phandle, tlv->data, params->vht_capa,
|
||||||
|
#endif
|
||||||
tlv->header.len, tlv->header.len);
|
tlv->header.len, tlv->header.len);
|
||||||
pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len;
|
pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len;
|
||||||
bss->param.sta_info.tlv_len +=
|
bss->param.sta_info.tlv_len +=
|
||||||
|
@ -9208,11 +9291,19 @@ int woal_cfg80211_uap_add_station(struct wiphy *wiphy, struct net_device *dev,
|
||||||
tlv = (MrvlIEtypes_Data_t *)pos;
|
tlv = (MrvlIEtypes_Data_t *)pos;
|
||||||
}
|
}
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (params->link_sta_params.opmode_notif_used) {
|
||||||
|
#else
|
||||||
if (params->opmode_notif_used) {
|
if (params->opmode_notif_used) {
|
||||||
|
#endif
|
||||||
tlv = (MrvlIEtypes_Data_t *)pos;
|
tlv = (MrvlIEtypes_Data_t *)pos;
|
||||||
tlv->header.type = OPER_MODE_NTF;
|
tlv->header.type = OPER_MODE_NTF;
|
||||||
tlv->header.len = sizeof(u8);
|
tlv->header.len = sizeof(u8);
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
moal_memcpy_ext(priv->phandle, tlv->data, ¶ms->link_sta_params.opmode_notif,
|
||||||
|
#else
|
||||||
moal_memcpy_ext(priv->phandle, tlv->data, ¶ms->opmode_notif,
|
moal_memcpy_ext(priv->phandle, tlv->data, ¶ms->opmode_notif,
|
||||||
|
#endif
|
||||||
tlv->header.len, tlv->header.len);
|
tlv->header.len, tlv->header.len);
|
||||||
pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len;
|
pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len;
|
||||||
bss->param.sta_info.tlv_len +=
|
bss->param.sta_info.tlv_len +=
|
||||||
|
@ -9220,7 +9311,21 @@ int woal_cfg80211_uap_add_station(struct wiphy *wiphy, struct net_device *dev,
|
||||||
tlv = (MrvlIEtypes_Data_t *)pos;
|
tlv = (MrvlIEtypes_Data_t *)pos;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
if (params->link_sta_params.he_capa_len) {
|
||||||
|
ext_tlv = (MrvlExtIEtypes_Data_t *)pos;
|
||||||
|
ext_tlv->header.type = EXTENSION;
|
||||||
|
ext_tlv->header.len = params->link_sta_params.he_capa_len + sizeof(u8);
|
||||||
|
ext_tlv->header.ext_id = HE_CAPABILITY;
|
||||||
|
moal_memcpy_ext(priv->phandle, ext_tlv->data,
|
||||||
|
(u8 *)params->link_sta_params.he_capa, params->link_sta_params.he_capa_len,
|
||||||
|
params->link_sta_params.he_capa_len);
|
||||||
|
pos += sizeof(MrvlExtIEtypesHeader_t) + params->link_sta_params.he_capa_len;
|
||||||
|
bss->param.sta_info.tlv_len +=
|
||||||
|
sizeof(MrvlExtIEtypesHeader_t) + params->link_sta_params.he_capa_len;
|
||||||
|
tlv = (MrvlIEtypes_Data_t *)pos;
|
||||||
|
}
|
||||||
|
#elif CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
||||||
if (params->he_capa_len) {
|
if (params->he_capa_len) {
|
||||||
ext_tlv = (MrvlExtIEtypes_Data_t *)pos;
|
ext_tlv = (MrvlExtIEtypes_Data_t *)pos;
|
||||||
ext_tlv->header.type = EXTENSION;
|
ext_tlv->header.type = EXTENSION;
|
||||||
|
|
|
@ -2344,15 +2344,30 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (vir_priv && vir_priv->bss_type == MLAN_BSS_TYPE_UAP) {
|
if (vir_priv && vir_priv->bss_type == MLAN_BSS_TYPE_UAP) {
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
woal_cfg80211_del_beacon(wiphy, dev, 0);
|
||||||
|
#else
|
||||||
woal_cfg80211_del_beacon(wiphy, dev);
|
woal_cfg80211_del_beacon(wiphy, dev);
|
||||||
|
#endif
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
vir_priv->wdev->links[0].ap.beacon_interval = 0;
|
||||||
|
#else
|
||||||
vir_priv->wdev->beacon_interval = 0;
|
vir_priv->wdev->beacon_interval = 0;
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
|
#endif
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
memset(&vir_priv->wdev->links[0].ap.chandef, 0,
|
||||||
|
sizeof(vir_priv->wdev->links[0].ap.chandef));
|
||||||
|
#elif CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
|
||||||
memset(&vir_priv->wdev->chandef, 0,
|
memset(&vir_priv->wdev->chandef, 0,
|
||||||
sizeof(vir_priv->wdev->chandef));
|
sizeof(vir_priv->wdev->chandef));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
vir_priv->wdev->u.ap.ssid_len = 0;
|
||||||
|
#else
|
||||||
vir_priv->wdev->ssid_len = 0;
|
vir_priv->wdev->ssid_len = 0;
|
||||||
|
#endif
|
||||||
PRINTM(MMSG, "Skip del UAP virtual interface %s",
|
PRINTM(MMSG, "Skip del UAP virtual interface %s",
|
||||||
dev->name);
|
dev->name);
|
||||||
}
|
}
|
||||||
|
@ -2627,7 +2642,11 @@ done:
|
||||||
*
|
*
|
||||||
* @return 0 -- success, otherwise fail
|
* @return 0 -- success, otherwise fail
|
||||||
*/
|
*/
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev, unsigned int link_id)
|
||||||
|
#else
|
||||||
int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev)
|
int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
moal_private *priv = (moal_private *)woal_get_netdev_priv(dev);
|
moal_private *priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -3317,7 +3336,11 @@ static void woal_switch_uap_channel(moal_private *priv, t_u8 wait_option)
|
||||||
priv->channel = uap_channel.channel;
|
priv->channel = uap_channel.channel;
|
||||||
moal_memcpy_ext(priv->phandle, &priv->chan, &priv->csa_chan,
|
moal_memcpy_ext(priv->phandle, &priv->chan, &priv->csa_chan,
|
||||||
sizeof(struct cfg80211_chan_def), sizeof(priv->chan));
|
sizeof(struct cfg80211_chan_def), sizeof(priv->chan));
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
|
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0);
|
||||||
|
#else
|
||||||
cfg80211_ch_switch_notify(priv->netdev, &priv->chan);
|
cfg80211_ch_switch_notify(priv->netdev, &priv->chan);
|
||||||
|
#endif
|
||||||
if (priv->uap_tx_blocked) {
|
if (priv->uap_tx_blocked) {
|
||||||
if (!netif_carrier_ok(priv->netdev))
|
if (!netif_carrier_ok(priv->netdev))
|
||||||
netif_carrier_on(priv->netdev);
|
netif_carrier_on(priv->netdev);
|
||||||
|
|
Loading…
Reference in a new issue