mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2024-11-16 12:05:34 +00:00
Merge 514a139f65
into 5cda905576
This commit is contained in:
commit
43fb499f2d
7 changed files with 69 additions and 0 deletions
|
@ -1140,7 +1140,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 CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
|
||||||
|
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);
|
||||||
|
@ -2107,6 +2111,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 CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
|
||||||
|
unsigned int link_id,
|
||||||
|
#endif
|
||||||
const u8 *peer,
|
const u8 *peer,
|
||||||
const struct cfg80211_bitrate_mask *mask)
|
const struct cfg80211_bitrate_mask *mask)
|
||||||
{
|
{
|
||||||
|
@ -4781,7 +4788,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 CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
|
||||||
|
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,
|
||||||
|
|
|
@ -156,6 +156,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 CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
|
||||||
|
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
|
||||||
|
@ -418,7 +421,12 @@ int woal_cfg80211_set_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||||
struct beacon_parameters *params);
|
struct beacon_parameters *params);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
|
||||||
|
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);
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Change log:
|
Change log:
|
||||||
10/21/2008: initial version
|
10/21/2008: initial version
|
||||||
|
@ -963,7 +964,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, 2)
|
||||||
|
priv->wdev->u.ibss.current_bss) {
|
||||||
|
#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(
|
||||||
|
@ -5682,7 +5687,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, 2)
|
||||||
|
if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev->u.ibss.current_bss) {
|
||||||
|
#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)
|
||||||
|
@ -8637,7 +8646,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, 2)
|
||||||
|
priv->wdev->u.ibss.current_bss) {
|
||||||
|
#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",
|
||||||
|
|
|
@ -2512,3 +2512,5 @@ static moal_if_ops sdiommc_ops = {
|
||||||
.reg_dbg = woal_sdiommc_reg_dbg,
|
.reg_dbg = woal_sdiommc_reg_dbg,
|
||||||
.is_second_mac = woal_sdiommc_is_second_mac,
|
.is_second_mac = woal_sdiommc_is_second_mac,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MODULE_DEVICE_TABLE(sdio, wlan_ids);
|
||||||
|
|
|
@ -3367,7 +3367,12 @@ 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, 2)
|
||||||
|
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
|
||||||
|
@ -3688,7 +3693,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, 2)
|
||||||
|
if (!priv->wdev->u.ibss.current_bss) {
|
||||||
|
#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;
|
||||||
|
|
|
@ -103,6 +103,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, 2)
|
||||||
|
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,
|
||||||
|
@ -5300,7 +5303,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, 2)
|
||||||
|
if (priv->wdev->u.ibss.current_bss &&
|
||||||
|
#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;
|
||||||
|
@ -5628,6 +5635,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, 2)
|
||||||
|
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);
|
||||||
|
|
|
@ -2336,6 +2336,13 @@ 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, 2)
|
||||||
|
woal_cfg80211_del_beacon(wiphy, dev, 0);
|
||||||
|
vir_priv->wdev->u.ibss.beacon_interval = 0;
|
||||||
|
memset(&vir_priv->wdev->u.ibss.chandef, 0,
|
||||||
|
sizeof(vir_priv->wdev->u.ibss.chandef));
|
||||||
|
vir_priv->wdev->u.ibss.ssid_len = 0;
|
||||||
|
#else
|
||||||
woal_cfg80211_del_beacon(wiphy, dev);
|
woal_cfg80211_del_beacon(wiphy, dev);
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)
|
||||||
vir_priv->wdev->beacon_interval = 0;
|
vir_priv->wdev->beacon_interval = 0;
|
||||||
|
@ -2345,6 +2352,7 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -2619,7 +2627,11 @@ done:
|
||||||
*
|
*
|
||||||
* @return 0 -- success, otherwise fail
|
* @return 0 -- success, otherwise fail
|
||||||
*/
|
*/
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
|
||||||
|
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;
|
||||||
|
@ -3309,7 +3321,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, 2)
|
||||||
|
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