mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2024-05-14 17:19:20 +00:00
mxm_wifiex: update to mxm6x17408.p2 release
Corresponding firmware version: SDIO-UART W8987 Firmware version 16.92.21.p99.2 PCIE-UART W8997 Firmware version 16.92.21.p84.4 SDIO-UART W8997 Firmware version 16.92.21.p84.4 SDIO-UART IW416 Firmware version 16.92.21.p84.3 SDIO_UART IW612 Firmware version 18.99.2.p19.15 SDIO-UART W8801 Firmware version 14.92.36.p182 SDIO-UART W9098 Firmware version 17.92.1.p136.131 PCIE-UART W9098 Firmware version 17.92.1.p136.131 Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
parent
297d1ac172
commit
26246bf60a
|
@ -505,6 +505,8 @@
|
||||||
#ifdef TX_POWERCFG
|
#ifdef TX_POWERCFG
|
||||||
txpwrlimit_cfg=<Tx power limit config file name>
|
txpwrlimit_cfg=<Tx power limit config file name>
|
||||||
e.g. copy txpwrlimit_cfg_set.conf to firmware directory, txpwrlimit_cfg=nxp/txpwrlimit_cfg_set.conf
|
e.g. copy txpwrlimit_cfg_set.conf to firmware directory, txpwrlimit_cfg=nxp/txpwrlimit_cfg_set.conf
|
||||||
|
txpwrlimit_cfg_set.conf file should be the binary format file generate by mlanutl application
|
||||||
|
|
||||||
#ifdef OTP_CHANINFO
|
#ifdef OTP_CHANINFO
|
||||||
cntry_txpwr=0|1|2
|
cntry_txpwr=0|1|2
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -8811,7 +8811,7 @@ static void wlan_fill_link_statistic(mlan_private *priv,
|
||||||
.get_link_statistic;
|
.get_link_statistic;
|
||||||
|
|
||||||
/* TLV parse */
|
/* TLV parse */
|
||||||
if (resp->size > (sizeof(HostCmd_DS_802_11_LINK_STATISTIC) - S_DS_GEN))
|
if (resp->size > (sizeof(HostCmd_DS_802_11_LINK_STATISTIC) + S_DS_GEN))
|
||||||
left_len = resp->size -
|
left_len = resp->size -
|
||||||
sizeof(HostCmd_DS_802_11_LINK_STATISTIC) - S_DS_GEN;
|
sizeof(HostCmd_DS_802_11_LINK_STATISTIC) - S_DS_GEN;
|
||||||
|
|
||||||
|
@ -8820,6 +8820,10 @@ static void wlan_fill_link_statistic(mlan_private *priv,
|
||||||
while (left_len > sizeof(MrvlIEtypesHeader_t)) {
|
while (left_len > sizeof(MrvlIEtypesHeader_t)) {
|
||||||
tlv_type = wlan_le16_to_cpu(tlv->type);
|
tlv_type = wlan_le16_to_cpu(tlv->type);
|
||||||
tlv_len = wlan_le16_to_cpu(tlv->len);
|
tlv_len = wlan_le16_to_cpu(tlv->len);
|
||||||
|
if (left_len < (tlv_len + sizeof(MrvlIEtypesHeader_t))) {
|
||||||
|
PRINTM(MERROR, "Invalid link statistic tlv\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
switch (tlv_type) {
|
switch (tlv_type) {
|
||||||
case TLV_TYPE_LL_STAT_IFACE:
|
case TLV_TYPE_LL_STAT_IFACE:
|
||||||
fw_ifaceStat = (mlan_wifi_iface_stat
|
fw_ifaceStat = (mlan_wifi_iface_stat
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#define _MLAN_DECL_H_
|
#define _MLAN_DECL_H_
|
||||||
|
|
||||||
/** MLAN release version */
|
/** MLAN release version */
|
||||||
#define MLAN_RELEASE_VERSION "408"
|
#define MLAN_RELEASE_VERSION "408.p2"
|
||||||
|
|
||||||
/** Re-define generic data types for MLAN/MOAL */
|
/** Re-define generic data types for MLAN/MOAL */
|
||||||
/** Signed char (1-byte) */
|
/** Signed char (1-byte) */
|
||||||
|
@ -621,6 +621,8 @@ typedef enum {
|
||||||
|
|
||||||
#define MLAN_BUF_FLAG_TX_CTRL MBIT(14)
|
#define MLAN_BUF_FLAG_TX_CTRL MBIT(14)
|
||||||
|
|
||||||
|
#define MLAN_BUF_FLAG_EASYMESH MBIT(16)
|
||||||
|
|
||||||
#define MLAN_BUF_FLAG_MC_AGGR_PKT MBIT(17)
|
#define MLAN_BUF_FLAG_MC_AGGR_PKT MBIT(17)
|
||||||
|
|
||||||
#ifdef DEBUG_LEVEL1
|
#ifdef DEBUG_LEVEL1
|
||||||
|
@ -1335,6 +1337,8 @@ typedef struct _mlan_buffer {
|
||||||
t_u32 extra_ts_sec;
|
t_u32 extra_ts_sec;
|
||||||
/** Time stamp when packet is dequed from rx_q(micro seconds) */
|
/** Time stamp when packet is dequed from rx_q(micro seconds) */
|
||||||
t_u32 extra_ts_usec;
|
t_u32 extra_ts_usec;
|
||||||
|
/** When TX ra mac address, When Rx Ta mac address*/
|
||||||
|
t_u8 mac[MLAN_MAC_ADDR_LENGTH];
|
||||||
/** Fields below are valid for MLAN module only */
|
/** Fields below are valid for MLAN module only */
|
||||||
/** Pointer to parent mlan_buffer */
|
/** Pointer to parent mlan_buffer */
|
||||||
struct _mlan_buffer *pparent;
|
struct _mlan_buffer *pparent;
|
||||||
|
|
|
@ -334,6 +334,9 @@ typedef enum _WLAN_802_11_WEP_STATUS {
|
||||||
/**TLV type : Host MLME Flag*/
|
/**TLV type : Host MLME Flag*/
|
||||||
#define TLV_TYPE_HOST_MLME (PROPRIETARY_TLV_BASE_ID + 307)
|
#define TLV_TYPE_HOST_MLME (PROPRIETARY_TLV_BASE_ID + 307)
|
||||||
|
|
||||||
|
/** TLV type: MULTI AP Flag */
|
||||||
|
#define TLV_TYPE_MULTI_AP (PROPRIETARY_TLV_BASE_ID + 326)
|
||||||
|
|
||||||
/** TLV type : AP wacp mode */
|
/** TLV type : AP wacp mode */
|
||||||
#define TLV_TYPE_UAP_WACP_MODE (PROPRIETARY_TLV_BASE_ID + 0x147) /* 0x0247 */
|
#define TLV_TYPE_UAP_WACP_MODE (PROPRIETARY_TLV_BASE_ID + 0x147) /* 0x0247 */
|
||||||
|
|
||||||
|
@ -1607,6 +1610,8 @@ enum wls_event_subtype {
|
||||||
/** TDLS off channel */
|
/** TDLS off channel */
|
||||||
#define TDLS_OFF_CHANNEL 1
|
#define TDLS_OFF_CHANNEL 1
|
||||||
|
|
||||||
|
#define RXPD_FLAG_PKT_EASYMESH MBIT(4)
|
||||||
|
|
||||||
/** structure for channel switch result from TDLS FW */
|
/** structure for channel switch result from TDLS FW */
|
||||||
typedef MLAN_PACK_START struct _chan_switch_result {
|
typedef MLAN_PACK_START struct _chan_switch_result {
|
||||||
/** current channel, 0 - base channel, 1 - off channel*/
|
/** current channel, 0 - base channel, 1 - off channel*/
|
||||||
|
@ -1724,6 +1729,9 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_TDLS_Idle_Timeout_t {
|
||||||
/** Bit mask for TxPD flags field for Tx status report */
|
/** Bit mask for TxPD flags field for Tx status report */
|
||||||
#define MRVDRV_TxPD_FLAGS_TX_PACKET_STATUS MBIT(5)
|
#define MRVDRV_TxPD_FLAGS_TX_PACKET_STATUS MBIT(5)
|
||||||
|
|
||||||
|
/** Bit mask for TxPD flags field for EASYMESH */
|
||||||
|
#define MRVDRV_TxPD_FLAGS_EASYMESH MBIT(7)
|
||||||
|
|
||||||
/** Packet type: 802.11 */
|
/** Packet type: 802.11 */
|
||||||
#define PKT_TYPE_802DOT11 0x05
|
#define PKT_TYPE_802DOT11 0x05
|
||||||
|
|
||||||
|
@ -1863,6 +1871,9 @@ typedef MLAN_PACK_START struct _TxPD {
|
||||||
t_u8 reserved;
|
t_u8 reserved;
|
||||||
/** Tx Control */
|
/** Tx Control */
|
||||||
t_u32 tx_control_1;
|
t_u32 tx_control_1;
|
||||||
|
/** ra mac address */
|
||||||
|
t_u8 ra_mac[6];
|
||||||
|
t_u8 reserved3[2];
|
||||||
} MLAN_PACK_END TxPD, *PTxPD;
|
} MLAN_PACK_END TxPD, *PTxPD;
|
||||||
|
|
||||||
/** RxPD Descriptor */
|
/** RxPD Descriptor */
|
||||||
|
@ -1908,6 +1919,8 @@ typedef MLAN_PACK_START struct _RxPD {
|
||||||
|
|
||||||
/** Reserved */
|
/** Reserved */
|
||||||
t_u8 reserved3[8];
|
t_u8 reserved3[8];
|
||||||
|
t_u8 ta_mac[6];
|
||||||
|
t_u8 reserved4[2];
|
||||||
} MLAN_PACK_END RxPD, *PRxPD;
|
} MLAN_PACK_END RxPD, *PRxPD;
|
||||||
|
|
||||||
/** IEEEtypes_FrameCtl_t*/
|
/** IEEEtypes_FrameCtl_t*/
|
||||||
|
@ -2213,6 +2226,14 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_HostMlme_t {
|
||||||
t_u8 host_mlme;
|
t_u8 host_mlme;
|
||||||
} MLAN_PACK_END MrvlIEtypes_HostMlme_t;
|
} MLAN_PACK_END MrvlIEtypes_HostMlme_t;
|
||||||
|
|
||||||
|
/** MrvlIEtypes_MultiAp_t */
|
||||||
|
typedef MLAN_PACK_START struct _MrvlIEtypes_MultiAp_t {
|
||||||
|
/** Header */
|
||||||
|
MrvlIEtypesHeader_t header;
|
||||||
|
/** Multi AP flag */
|
||||||
|
t_u8 flag;
|
||||||
|
} MLAN_PACK_END MrvlIEtypes_MultiAp_t;
|
||||||
|
|
||||||
/** MrvlIEtypes_NumProbes_t */
|
/** MrvlIEtypes_NumProbes_t */
|
||||||
typedef MLAN_PACK_START struct _MrvlIEtypes_NumProbes_t {
|
typedef MLAN_PACK_START struct _MrvlIEtypes_NumProbes_t {
|
||||||
/** Header */
|
/** Header */
|
||||||
|
@ -7255,6 +7276,14 @@ typedef MLAN_PACK_START struct _HostCmd_DS_STA_CONFIGURE {
|
||||||
t_u8 tlv_buffer[];
|
t_u8 tlv_buffer[];
|
||||||
/**MrvlIEtypes_channel_band_t band_channel; */
|
/**MrvlIEtypes_channel_band_t band_channel; */
|
||||||
} MLAN_PACK_END HostCmd_DS_STA_CONFIGURE;
|
} MLAN_PACK_END HostCmd_DS_STA_CONFIGURE;
|
||||||
|
|
||||||
|
/** Event_Link_Lost structure */
|
||||||
|
typedef MLAN_PACK_START struct _Event_Link_Lost {
|
||||||
|
/** Reason code */
|
||||||
|
t_u16 reason_code;
|
||||||
|
/** bssid of Link Lost AP */
|
||||||
|
t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
} MLAN_PACK_END Event_Link_Lost;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** HostCmd_DS_AUTO_TX structure */
|
/** HostCmd_DS_AUTO_TX structure */
|
||||||
|
|
|
@ -615,6 +615,7 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
||||||
priv->hotspot_cfg = 0;
|
priv->hotspot_cfg = 0;
|
||||||
|
|
||||||
priv->intf_hr_len = pmadapter->ops.intf_header_len;
|
priv->intf_hr_len = pmadapter->ops.intf_header_len;
|
||||||
|
priv->multi_ap_flag = 0;
|
||||||
memset(pmadapter, &priv->chan_rep_req, 0, sizeof(priv->chan_rep_req));
|
memset(pmadapter, &priv->chan_rep_req, 0, sizeof(priv->chan_rep_req));
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
if (IS_USB(pmadapter->card_type)) {
|
if (IS_USB(pmadapter->card_type)) {
|
||||||
|
|
|
@ -357,6 +357,7 @@ enum _mlan_ioctl_req_id {
|
||||||
MLAN_OID_MISC_TP_STATE = 0x0020007D,
|
MLAN_OID_MISC_TP_STATE = 0x0020007D,
|
||||||
MLAN_OID_MISC_HAL_PHY_CFG = 0x0020007E,
|
MLAN_OID_MISC_HAL_PHY_CFG = 0x0020007E,
|
||||||
MLAN_OID_MISC_RF_TEST_HE_POWER = 0X0020007F,
|
MLAN_OID_MISC_RF_TEST_HE_POWER = 0X0020007F,
|
||||||
|
MLAN_OID_MISC_MULTI_AP_CFG = 0x00200080,
|
||||||
#ifdef UAP_SUPPORT
|
#ifdef UAP_SUPPORT
|
||||||
MLAN_OID_MISC_WACP_MODE = 0x00200081,
|
MLAN_OID_MISC_WACP_MODE = 0x00200081,
|
||||||
#endif
|
#endif
|
||||||
|
@ -1185,6 +1186,8 @@ typedef struct _mlan_uap_bss_param {
|
||||||
|
|
||||||
/** uap host based config */
|
/** uap host based config */
|
||||||
t_u32 uap_host_based_config;
|
t_u32 uap_host_based_config;
|
||||||
|
/** multi ap flag */
|
||||||
|
t_u8 multi_ap_flag;
|
||||||
} mlan_uap_bss_param, *pmlan_uap_bss_param;
|
} mlan_uap_bss_param, *pmlan_uap_bss_param;
|
||||||
|
|
||||||
/** mlan_uap_scan_channels */
|
/** mlan_uap_scan_channels */
|
||||||
|
@ -6188,6 +6191,8 @@ typedef struct _mlan_ds_misc_cfg {
|
||||||
#endif
|
#endif
|
||||||
/** Hotspot config param set */
|
/** Hotspot config param set */
|
||||||
t_u32 hotspot_cfg;
|
t_u32 hotspot_cfg;
|
||||||
|
/** Multi AP flag */
|
||||||
|
t_u8 multi_ap_flag;
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
ExtCap_t ext_cap;
|
ExtCap_t ext_cap;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1045,6 +1045,7 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
||||||
MrvlIEtypes_HostMlme_t *host_mlme_tlv = MNULL;
|
MrvlIEtypes_HostMlme_t *host_mlme_tlv = MNULL;
|
||||||
MrvlIEtypes_PrevBssid_t *prev_bssid_tlv = MNULL;
|
MrvlIEtypes_PrevBssid_t *prev_bssid_tlv = MNULL;
|
||||||
t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = {0};
|
t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = {0};
|
||||||
|
MrvlIEtypes_MultiAp_t *multi_ap_tlv = MNULL;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -1055,6 +1056,9 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
||||||
|
|
||||||
/* Save so we know which BSS Desc to use in the response handler */
|
/* Save so we know which BSS Desc to use in the response handler */
|
||||||
pmpriv->pattempted_bss_desc = pbss_desc;
|
pmpriv->pattempted_bss_desc = pbss_desc;
|
||||||
|
memcpy_ext(pmpriv->adapter, &pmpriv->curr_bss_params.attemp_bssid,
|
||||||
|
pbss_desc->mac_address, MLAN_MAC_ADDR_LENGTH,
|
||||||
|
MLAN_MAC_ADDR_LENGTH);
|
||||||
/* clear assoc_rsp_size */
|
/* clear assoc_rsp_size */
|
||||||
pmpriv->assoc_rsp_size = 0;
|
pmpriv->assoc_rsp_size = 0;
|
||||||
pmpriv->assoc_req_size = 0;
|
pmpriv->assoc_req_size = 0;
|
||||||
|
@ -1474,6 +1478,18 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
||||||
pos += sizeof(prev_bssid_tlv->header) + MLAN_MAC_ADDR_LENGTH;
|
pos += sizeof(prev_bssid_tlv->header) + MLAN_MAC_ADDR_LENGTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pmpriv->multi_ap_flag) {
|
||||||
|
multi_ap_tlv = (MrvlIEtypes_MultiAp_t *)pos;
|
||||||
|
multi_ap_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_MULTI_AP);
|
||||||
|
multi_ap_tlv->header.len = sizeof(multi_ap_tlv->flag);
|
||||||
|
multi_ap_tlv->flag = pmpriv->multi_ap_flag;
|
||||||
|
PRINTM(MINFO, " TLV multi_ap_flag : 0x%x\n",
|
||||||
|
multi_ap_tlv->flag);
|
||||||
|
pos += sizeof(multi_ap_tlv->header) + multi_ap_tlv->header.len;
|
||||||
|
multi_ap_tlv->header.len =
|
||||||
|
wlan_cpu_to_le16(sizeof(multi_ap_tlv->flag));
|
||||||
|
}
|
||||||
|
|
||||||
if (wlan_11d_create_dnld_countryinfo(pmpriv, pbss_desc->bss_band)) {
|
if (wlan_11d_create_dnld_countryinfo(pmpriv, pbss_desc->bss_band)) {
|
||||||
PRINTM(MERROR, "Dnld_countryinfo_11d failed\n");
|
PRINTM(MERROR, "Dnld_countryinfo_11d failed\n");
|
||||||
ret = MLAN_STATUS_FAILURE;
|
ret = MLAN_STATUS_FAILURE;
|
||||||
|
@ -1658,11 +1674,19 @@ mlan_status wlan_ret_802_11_associate(mlan_private *pmpriv,
|
||||||
pmpriv->pattempted_bss_desc->mac_address,
|
pmpriv->pattempted_bss_desc->mac_address,
|
||||||
MLAN_MAC_ADDR_LENGTH))
|
MLAN_MAC_ADDR_LENGTH))
|
||||||
wlan_reset_connect_state(pmpriv, MTRUE);
|
wlan_reset_connect_state(pmpriv, MTRUE);
|
||||||
else
|
else {
|
||||||
|
memcpy_ext(
|
||||||
|
pmpriv->adapter,
|
||||||
|
&pmpriv->curr_bss_params.attemp_bssid,
|
||||||
|
pmpriv->curr_bss_params.bss_descriptor
|
||||||
|
.mac_address,
|
||||||
|
MLAN_MAC_ADDR_LENGTH,
|
||||||
|
MLAN_MAC_ADDR_LENGTH);
|
||||||
wlan_recv_event(
|
wlan_recv_event(
|
||||||
pmpriv,
|
pmpriv,
|
||||||
MLAN_EVENT_ID_DRV_ASSOC_FAILURE_REPORT,
|
MLAN_EVENT_ID_DRV_ASSOC_FAILURE_REPORT,
|
||||||
MNULL);
|
MNULL);
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
wlan_reset_connect_state(pmpriv, MTRUE);
|
wlan_reset_connect_state(pmpriv, MTRUE);
|
||||||
pmpriv->adapter->dbg.num_cmd_assoc_failure++;
|
pmpriv->adapter->dbg.num_cmd_assoc_failure++;
|
||||||
|
@ -1689,6 +1713,7 @@ mlan_status wlan_ret_802_11_associate(mlan_private *pmpriv,
|
||||||
|
|
||||||
/* Send a Media Connected event, according to the Spec */
|
/* Send a Media Connected event, according to the Spec */
|
||||||
pmpriv->media_connected = MTRUE;
|
pmpriv->media_connected = MTRUE;
|
||||||
|
pmpriv->multi_ap_flag = 0;
|
||||||
pmpriv->adapter->pps_uapsd_mode = MFALSE;
|
pmpriv->adapter->pps_uapsd_mode = MFALSE;
|
||||||
pmpriv->adapter->tx_lock_flag = MFALSE;
|
pmpriv->adapter->tx_lock_flag = MFALSE;
|
||||||
pmpriv->adapter->delay_null_pkt = MFALSE;
|
pmpriv->adapter->delay_null_pkt = MFALSE;
|
||||||
|
@ -1878,7 +1903,6 @@ done:
|
||||||
pioctl_req->status_code = MLAN_ERROR_NO_ERROR;
|
pioctl_req->status_code = MLAN_ERROR_NO_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -863,7 +863,10 @@ typedef struct {
|
||||||
t_u8 data_rates[WLAN_SUPPORTED_RATES];
|
t_u8 data_rates[WLAN_SUPPORTED_RATES];
|
||||||
/** Host MLME flag*/
|
/** Host MLME flag*/
|
||||||
t_u8 host_mlme;
|
t_u8 host_mlme;
|
||||||
|
/** prev_bssid */
|
||||||
mlan_802_11_mac_addr prev_bssid;
|
mlan_802_11_mac_addr prev_bssid;
|
||||||
|
/** attemp_bssid */
|
||||||
|
mlan_802_11_mac_addr attemp_bssid;
|
||||||
t_u8 use_mfp;
|
t_u8 use_mfp;
|
||||||
} current_bss_params_t;
|
} current_bss_params_t;
|
||||||
|
|
||||||
|
@ -1327,6 +1330,7 @@ typedef struct _mlan_private {
|
||||||
/** IP address */
|
/** IP address */
|
||||||
t_u8 ip_addr[IPADDR_LEN];
|
t_u8 ip_addr[IPADDR_LEN];
|
||||||
t_u32 hotspot_cfg;
|
t_u32 hotspot_cfg;
|
||||||
|
t_u8 multi_ap_flag;
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
ExtCap_t ext_cap;
|
ExtCap_t ext_cap;
|
||||||
ExtCap_t def_ext_cap;
|
ExtCap_t def_ext_cap;
|
||||||
|
@ -1580,6 +1584,8 @@ struct _sta_node {
|
||||||
/** station band mode */
|
/** station band mode */
|
||||||
t_u16 bandmode;
|
t_u16 bandmode;
|
||||||
sta_stats stats;
|
sta_stats stats;
|
||||||
|
/** station aid */
|
||||||
|
t_u16 aid;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 802.11h State information kept in the 'mlan_adapter' driver structure */
|
/** 802.11h State information kept in the 'mlan_adapter' driver structure */
|
||||||
|
@ -3949,6 +3955,8 @@ static inline t_u8 wlan_is_port_ready(pmlan_adapter pmadapter, t_u32 port_index)
|
||||||
return MTRUE;
|
return MTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
mlan_status wlan_check_easymesh_pkt(mlan_private *priv, pmlan_buffer pmbuf,
|
||||||
|
RxPD *prx_pd);
|
||||||
|
|
||||||
#ifdef UAP_SUPPORT
|
#ifdef UAP_SUPPORT
|
||||||
mlan_status wlan_process_uap_rx_packet(mlan_private *priv, pmlan_buffer pmbuf);
|
mlan_status wlan_process_uap_rx_packet(mlan_private *priv, pmlan_buffer pmbuf);
|
||||||
|
@ -4096,6 +4104,9 @@ mlan_status wlan_set_drvdbg(pmlan_adapter pmadapter,
|
||||||
mlan_status wlan_misc_hotspot_cfg(pmlan_adapter pmadapter,
|
mlan_status wlan_misc_hotspot_cfg(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req);
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
|
||||||
|
mlan_status wlan_misc_multi_ap_cfg(pmlan_adapter pmadapter,
|
||||||
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
|
||||||
mlan_status wlan_misc_ext_capa_cfg(pmlan_adapter pmadapter,
|
mlan_status wlan_misc_ext_capa_cfg(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req);
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
|
||||||
|
|
|
@ -3496,6 +3496,32 @@ mlan_status wlan_misc_hotspot_cfg(pmlan_adapter pmadapter,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set multi ap flag
|
||||||
|
*
|
||||||
|
* @param pmadapter A pointer to mlan_adapter structure
|
||||||
|
* @param pioctl_req A pointer to ioctl request buffer
|
||||||
|
*
|
||||||
|
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||||
|
*/
|
||||||
|
mlan_status wlan_misc_multi_ap_cfg(pmlan_adapter pmadapter,
|
||||||
|
pmlan_ioctl_req pioctl_req)
|
||||||
|
{
|
||||||
|
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
|
mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||||
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
if (MLAN_ACT_GET == pioctl_req->action)
|
||||||
|
misc->param.multi_ap_flag = pmpriv->multi_ap_flag;
|
||||||
|
else if (MLAN_ACT_SET == pioctl_req->action)
|
||||||
|
pmpriv->multi_ap_flag = misc->param.multi_ap_flag;
|
||||||
|
|
||||||
|
LEAVE();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
/**
|
/**
|
||||||
* @brief This function check if we should enable beacon protection support
|
* @brief This function check if we should enable beacon protection support
|
||||||
|
|
|
@ -1360,8 +1360,8 @@ static mlan_status wlan_decode_rx_packet(mlan_adapter *pmadapter,
|
||||||
case MLAN_TYPE_EVENT:
|
case MLAN_TYPE_EVENT:
|
||||||
PRINTM(MINFO, "--- Rx: Event ---\n");
|
PRINTM(MINFO, "--- Rx: Event ---\n");
|
||||||
|
|
||||||
event = *(t_u32 *)&pmbuf->pbuf[MIN(
|
event = *(t_u32 *)&pmbuf->pbuf[pmbuf->data_offset +
|
||||||
pmbuf->data_offset + SDIO_INTF_HEADER_LEN, UINT_MAX)];
|
SDIO_INTF_HEADER_LEN];
|
||||||
pmadapter->event_cause = wlan_le32_to_cpu(event);
|
pmadapter->event_cause = wlan_le32_to_cpu(event);
|
||||||
if ((pmadapter->upld_len > MLAN_EVENT_HEADER_LEN) &&
|
if ((pmadapter->upld_len > MLAN_EVENT_HEADER_LEN) &&
|
||||||
((pmadapter->upld_len - MLAN_EVENT_HEADER_LEN) <
|
((pmadapter->upld_len - MLAN_EVENT_HEADER_LEN) <
|
||||||
|
|
|
@ -406,6 +406,7 @@ t_void wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
||||||
priv->rxpd_rate_info = 0;
|
priv->rxpd_rate_info = 0;
|
||||||
priv->max_amsdu = 0;
|
priv->max_amsdu = 0;
|
||||||
priv->amsdu_disable = MFALSE;
|
priv->amsdu_disable = MFALSE;
|
||||||
|
priv->multi_ap_flag = 0;
|
||||||
wlan_coex_ampdu_rxwinsize(pmadapter);
|
wlan_coex_ampdu_rxwinsize(pmadapter);
|
||||||
|
|
||||||
priv->sec_info.ewpa_enabled = MFALSE;
|
priv->sec_info.ewpa_enabled = MFALSE;
|
||||||
|
@ -675,6 +676,7 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
||||||
t_u8 radar_chan;
|
t_u8 radar_chan;
|
||||||
t_u8 bandwidth;
|
t_u8 bandwidth;
|
||||||
t_u16 enable = 0;
|
t_u16 enable = 0;
|
||||||
|
Event_Link_Lost *link_lost_evt = MNULL;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -756,12 +758,51 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EVENT_LINK_LOST:
|
case EVENT_LINK_LOST:
|
||||||
reason_code = wlan_le16_to_cpu(*(t_u16 *)(pmbuf->pbuf +
|
if (pmbuf && (pmbuf->data_len >=
|
||||||
pmbuf->data_offset +
|
sizeof(eventcause) + sizeof(Event_Link_Lost))) {
|
||||||
sizeof(eventcause)));
|
link_lost_evt = (Event_Link_Lost *)(pmbuf->pbuf +
|
||||||
PRINTM(MMSG, "wlan: EVENT: Link lost (reason 0x%x)\n",
|
pmbuf->data_offset +
|
||||||
reason_code);
|
sizeof(eventcause));
|
||||||
pmpriv->disconnect_reason_code = reason_code;
|
PRINTM(MMSG,
|
||||||
|
"wlan: EVENT: Link lost (reason 0x%x) bssid: " MACSTR
|
||||||
|
"\n",
|
||||||
|
link_lost_evt->reason_code,
|
||||||
|
MAC2STR(link_lost_evt->bssid));
|
||||||
|
pmpriv->disconnect_reason_code =
|
||||||
|
link_lost_evt->reason_code;
|
||||||
|
if (memcmp(pmpriv->adapter, link_lost_evt->bssid,
|
||||||
|
&pmpriv->curr_bss_params.attemp_bssid,
|
||||||
|
MLAN_MAC_ADDR_LENGTH)) {
|
||||||
|
PRINTM(MMSG, "wlan: skip link lost event\n");
|
||||||
|
PRINTM(MMSG, "pattempted_bssid: " MACSTR "\n",
|
||||||
|
MAC2STR(&pmpriv->curr_bss_params
|
||||||
|
.attemp_bssid));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (memcmp(pmpriv->adapter,
|
||||||
|
pmpriv->curr_bss_params.bss_descriptor
|
||||||
|
.mac_address,
|
||||||
|
&pmpriv->curr_bss_params.attemp_bssid,
|
||||||
|
MLAN_MAC_ADDR_LENGTH)) {
|
||||||
|
PRINTM(MMSG, "wlan: skip link lost event\n");
|
||||||
|
PRINTM(MMSG,
|
||||||
|
"pattempted_bssid: " MACSTR
|
||||||
|
" curr_bssid:" MACSTR "\n",
|
||||||
|
MAC2STR(&pmpriv->curr_bss_params
|
||||||
|
.attemp_bssid),
|
||||||
|
MAC2STR(pmpriv->curr_bss_params
|
||||||
|
.bss_descriptor
|
||||||
|
.mac_address));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
reason_code = wlan_le16_to_cpu(
|
||||||
|
*(t_u16 *)(pmbuf->pbuf + pmbuf->data_offset +
|
||||||
|
sizeof(eventcause)));
|
||||||
|
PRINTM(MMSG, "wlan: EVENT: Link lost (reason 0x%x)\n",
|
||||||
|
reason_code);
|
||||||
|
pmpriv->disconnect_reason_code = reason_code;
|
||||||
|
}
|
||||||
pmadapter->dbg.num_event_link_lost++;
|
pmadapter->dbg.num_event_link_lost++;
|
||||||
wlan_handle_disconnect_event(pmpriv);
|
wlan_handle_disconnect_event(pmpriv);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -5164,6 +5164,9 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
||||||
case MLAN_OID_MISC_HOTSPOT_CFG:
|
case MLAN_OID_MISC_HOTSPOT_CFG:
|
||||||
status = wlan_misc_hotspot_cfg(pmadapter, pioctl_req);
|
status = wlan_misc_hotspot_cfg(pmadapter, pioctl_req);
|
||||||
break;
|
break;
|
||||||
|
case MLAN_OID_MISC_MULTI_AP_CFG:
|
||||||
|
status = wlan_misc_multi_ap_cfg(pmadapter, pioctl_req);
|
||||||
|
break;
|
||||||
case MLAN_OID_MISC_OTP_USER_DATA:
|
case MLAN_OID_MISC_OTP_USER_DATA:
|
||||||
status = wlan_misc_otp_user_data(pmadapter, pioctl_req);
|
status = wlan_misc_otp_user_data(pmadapter, pioctl_req);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -719,6 +719,13 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
||||||
rxpd_rate_info_orig, prx_pd->rate_info);
|
rxpd_rate_info_orig, prx_pd->rate_info);
|
||||||
}
|
}
|
||||||
rx_pkt_type = prx_pd->rx_pkt_type;
|
rx_pkt_type = prx_pd->rx_pkt_type;
|
||||||
|
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH) {
|
||||||
|
PRINTM_NETINTF(MDAT_D, priv);
|
||||||
|
PRINTM(MDAT_D, "Easymesh flags : 0x%x\n", prx_pd->flags);
|
||||||
|
ret = wlan_check_easymesh_pkt(priv, pmbuf, prx_pd);
|
||||||
|
if (ret != MLAN_STATUS_SUCCESS)
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset);
|
prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset);
|
||||||
|
|
||||||
if ((prx_pd->rx_pkt_offset + prx_pd->rx_pkt_length) !=
|
if ((prx_pd->rx_pkt_offset + prx_pd->rx_pkt_length) !=
|
||||||
|
|
|
@ -127,6 +127,11 @@ t_void *wlan_ops_sta_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
||||||
}
|
}
|
||||||
if (pmbuf->flags & MLAN_BUF_FLAG_TDLS)
|
if (pmbuf->flags & MLAN_BUF_FLAG_TDLS)
|
||||||
plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_TDLS_PACKET;
|
plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_TDLS_PACKET;
|
||||||
|
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH) {
|
||||||
|
plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_EASYMESH;
|
||||||
|
memcpy_ext(pmpriv->adapter, plocal_tx_pd->ra_mac, pmbuf->mac,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
|
}
|
||||||
/* Offset of actual data */
|
/* Offset of actual data */
|
||||||
plocal_tx_pd->tx_pkt_offset = (t_u16)(
|
plocal_tx_pd->tx_pkt_offset = (t_u16)(
|
||||||
(t_ptr)pmbuf->pbuf + pmbuf->data_offset - (t_ptr)plocal_tx_pd);
|
(t_ptr)pmbuf->pbuf + pmbuf->data_offset - (t_ptr)plocal_tx_pd);
|
||||||
|
|
|
@ -446,3 +446,57 @@ t_void wlan_process_bypass_tx(pmlan_adapter pmadapter)
|
||||||
!wlan_bypass_tx_list_empty(pmadapter));
|
!wlan_bypass_tx_list_empty(pmadapter));
|
||||||
LEAVE();
|
LEAVE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function will convert 802.11 header to 802.3 header
|
||||||
|
and save the backhaul station aid to pmbuf
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
* @param pmbuf A pointer to mlan_buffer
|
||||||
|
* @param prx_pd A pointer to RxPD
|
||||||
|
*
|
||||||
|
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||||
|
*/
|
||||||
|
mlan_status wlan_check_easymesh_pkt(mlan_private *priv, pmlan_buffer pmbuf,
|
||||||
|
RxPD *prx_pd)
|
||||||
|
{
|
||||||
|
Eth803Hdr_t *eth_header = MNULL;
|
||||||
|
sta_node *sta_ptr = MNULL;
|
||||||
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
t_u8 *pos = MNULL;
|
||||||
|
t_u32 tmp = 0;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
pos = (t_u8 *)prx_pd + prx_pd->rx_pkt_offset;
|
||||||
|
eth_header = (Eth803Hdr_t *)pos;
|
||||||
|
|
||||||
|
PRINTM(MDAT_D,
|
||||||
|
"Rx Easymesh ETH header destination address: " FULL_MACSTR
|
||||||
|
"\nETH header source address: " FULL_MACSTR "\n",
|
||||||
|
FULL_MAC2STR(eth_header->dest_addr),
|
||||||
|
FULL_MAC2STR(eth_header->src_addr));
|
||||||
|
|
||||||
|
if (priv->bss_type == MLAN_BSS_TYPE_UAP) {
|
||||||
|
pmbuf->flags |= MLAN_BUF_FLAG_EASYMESH;
|
||||||
|
memcpy_ext(priv->adapter, pmbuf->mac, prx_pd->ta_mac,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
|
|
||||||
|
sta_ptr = wlan_get_station_entry(priv, prx_pd->ta_mac);
|
||||||
|
if (!sta_ptr) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"Easymesh Error! Can't find station in the station list\n");
|
||||||
|
ret = MLAN_STATUS_FAILURE;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Save station aid to pmbuf and send it to moal */
|
||||||
|
tmp = (t_u32)sta_ptr->aid;
|
||||||
|
pmbuf->priority |= (tmp << 24);
|
||||||
|
PRINTM(MDAT_D, "Easymesh: Rx for VLAN " FULL_MACSTR "\n",
|
||||||
|
FULL_MAC2STR(prx_pd->ta_mac));
|
||||||
|
}
|
||||||
|
done:
|
||||||
|
LEAVE();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
|
@ -705,6 +705,7 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
||||||
MrvlIETypes_HTCap_t *tlv_htcap = MNULL;
|
MrvlIETypes_HTCap_t *tlv_htcap = MNULL;
|
||||||
MrvlIEtypes_wmm_parameter_t *tlv_wmm_parameter = MNULL;
|
MrvlIEtypes_wmm_parameter_t *tlv_wmm_parameter = MNULL;
|
||||||
MrvlIEtypes_preamble_t *tlv_preamble = MNULL;
|
MrvlIEtypes_preamble_t *tlv_preamble = MNULL;
|
||||||
|
MrvlIEtypes_MultiAp_t *tlv_multi_ap = MNULL;
|
||||||
|
|
||||||
t_u32 cmd_size = 0;
|
t_u32 cmd_size = 0;
|
||||||
t_u8 zero_mac[] = {0, 0, 0, 0, 0, 0};
|
t_u8 zero_mac[] = {0, 0, 0, 0, 0, 0};
|
||||||
|
@ -1433,6 +1434,16 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
||||||
cmd_size += sizeof(MrvlIEtypes_preamble_t);
|
cmd_size += sizeof(MrvlIEtypes_preamble_t);
|
||||||
tlv += sizeof(MrvlIEtypes_preamble_t);
|
tlv += sizeof(MrvlIEtypes_preamble_t);
|
||||||
}
|
}
|
||||||
|
if (bss->param.bss_config.multi_ap_flag) {
|
||||||
|
/** Add multi AP tlv here */
|
||||||
|
tlv_multi_ap = (MrvlIEtypes_MultiAp_t *)tlv;
|
||||||
|
tlv_multi_ap->header.type = wlan_cpu_to_le16(TLV_TYPE_MULTI_AP);
|
||||||
|
tlv_multi_ap->header.len =
|
||||||
|
wlan_cpu_to_le16(sizeof(tlv_multi_ap->flag));
|
||||||
|
tlv_multi_ap->flag = bss->param.bss_config.multi_ap_flag;
|
||||||
|
cmd_size += sizeof(MrvlIEtypes_MultiAp_t);
|
||||||
|
tlv += sizeof(MrvlIEtypes_MultiAp_t);
|
||||||
|
}
|
||||||
cmd->size = (t_u16)wlan_cpu_to_le16(cmd_size);
|
cmd->size = (t_u16)wlan_cpu_to_le16(cmd_size);
|
||||||
PRINTM(MCMND, "AP config: cmd_size=%d\n", cmd_size);
|
PRINTM(MCMND, "AP config: cmd_size=%d\n", cmd_size);
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -4369,6 +4380,8 @@ static mlan_status wlan_uap_cmd_add_station(pmlan_private pmpriv,
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return MLAN_STATUS_FAILURE;
|
return MLAN_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
/* Save station aid for multi-ap */
|
||||||
|
sta_ptr->aid = bss->param.sta_info.aid;
|
||||||
memcpy_ext(pmadapter, new_sta->peer_mac, bss->param.sta_info.peer_mac,
|
memcpy_ext(pmadapter, new_sta->peer_mac, bss->param.sta_info.peer_mac,
|
||||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
if (cmd_action != HostCmd_ACT_ADD_STA)
|
if (cmd_action != HostCmd_ACT_ADD_STA)
|
||||||
|
|
|
@ -246,6 +246,11 @@ t_void *wlan_ops_uap_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
||||||
plocal_tx_pd->tx_pkt_type = (t_u16)pkt_type;
|
plocal_tx_pd->tx_pkt_type = (t_u16)pkt_type;
|
||||||
plocal_tx_pd->tx_control = tx_control;
|
plocal_tx_pd->tx_control = tx_control;
|
||||||
}
|
}
|
||||||
|
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH) {
|
||||||
|
plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_EASYMESH;
|
||||||
|
memcpy_ext(pmpriv->adapter, plocal_tx_pd->ra_mac, pmbuf->mac,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
|
}
|
||||||
|
|
||||||
if (pmbuf->flags & MLAN_BUF_FLAG_TX_CTRL) {
|
if (pmbuf->flags & MLAN_BUF_FLAG_TX_CTRL) {
|
||||||
if (pmbuf->u.tx_info.data_rate) {
|
if (pmbuf->u.tx_info.data_rate) {
|
||||||
|
@ -388,6 +393,14 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
||||||
}
|
}
|
||||||
|
|
||||||
rx_pkt_type = prx_pd->rx_pkt_type;
|
rx_pkt_type = prx_pd->rx_pkt_type;
|
||||||
|
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH) {
|
||||||
|
PRINTM_NETINTF(MDAT_D, priv);
|
||||||
|
PRINTM(MDAT_D, "UAP Rx Easymesh pkt flags : 0x%x\n",
|
||||||
|
prx_pd->flags);
|
||||||
|
ret = wlan_check_easymesh_pkt(priv, pmbuf, prx_pd);
|
||||||
|
if (ret != MLAN_STATUS_SUCCESS)
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset);
|
prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset);
|
||||||
|
|
||||||
PRINTM(MINFO,
|
PRINTM(MINFO,
|
||||||
|
@ -549,7 +562,11 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sta_ptr = wlan_get_station_entry(priv, prx_pkt->eth803_hdr.src_addr);
|
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH)
|
||||||
|
sta_ptr = wlan_get_station_entry(priv, prx_pd->ta_mac);
|
||||||
|
else
|
||||||
|
sta_ptr = wlan_get_station_entry(priv,
|
||||||
|
prx_pkt->eth803_hdr.src_addr);
|
||||||
if (sta_ptr) {
|
if (sta_ptr) {
|
||||||
sta_ptr->snr = prx_pd->snr;
|
sta_ptr->snr = prx_pd->snr;
|
||||||
sta_ptr->nf = prx_pd->nf;
|
sta_ptr->nf = prx_pd->nf;
|
||||||
|
@ -569,8 +586,12 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
||||||
wlan_process_uap_rx_packet(priv, pmbuf);
|
wlan_process_uap_rx_packet(priv, pmbuf);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
memcpy_ext(pmadapter, ta, prx_pkt->eth803_hdr.src_addr,
|
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH)
|
||||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
memcpy_ext(pmadapter, ta, prx_pd->ta_mac, MLAN_MAC_ADDR_LENGTH,
|
||||||
|
MLAN_MAC_ADDR_LENGTH);
|
||||||
|
else
|
||||||
|
memcpy_ext(pmadapter, ta, prx_pkt->eth803_hdr.src_addr,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
if ((rx_pkt_type != PKT_TYPE_BAR) && (prx_pd->priority < MAX_NUM_TID)) {
|
if ((rx_pkt_type != PKT_TYPE_BAR) && (prx_pd->priority < MAX_NUM_TID)) {
|
||||||
sta_ptr = wlan_get_station_entry(priv, ta);
|
sta_ptr = wlan_get_station_entry(priv, ta);
|
||||||
if (sta_ptr) {
|
if (sta_ptr) {
|
||||||
|
|
|
@ -2159,8 +2159,13 @@ t_void wlan_wmm_add_buf_txqueue(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||||
&priv->wmm.tid_tbl_ptr[tid_down].ra_list, MNULL,
|
&priv->wmm.tid_tbl_ptr[tid_down].ra_list, MNULL,
|
||||||
MNULL);
|
MNULL);
|
||||||
} else {
|
} else {
|
||||||
memcpy_ext(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset,
|
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH)
|
||||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
memcpy_ext(pmadapter, ra, pmbuf->mac,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
|
else
|
||||||
|
memcpy_ext(pmadapter, ra,
|
||||||
|
pmbuf->pbuf + pmbuf->data_offset,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
/** put multicast/broadcast packet in the same ralist */
|
/** put multicast/broadcast packet in the same ralist */
|
||||||
if (ra[0] & 0x01)
|
if (ra[0] & 0x01)
|
||||||
memset(pmadapter, ra, 0xff, sizeof(ra));
|
memset(pmadapter, ra, 0xff, sizeof(ra));
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#define _MLAN_DECL_H_
|
#define _MLAN_DECL_H_
|
||||||
|
|
||||||
/** MLAN release version */
|
/** MLAN release version */
|
||||||
#define MLAN_RELEASE_VERSION "408"
|
#define MLAN_RELEASE_VERSION "408.p2"
|
||||||
|
|
||||||
/** Re-define generic data types for MLAN/MOAL */
|
/** Re-define generic data types for MLAN/MOAL */
|
||||||
/** Signed char (1-byte) */
|
/** Signed char (1-byte) */
|
||||||
|
@ -621,6 +621,8 @@ typedef enum {
|
||||||
|
|
||||||
#define MLAN_BUF_FLAG_TX_CTRL MBIT(14)
|
#define MLAN_BUF_FLAG_TX_CTRL MBIT(14)
|
||||||
|
|
||||||
|
#define MLAN_BUF_FLAG_EASYMESH MBIT(16)
|
||||||
|
|
||||||
#define MLAN_BUF_FLAG_MC_AGGR_PKT MBIT(17)
|
#define MLAN_BUF_FLAG_MC_AGGR_PKT MBIT(17)
|
||||||
|
|
||||||
#ifdef DEBUG_LEVEL1
|
#ifdef DEBUG_LEVEL1
|
||||||
|
@ -1335,6 +1337,8 @@ typedef struct _mlan_buffer {
|
||||||
t_u32 extra_ts_sec;
|
t_u32 extra_ts_sec;
|
||||||
/** Time stamp when packet is dequed from rx_q(micro seconds) */
|
/** Time stamp when packet is dequed from rx_q(micro seconds) */
|
||||||
t_u32 extra_ts_usec;
|
t_u32 extra_ts_usec;
|
||||||
|
/** When TX ra mac address, When Rx Ta mac address*/
|
||||||
|
t_u8 mac[MLAN_MAC_ADDR_LENGTH];
|
||||||
/** Fields below are valid for MLAN module only */
|
/** Fields below are valid for MLAN module only */
|
||||||
/** Pointer to parent mlan_buffer */
|
/** Pointer to parent mlan_buffer */
|
||||||
struct _mlan_buffer *pparent;
|
struct _mlan_buffer *pparent;
|
||||||
|
|
|
@ -357,6 +357,7 @@ enum _mlan_ioctl_req_id {
|
||||||
MLAN_OID_MISC_TP_STATE = 0x0020007D,
|
MLAN_OID_MISC_TP_STATE = 0x0020007D,
|
||||||
MLAN_OID_MISC_HAL_PHY_CFG = 0x0020007E,
|
MLAN_OID_MISC_HAL_PHY_CFG = 0x0020007E,
|
||||||
MLAN_OID_MISC_RF_TEST_HE_POWER = 0X0020007F,
|
MLAN_OID_MISC_RF_TEST_HE_POWER = 0X0020007F,
|
||||||
|
MLAN_OID_MISC_MULTI_AP_CFG = 0x00200080,
|
||||||
#ifdef UAP_SUPPORT
|
#ifdef UAP_SUPPORT
|
||||||
MLAN_OID_MISC_WACP_MODE = 0x00200081,
|
MLAN_OID_MISC_WACP_MODE = 0x00200081,
|
||||||
#endif
|
#endif
|
||||||
|
@ -1185,6 +1186,8 @@ typedef struct _mlan_uap_bss_param {
|
||||||
|
|
||||||
/** uap host based config */
|
/** uap host based config */
|
||||||
t_u32 uap_host_based_config;
|
t_u32 uap_host_based_config;
|
||||||
|
/** multi ap flag */
|
||||||
|
t_u8 multi_ap_flag;
|
||||||
} mlan_uap_bss_param, *pmlan_uap_bss_param;
|
} mlan_uap_bss_param, *pmlan_uap_bss_param;
|
||||||
|
|
||||||
/** mlan_uap_scan_channels */
|
/** mlan_uap_scan_channels */
|
||||||
|
@ -6188,6 +6191,8 @@ typedef struct _mlan_ds_misc_cfg {
|
||||||
#endif
|
#endif
|
||||||
/** Hotspot config param set */
|
/** Hotspot config param set */
|
||||||
t_u32 hotspot_cfg;
|
t_u32 hotspot_cfg;
|
||||||
|
/** Multi AP flag */
|
||||||
|
t_u8 multi_ap_flag;
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
ExtCap_t ext_cap;
|
ExtCap_t ext_cap;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -66,6 +66,10 @@
|
||||||
|
|
||||||
#define MRVL_PKT_TYPE_MGMT_FRAME 0xE5
|
#define MRVL_PKT_TYPE_MGMT_FRAME 0xE5
|
||||||
|
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
#define MRVL_PKT_TYPE_MGMT_EASYMESH 0xCF
|
||||||
|
#endif
|
||||||
|
|
||||||
mlan_status woal_cfg80211_set_key(moal_private *priv, t_u8 is_enable_wep,
|
mlan_status woal_cfg80211_set_key(moal_private *priv, t_u8 is_enable_wep,
|
||||||
t_u32 cipher, const t_u8 *key, int key_len,
|
t_u32 cipher, const t_u8 *key, int key_len,
|
||||||
const t_u8 *seq, int seq_len, t_u8 key_index,
|
const t_u8 *seq, int seq_len, t_u8 key_index,
|
||||||
|
|
|
@ -2900,6 +2900,11 @@ static int woal_cfg80211_subcmd_link_statistic_get(struct wiphy *wiphy,
|
||||||
t_u64 inter_msec = 0;
|
t_u64 inter_msec = 0;
|
||||||
t_u64 max_msec = (t_u64)24 * (t_u64)24 * (t_u64)3600 * (t_u64)1000;
|
t_u64 max_msec = (t_u64)24 * (t_u64)24 * (t_u64)3600 * (t_u64)1000;
|
||||||
moal_handle *handle = priv->phandle;
|
moal_handle *handle = priv->phandle;
|
||||||
|
if (!priv->media_connected) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"Block get_link_statistics in disconnected state!\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(t_u32) + BUF_MAXLEN);
|
req = woal_alloc_mlan_ioctl_req(sizeof(t_u32) + BUF_MAXLEN);
|
||||||
|
|
|
@ -2913,6 +2913,116 @@ done:
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(UAP_SUPPORT)
|
||||||
|
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
||||||
|
/**
|
||||||
|
* @brief easymesh uap Set/Get multi AP mode handler
|
||||||
|
*
|
||||||
|
* @param priv A pointer to moal_private structure
|
||||||
|
* @param req A pointer to ifreq structure
|
||||||
|
* @return 0 --success, otherwise fail
|
||||||
|
*/
|
||||||
|
static int woal_uap_set_multiap_mode(moal_private *priv, t_u8 *respbuf,
|
||||||
|
t_u32 respbuflen)
|
||||||
|
{
|
||||||
|
mlan_ioctl_req *req = NULL;
|
||||||
|
mlan_ds_misc_cfg *misc = NULL;
|
||||||
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
int mode[1] = {0};
|
||||||
|
int ret = 0;
|
||||||
|
int header_len = 0;
|
||||||
|
int user_data_len = 0;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
if (!respbuf) {
|
||||||
|
PRINTM(MERROR, "response buffer is not available!\n");
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
header_len = strlen(CMD_NXP) + strlen(PRIV_CMD_SETMODE);
|
||||||
|
user_data_len = strlen(respbuf) - header_len;
|
||||||
|
|
||||||
|
/* Allocate an IOCTL request buffer */
|
||||||
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||||
|
if (req == NULL) {
|
||||||
|
ret = -ENOMEM;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fill request buffer */
|
||||||
|
misc = (mlan_ds_misc_cfg *)req->pbuf;
|
||||||
|
misc->sub_command = MLAN_OID_MISC_MULTI_AP_CFG;
|
||||||
|
req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||||
|
|
||||||
|
if ((int)strlen(respbuf) == header_len) {
|
||||||
|
/* GET operation */
|
||||||
|
user_data_len = 0;
|
||||||
|
req->action = MLAN_ACT_GET;
|
||||||
|
} else {
|
||||||
|
/* SET operation */
|
||||||
|
parse_arguments(respbuf + header_len, mode, ARRAY_SIZE(mode),
|
||||||
|
&user_data_len);
|
||||||
|
if (user_data_len > 1) {
|
||||||
|
PRINTM(MERROR, "Invalid number of args!\n");
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if ((mode[0] != EASY_MESH_MULTI_AP_BSS_MODE_3) &&
|
||||||
|
(mode[0] != EASY_MESH_MULTI_AP_BSS_MODE_2) &&
|
||||||
|
(mode[0] != EASY_MESH_MULTI_AP_BSS_MODE_1)) {
|
||||||
|
PRINTM(MERROR, "Invalid setmode value\n");
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mode[0] == EASY_MESH_MULTI_AP_BSS_MODE_3)
|
||||||
|
/* Supports backhaul and fronthaul BSS */
|
||||||
|
priv->multi_ap_flag = EASY_MESH_MULTI_AP_BH_AND_FH_BSS;
|
||||||
|
else if (mode[0] == EASY_MESH_MULTI_AP_BSS_MODE_2)
|
||||||
|
/* Supports backhaul BSS */
|
||||||
|
priv->multi_ap_flag = EASY_MESH_MULTI_AP_BH_BSS;
|
||||||
|
else if (mode[0] == EASY_MESH_MULTI_AP_BSS_MODE_1)
|
||||||
|
/* Supports fronthaul BSS */
|
||||||
|
priv->multi_ap_flag = EASY_MESH_MULTI_AP_FH_BSS;
|
||||||
|
PRINTM(MINFO, "[EM:%s:%d] priv->multi_ap_flag 0x%x\n", __func__,
|
||||||
|
__LINE__, priv->multi_ap_flag);
|
||||||
|
|
||||||
|
req->action = MLAN_ACT_SET;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Send IOCTL request to MLAN */
|
||||||
|
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||||
|
if (status != MLAN_STATUS_SUCCESS) {
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (req->action == MLAN_ACT_GET) {
|
||||||
|
if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_BH_AND_FH_BSS)
|
||||||
|
mode[0] = EASY_MESH_MULTI_AP_BSS_MODE_3;
|
||||||
|
else if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_BH_BSS)
|
||||||
|
mode[0] = EASY_MESH_MULTI_AP_BSS_MODE_2;
|
||||||
|
else if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_FH_BSS)
|
||||||
|
mode[0] = EASY_MESH_MULTI_AP_BSS_MODE_1;
|
||||||
|
|
||||||
|
PRINTM(MINFO, "[EM:%s:%d] setmode to 0x%x\n", __func__,
|
||||||
|
__LINE__, mode[0]);
|
||||||
|
moal_memcpy_ext(priv->phandle, respbuf, (t_u8 *)mode,
|
||||||
|
sizeof(mode), respbuflen);
|
||||||
|
ret = sizeof(mode);
|
||||||
|
}
|
||||||
|
done:
|
||||||
|
if (status != MLAN_STATUS_PENDING)
|
||||||
|
kfree(req);
|
||||||
|
|
||||||
|
LEAVE();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WIFI_DIRECT_SUPPORT
|
#ifdef WIFI_DIRECT_SUPPORT
|
||||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||||
/**
|
/**
|
||||||
|
@ -20034,6 +20144,16 @@ int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req)
|
||||||
priv_cmd.total_len);
|
priv_cmd.total_len);
|
||||||
goto handled;
|
goto handled;
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(UAP_SUPPORT)
|
||||||
|
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
||||||
|
} else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_SETMODE,
|
||||||
|
strlen(PRIV_CMD_SETMODE)) == 0) {
|
||||||
|
/* Set multi_ap mode */
|
||||||
|
len = woal_uap_set_multiap_mode(priv, buf,
|
||||||
|
priv_cmd.total_len);
|
||||||
|
goto handled;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#ifdef WIFI_DIRECT_SUPPORT
|
#ifdef WIFI_DIRECT_SUPPORT
|
||||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||||
} else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_BSSROLE,
|
} else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_BSSROLE,
|
||||||
|
|
|
@ -82,6 +82,9 @@ Change log:
|
||||||
#define PRIV_CMD_GET_STA_LIST "getstalist"
|
#define PRIV_CMD_GET_STA_LIST "getstalist"
|
||||||
#define PRIV_CMD_BSS_CONFIG "bssconfig"
|
#define PRIV_CMD_BSS_CONFIG "bssconfig"
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(UAP_SUPPORT)
|
||||||
|
#define PRIV_CMD_SETMODE "setmode"
|
||||||
|
#endif
|
||||||
#ifdef WIFI_DIRECT_SUPPORT
|
#ifdef WIFI_DIRECT_SUPPORT
|
||||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||||
#define PRIV_CMD_BSSROLE "bssrole"
|
#define PRIV_CMD_BSSROLE "bssrole"
|
||||||
|
|
|
@ -7623,6 +7623,48 @@ done:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||||
|
/**
|
||||||
|
* @brief Set multi ap flag to mlan layer
|
||||||
|
*
|
||||||
|
* @param priv A pointer to moal_private structure
|
||||||
|
* @param wait_option wait_option of ioctl
|
||||||
|
* @param flag multi ap flag
|
||||||
|
*
|
||||||
|
* @return MLAN_STATUS_SUCCESS -- success, otherwise fail
|
||||||
|
*/
|
||||||
|
mlan_status woal_multi_ap_cfg(moal_private *priv, t_u8 wait_option, t_u8 flag)
|
||||||
|
{
|
||||||
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
mlan_ioctl_req *req = NULL;
|
||||||
|
mlan_ds_misc_cfg *cfg = NULL;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||||
|
if (req == NULL) {
|
||||||
|
status = MLAN_STATUS_FAILURE;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg = (mlan_ds_misc_cfg *)req->pbuf;
|
||||||
|
cfg->param.multi_ap_flag = flag;
|
||||||
|
cfg->sub_command = MLAN_OID_MISC_MULTI_AP_CFG;
|
||||||
|
req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||||
|
req->action = MLAN_ACT_SET;
|
||||||
|
|
||||||
|
status = woal_request_ioctl(priv, req, wait_option);
|
||||||
|
if (status != MLAN_STATUS_SUCCESS)
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
done:
|
||||||
|
if (status != MLAN_STATUS_PENDING)
|
||||||
|
kfree(req);
|
||||||
|
LEAVE();
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set hotspot configuration value to mlan layer
|
* @brief Set hotspot configuration value to mlan layer
|
||||||
*
|
*
|
||||||
|
|
|
@ -585,6 +585,8 @@ static struct _card_info card_info_PCIE8997 = {
|
||||||
.magic_reg = 0x0cd4,
|
.magic_reg = 0x0cd4,
|
||||||
.fw_name = PCIE8997_DEFAULT_COMBO_FW_NAME,
|
.fw_name = PCIE8997_DEFAULT_COMBO_FW_NAME,
|
||||||
.fw_name_wlan = PCIE8997_DEFAULT_WLAN_FW_NAME,
|
.fw_name_wlan = PCIE8997_DEFAULT_WLAN_FW_NAME,
|
||||||
|
.fw_reset_reg = 0xcf4,
|
||||||
|
.fw_reset_val = 0x99,
|
||||||
.sniffer_support = 1,
|
.sniffer_support = 1,
|
||||||
.per_pkt_cfg_support = 1,
|
.per_pkt_cfg_support = 1,
|
||||||
.host_mlme_required = 1,
|
.host_mlme_required = 1,
|
||||||
|
@ -5520,6 +5522,11 @@ void woal_remove_interface(moal_handle *handle, t_u8 bss_index)
|
||||||
#endif
|
#endif
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
int count = 0;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
if (!priv || !priv->netdev)
|
if (!priv || !priv->netdev)
|
||||||
|
@ -5621,6 +5628,18 @@ void woal_remove_interface(moal_handle *handle, t_u8 bss_index)
|
||||||
if (IS_STA_OR_UAP_CFG80211(handle->params.cfg80211_wext))
|
if (IS_STA_OR_UAP_CFG80211(handle->params.cfg80211_wext))
|
||||||
priv->phandle->wiphy->extended_capabilities = NULL;
|
priv->phandle->wiphy->extended_capabilities = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
/* Clear the whole backhaul station list in moal */
|
||||||
|
for (count = 0; count < MAX_STA_COUNT; count++) {
|
||||||
|
if (priv->vlan_sta_list[count]) {
|
||||||
|
if (priv->vlan_sta_list[count]->is_valid)
|
||||||
|
unregister_netdevice(
|
||||||
|
priv->vlan_sta_list[count]->netdev);
|
||||||
|
kfree(priv->vlan_sta_list[count]);
|
||||||
|
}
|
||||||
|
priv->vlan_sta_list[count] = NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
priv->phandle->priv[priv->bss_index] = NULL;
|
priv->phandle->priv[priv->bss_index] = NULL;
|
||||||
priv->phandle = NULL;
|
priv->phandle = NULL;
|
||||||
|
@ -6067,6 +6086,9 @@ int woal_open(struct net_device *dev)
|
||||||
#endif /* < 2.6.34 */
|
#endif /* < 2.6.34 */
|
||||||
#endif /* USB_SUSPEND_RESUME */
|
#endif /* USB_SUSPEND_RESUME */
|
||||||
t_u8 carrier_on = MFALSE;
|
t_u8 carrier_on = MFALSE;
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
int cfg80211_wext = priv->phandle->params.cfg80211_wext;
|
||||||
|
#endif
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -6134,6 +6156,13 @@ int woal_open(struct net_device *dev)
|
||||||
carrier_on = MTRUE;
|
carrier_on = MTRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
if (IS_STA_OR_UAP_CFG80211(cfg80211_wext)) {
|
||||||
|
if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP_VLAN)
|
||||||
|
carrier_on = MTRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (carrier_on == MTRUE) {
|
if (carrier_on == MTRUE) {
|
||||||
if (!netif_carrier_ok(priv->netdev))
|
if (!netif_carrier_ok(priv->netdev))
|
||||||
netif_carrier_on(priv->netdev);
|
netif_carrier_on(priv->netdev);
|
||||||
|
@ -6171,6 +6200,18 @@ int woal_close(struct net_device *dev)
|
||||||
#endif
|
#endif
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
if (IS_STA_OR_UAP_CFG80211(cfg80211_wext)) {
|
||||||
|
/** For multi-ap virtual interface */
|
||||||
|
if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP_VLAN) {
|
||||||
|
woal_stop_queue(priv->netdev);
|
||||||
|
MODULE_PUT;
|
||||||
|
LEAVE();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
woal_flush_tx_stat_queue(priv);
|
woal_flush_tx_stat_queue(priv);
|
||||||
|
|
||||||
if ((priv->media_connected == MTRUE)
|
if ((priv->media_connected == MTRUE)
|
||||||
|
@ -6314,6 +6355,13 @@ int woal_set_mac_address(struct net_device *dev, void *addr)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
/* No need to set mac address for multi-ap virtual interface */
|
||||||
|
if ((dev->ieee80211_ptr) &&
|
||||||
|
(dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP_VLAN))
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
moal_memcpy_ext(priv->phandle, prev_addr, priv->current_addr, ETH_ALEN,
|
moal_memcpy_ext(priv->phandle, prev_addr, priv->current_addr, ETH_ALEN,
|
||||||
ETH_ALEN);
|
ETH_ALEN);
|
||||||
memset(priv->current_addr, 0, ETH_ALEN);
|
memset(priv->current_addr, 0, ETH_ALEN);
|
||||||
|
@ -7598,6 +7646,66 @@ done:
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
/**
|
||||||
|
* @brief This function check if the packet is easymesh packet
|
||||||
|
*
|
||||||
|
* @param priv A pointer to moal_private structure
|
||||||
|
* @param skb A pointer to sk_buff structure
|
||||||
|
*
|
||||||
|
* @return MTRUE/MFALSE
|
||||||
|
*/
|
||||||
|
static BOOLEAN woal_check_easymesh_packet(moal_private *priv,
|
||||||
|
mlan_buffer *pmbuf)
|
||||||
|
{
|
||||||
|
struct sk_buff *skb = pmbuf->pdesc;
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
/** not construct 4 address if SA is same as local address */
|
||||||
|
if (!moal_memcmp(NULL, (skb->data + 6), priv->current_addr, ETH_ALEN)) {
|
||||||
|
PRINTM(MINFO,
|
||||||
|
"%s: SA is same as local address " FULL_MACSTR "\n",
|
||||||
|
__func__, FULL_MAC2STR(priv->current_addr));
|
||||||
|
LEAVE();
|
||||||
|
return MFALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* RA TA */
|
||||||
|
switch (priv->wdev->iftype) {
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
case NL80211_IFTYPE_AP_VLAN:
|
||||||
|
PRINTM(MDAT_D, "%s: Easymesh AP_VLAN\n", priv->netdev->name);
|
||||||
|
moal_memcpy_ext(priv->phandle, pmbuf->mac,
|
||||||
|
priv->vlan_sta_ptr->peer_mac,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, ETH_ALEN);
|
||||||
|
pmbuf->flags |= MLAN_BUF_FLAG_EASYMESH;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
case NL80211_IFTYPE_STATION:
|
||||||
|
PRINTM(MDAT_D, "%s Easymesh STATION\n", priv->netdev->name);
|
||||||
|
moal_memcpy_ext(priv->phandle, pmbuf->mac, priv->cfg_bssid,
|
||||||
|
ETH_ALEN, ETH_ALEN);
|
||||||
|
pmbuf->flags |= MLAN_BUF_FLAG_EASYMESH;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
PRINTM(MERROR, "Not supported iftype\n");
|
||||||
|
LEAVE();
|
||||||
|
return MFALSE;
|
||||||
|
}
|
||||||
|
PRINTM(MDAT_D,
|
||||||
|
"Easymesh Tx %s:\nRA: " FULL_MACSTR "\nTA: " FULL_MACSTR
|
||||||
|
"\nDA: " FULL_MACSTR "\nSA: " FULL_MACSTR "\n",
|
||||||
|
__func__, FULL_MAC2STR(pmbuf->mac),
|
||||||
|
FULL_MAC2STR(priv->current_addr), FULL_MAC2STR(skb->data),
|
||||||
|
FULL_MAC2STR(skb->data + ETH_ALEN));
|
||||||
|
|
||||||
|
LEAVE();
|
||||||
|
return MTRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function handles packet transmission
|
* @brief This function handles packet transmission
|
||||||
*
|
*
|
||||||
|
@ -7616,6 +7724,12 @@ static void woal_start_xmit(moal_private *priv, struct sk_buff *skb)
|
||||||
#endif
|
#endif
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
BOOLEAN multi_ap_packet = MFALSE;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
priv->num_tx_timeout = 0;
|
priv->num_tx_timeout = 0;
|
||||||
|
@ -7660,6 +7774,23 @@ static void woal_start_xmit(moal_private *priv, struct sk_buff *skb)
|
||||||
pmbuf->bss_index = priv->bss_index;
|
pmbuf->bss_index = priv->bss_index;
|
||||||
woal_fill_mlan_buffer(priv, pmbuf, skb);
|
woal_fill_mlan_buffer(priv, pmbuf, skb);
|
||||||
|
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
if (priv->wdev->use_4addr) {
|
||||||
|
if ((priv->wdev->iftype == NL80211_IFTYPE_AP_VLAN &&
|
||||||
|
!priv->vlan_sta_ptr) ||
|
||||||
|
(priv->wdev->iftype == NL80211_IFTYPE_STATION &&
|
||||||
|
!priv->media_connected)) {
|
||||||
|
priv->stats.tx_dropped++;
|
||||||
|
dev_kfree_skb_any(skb);
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
multi_ap_packet = woal_check_easymesh_packet(priv, pmbuf);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
if (priv->enable_tcp_ack_enh == MTRUE) {
|
if (priv->enable_tcp_ack_enh == MTRUE) {
|
||||||
ret = woal_process_tcp_ack(priv, pmbuf);
|
ret = woal_process_tcp_ack(priv, pmbuf);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -7696,6 +7827,13 @@ static void woal_start_xmit(moal_private *priv, struct sk_buff *skb)
|
||||||
case MLAN_STATUS_PENDING:
|
case MLAN_STATUS_PENDING:
|
||||||
atomic_inc(&priv->phandle->tx_pending);
|
atomic_inc(&priv->phandle->tx_pending);
|
||||||
|
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
if (priv->wdev->iftype == NL80211_IFTYPE_AP_VLAN)
|
||||||
|
priv = priv->parent_priv;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||||
atomic_inc(&priv->wmm_tx_pending[index]);
|
atomic_inc(&priv->wmm_tx_pending[index]);
|
||||||
if (atomic_read(&priv->wmm_tx_pending[index]) >=
|
if (atomic_read(&priv->wmm_tx_pending[index]) >=
|
||||||
|
@ -7999,6 +8137,12 @@ void woal_set_multicast_list(struct net_device *dev)
|
||||||
*/
|
*/
|
||||||
void woal_init_priv(moal_private *priv, t_u8 wait_option)
|
void woal_init_priv(moal_private *priv, t_u8 wait_option)
|
||||||
{
|
{
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
int i;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) {
|
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) {
|
||||||
|
@ -8060,6 +8204,14 @@ void woal_init_priv(moal_private *priv, t_u8 wait_option)
|
||||||
woal_init_wifi_hal(priv);
|
woal_init_wifi_hal(priv);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
priv->vlan_sta_ptr = NULL;
|
||||||
|
for (i = 0; i < MAX_STA_COUNT; i++)
|
||||||
|
priv->vlan_sta_list[i] = NULL;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -8189,6 +8341,11 @@ void woal_init_priv(moal_private *priv, t_u8 wait_option)
|
||||||
priv->chan_num_pkts = DEFAULT_RETRY_PKTS;
|
priv->chan_num_pkts = DEFAULT_RETRY_PKTS;
|
||||||
priv->user_cac_period_msec = 0;
|
priv->user_cac_period_msec = 0;
|
||||||
priv->chan_under_nop = MFALSE;
|
priv->chan_under_nop = MFALSE;
|
||||||
|
#endif
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
priv->multi_ap_flag = 0;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
LEAVE();
|
LEAVE();
|
||||||
}
|
}
|
||||||
|
@ -12570,7 +12727,8 @@ static int woal_pcie_reset_and_reload_fw(moal_handle *handle)
|
||||||
if (!IS_PCIE9098(handle->card_type) &&
|
if (!IS_PCIE9098(handle->card_type) &&
|
||||||
!IS_PCIEIW624(handle->card_type) &&
|
!IS_PCIEIW624(handle->card_type) &&
|
||||||
!IS_PCIEAW693(handle->card_type) &&
|
!IS_PCIEAW693(handle->card_type) &&
|
||||||
!IS_PCIE9097(handle->card_type)) {
|
!IS_PCIE9097(handle->card_type) &&
|
||||||
|
!IS_PCIE8997(handle->card_type)) {
|
||||||
PRINTM(MERROR, "HW don't support PCIE in-band reset\n");
|
PRINTM(MERROR, "HW don't support PCIE in-band reset\n");
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1435,6 +1435,27 @@ typedef struct _auto_zero_dfs_cfg {
|
||||||
t_u8 dfs_chan_list[MAX_DFS_CHAN_LIST];
|
t_u8 dfs_chan_list[MAX_DFS_CHAN_LIST];
|
||||||
} __ATTRIB_PACK__ auto_zero_dfs_cfg;
|
} __ATTRIB_PACK__ auto_zero_dfs_cfg;
|
||||||
|
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
typedef struct _station_node {
|
||||||
|
/** station aid */
|
||||||
|
t_u16 aid;
|
||||||
|
/** station mac address */
|
||||||
|
t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** net_device that station is bind to */
|
||||||
|
struct net_device *netdev;
|
||||||
|
/** is valid flag */
|
||||||
|
t_u8 is_valid;
|
||||||
|
} station_node;
|
||||||
|
|
||||||
|
#define EASY_MESH_MULTI_AP_FH_BSS (t_u8)(0x20)
|
||||||
|
#define EASY_MESH_MULTI_AP_BH_BSS (t_u8)(0x40)
|
||||||
|
#define EASY_MESH_MULTI_AP_BH_AND_FH_BSS (t_u8)(0x60)
|
||||||
|
|
||||||
|
#define EASY_MESH_MULTI_AP_BSS_MODE_1 (t_u8)(0x01)
|
||||||
|
#define EASY_MESH_MULTI_AP_BSS_MODE_2 (t_u8)(0x02)
|
||||||
|
#define EASY_MESH_MULTI_AP_BSS_MODE_3 (t_u8)(0x03)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
enum scan_set_band {
|
enum scan_set_band {
|
||||||
SCAN_SETBAND_AUTO = 0,
|
SCAN_SETBAND_AUTO = 0,
|
||||||
|
@ -1813,6 +1834,14 @@ struct _moal_private {
|
||||||
void *rings[RING_ID_MAX];
|
void *rings[RING_ID_MAX];
|
||||||
t_u8 pkt_fate_monitor_enable;
|
t_u8 pkt_fate_monitor_enable;
|
||||||
void *packet_filter;
|
void *packet_filter;
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
t_u8 multi_ap_flag;
|
||||||
|
station_node *vlan_sta_ptr;
|
||||||
|
station_node *vlan_sta_list[MAX_STA_COUNT];
|
||||||
|
moal_private *parent_priv;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
/** txwatchdog disable */
|
/** txwatchdog disable */
|
||||||
t_u8 txwatchdog_disable;
|
t_u8 txwatchdog_disable;
|
||||||
|
|
||||||
|
@ -4139,6 +4168,10 @@ void woal_hist_data_add(moal_private *priv, t_u16 rx_rate, t_s8 snr, t_s8 nflr,
|
||||||
mlan_status woal_set_hotspotcfg(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_set_hotspotcfg(moal_private *priv, t_u8 wait_option,
|
||||||
t_u32 hotspotcfg);
|
t_u32 hotspotcfg);
|
||||||
|
|
||||||
|
#if defined(STA_CFG80211)
|
||||||
|
mlan_status woal_multi_ap_cfg(moal_private *priv, t_u8 wait_option, t_u8 flag);
|
||||||
|
#endif
|
||||||
|
|
||||||
mlan_status woal_set_get_wowlan_config(moal_private *priv, t_u16 action,
|
mlan_status woal_set_get_wowlan_config(moal_private *priv, t_u16 action,
|
||||||
t_u8 wait_option,
|
t_u8 wait_option,
|
||||||
mlan_ds_misc_mef_flt_cfg *mefcfg);
|
mlan_ds_misc_mef_flt_cfg *mefcfg);
|
||||||
|
|
|
@ -1886,6 +1886,32 @@ done:
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
/**
|
||||||
|
* @brief This function get binded net_device from station list
|
||||||
|
*
|
||||||
|
* @param priv Pointer to structure moal_private
|
||||||
|
* @param aid station aid from mlan
|
||||||
|
*
|
||||||
|
* @return binded net_device pointer or NULL if not found
|
||||||
|
*/
|
||||||
|
struct net_device *moal_get_netdev_from_stalist(moal_private *priv, t_u16 aid)
|
||||||
|
{
|
||||||
|
station_node *sta_node = NULL;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
sta_node = priv->vlan_sta_list[(aid - 1) % MAX_STA_COUNT];
|
||||||
|
if (sta_node) {
|
||||||
|
LEAVE();
|
||||||
|
return sta_node->netdev;
|
||||||
|
}
|
||||||
|
LEAVE();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function uploads amsdu packet to the network stack
|
* @brief This function uploads amsdu packet to the network stack
|
||||||
*
|
*
|
||||||
|
@ -2088,6 +2114,11 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf)
|
||||||
int j;
|
int j;
|
||||||
struct ethhdr *ethh = NULL;
|
struct ethhdr *ethh = NULL;
|
||||||
struct net_device *netdev = NULL;
|
struct net_device *netdev = NULL;
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
t_u16 aid = 0;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
if (pmbuf) {
|
if (pmbuf) {
|
||||||
|
@ -2204,6 +2235,23 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf)
|
||||||
priv->deauth_evt_cnt = 0;
|
priv->deauth_evt_cnt = 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH) {
|
||||||
|
aid = (pmbuf->priority & 0xFF000000) >> 24;
|
||||||
|
if (!priv->vlan_sta_list[(aid - 1) %
|
||||||
|
MAX_STA_COUNT]
|
||||||
|
->is_valid) {
|
||||||
|
status = MLAN_STATUS_FAILURE;
|
||||||
|
priv->stats.rx_dropped++;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (aid != 0)
|
||||||
|
netdev = moal_get_netdev_from_stalist(
|
||||||
|
priv, aid);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
if (!netdev)
|
if (!netdev)
|
||||||
netdev = priv->netdev;
|
netdev = priv->netdev;
|
||||||
skb->dev = netdev;
|
skb->dev = netdev;
|
||||||
|
|
|
@ -911,6 +911,9 @@ static int woal_cfg80211_assoc_ies_cfg(moal_private *priv, t_u8 *ie,
|
||||||
t_u8 wps_oui[] = {0x00, 0x50, 0xf2, 0x04};
|
t_u8 wps_oui[] = {0x00, 0x50, 0xf2, 0x04};
|
||||||
t_u8 hs20_oui[] = {0x50, 0x6f, 0x9a, 0x10};
|
t_u8 hs20_oui[] = {0x50, 0x6f, 0x9a, 0x10};
|
||||||
|
|
||||||
|
t_u8 multiap_oui[] = {0x50, 0x6f, 0x9a, 0x1b};
|
||||||
|
t_u8 multiap_flag = 0;
|
||||||
|
|
||||||
while (bytes_left >= 2) {
|
while (bytes_left >= 2) {
|
||||||
element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr));
|
element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr));
|
||||||
element_len = *((t_u8 *)pcurrent_ptr + 1);
|
element_len = *((t_u8 *)pcurrent_ptr + 1);
|
||||||
|
@ -948,6 +951,21 @@ static int woal_cfg80211_assoc_ies_cfg(moal_private *priv, t_u8 *ie,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!memcmp(pvendor_ie->vend_hdr.oui, multiap_oui,
|
||||||
|
sizeof(pvendor_ie->vend_hdr.oui)) &&
|
||||||
|
(pvendor_ie->vend_hdr.oui_type == multiap_oui[3])) {
|
||||||
|
multiap_flag = pvendor_ie->data[0];
|
||||||
|
if (MLAN_STATUS_SUCCESS !=
|
||||||
|
woal_multi_ap_cfg(priv, wait_option,
|
||||||
|
multiap_flag)) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"%s: failed to configure multi ap\n",
|
||||||
|
__func__);
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!memcmp(pvendor_ie->vend_hdr.oui, hs20_oui,
|
if (!memcmp(pvendor_ie->vend_hdr.oui, hs20_oui,
|
||||||
sizeof(pvendor_ie->vend_hdr.oui)) &&
|
sizeof(pvendor_ie->vend_hdr.oui)) &&
|
||||||
(pvendor_ie->vend_hdr.oui_type == hs20_oui[3])) {
|
(pvendor_ie->vend_hdr.oui_type == hs20_oui[3])) {
|
||||||
|
@ -2743,6 +2761,7 @@ static int woal_cfg80211_associate(struct wiphy *wiphy, struct net_device *dev,
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
int ie_len;
|
||||||
mlan_ssid_bssid *ssid_bssid = NULL;
|
mlan_ssid_bssid *ssid_bssid = NULL;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
const u8 *ssid_ie;
|
const u8 *ssid_ie;
|
||||||
|
@ -2915,6 +2934,22 @@ done:
|
||||||
"woal_get_bss_info Fails to get bss info\n");
|
"woal_get_bss_info Fails to get bss info\n");
|
||||||
}
|
}
|
||||||
priv->channel = bss_info.bss_chan;
|
priv->channel = bss_info.bss_chan;
|
||||||
|
} else {
|
||||||
|
/* clear the encryption mode */
|
||||||
|
if (MLAN_STATUS_SUCCESS !=
|
||||||
|
woal_cfg80211_set_auth(priv, MLAN_ENCRYPTION_MODE_NONE,
|
||||||
|
MFALSE, MOAL_IOCTL_WAIT)) {
|
||||||
|
PRINTM(MERROR, "Could not clear encryption \n");
|
||||||
|
ret = -EFAULT;
|
||||||
|
}
|
||||||
|
/* clear IE */
|
||||||
|
ie_len = 0;
|
||||||
|
if (MLAN_STATUS_SUCCESS !=
|
||||||
|
woal_set_get_gen_ie(priv, MLAN_ACT_SET, NULL, &ie_len,
|
||||||
|
MOAL_IOCTL_WAIT)) {
|
||||||
|
PRINTM(MERROR, "Could not clear RSN IE\n");
|
||||||
|
ret = -EFAULT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_lock_irqsave(&priv->connect_lock, flags);
|
spin_lock_irqsave(&priv->connect_lock, flags);
|
||||||
|
@ -3385,6 +3420,37 @@ done:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 1, 18)
|
||||||
|
/**
|
||||||
|
* @brief This function convert he_gi to nl80211_he_gi
|
||||||
|
*
|
||||||
|
* @param he_gi 0/1/2/3
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return 0: NL80211_RATE_INFO_HE_GI_0_8
|
||||||
|
* 1: NL80211_RATE_INFO_HE_GI_1_6
|
||||||
|
* 2: NL80211_RATE_INFO_HE_GI_3_2
|
||||||
|
*/
|
||||||
|
static t_u8 woal_he_gi_to_nl80211_he_gi(t_u8 he_gi)
|
||||||
|
{
|
||||||
|
t_u8 cfg_he_gi = 0;
|
||||||
|
switch (he_gi) {
|
||||||
|
case 3:
|
||||||
|
cfg_he_gi = NL80211_RATE_INFO_HE_GI_3_2;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
cfg_he_gi = NL80211_RATE_INFO_HE_GI_1_6;
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
default:
|
||||||
|
cfg_he_gi = NL80211_RATE_INFO_HE_GI_0_8;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return cfg_he_gi;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Request the driver to fill the tx/rx rate info
|
* @brief Request the driver to fill the tx/rx rate info
|
||||||
*
|
*
|
||||||
|
@ -3461,7 +3527,8 @@ static void woal_cfg80211_fill_rate_info(moal_private *priv,
|
||||||
sinfo->txrate.flags = RATE_INFO_FLAGS_HE_MCS;
|
sinfo->txrate.flags = RATE_INFO_FLAGS_HE_MCS;
|
||||||
sinfo->txrate.nss = rate->param.data_rate.tx_nss + 1;
|
sinfo->txrate.nss = rate->param.data_rate.tx_nss + 1;
|
||||||
sinfo->txrate.mcs = rate->param.data_rate.tx_mcs_index;
|
sinfo->txrate.mcs = rate->param.data_rate.tx_mcs_index;
|
||||||
sinfo->txrate.he_gi = rate->param.data_rate.tx_ht_gi;
|
sinfo->txrate.he_gi = woal_he_gi_to_nl80211_he_gi(
|
||||||
|
rate->param.data_rate.tx_ht_gi);
|
||||||
if (rate->param.data_rate.tx_ht_bw == MLAN_VHT_BW80)
|
if (rate->param.data_rate.tx_ht_bw == MLAN_VHT_BW80)
|
||||||
sinfo->txrate.bw = RATE_INFO_BW_80;
|
sinfo->txrate.bw = RATE_INFO_BW_80;
|
||||||
else if (rate->param.data_rate.tx_ht_bw == MLAN_HT_BW40)
|
else if (rate->param.data_rate.tx_ht_bw == MLAN_HT_BW40)
|
||||||
|
@ -3508,7 +3575,8 @@ static void woal_cfg80211_fill_rate_info(moal_private *priv,
|
||||||
sinfo->rxrate.flags = RATE_INFO_FLAGS_HE_MCS;
|
sinfo->rxrate.flags = RATE_INFO_FLAGS_HE_MCS;
|
||||||
sinfo->rxrate.nss = rate->param.data_rate.rx_nss + 1;
|
sinfo->rxrate.nss = rate->param.data_rate.rx_nss + 1;
|
||||||
sinfo->rxrate.mcs = rate->param.data_rate.rx_mcs_index;
|
sinfo->rxrate.mcs = rate->param.data_rate.rx_mcs_index;
|
||||||
sinfo->rxrate.he_gi = rate->param.data_rate.rx_ht_gi;
|
sinfo->rxrate.he_gi = woal_he_gi_to_nl80211_he_gi(
|
||||||
|
rate->param.data_rate.rx_ht_gi);
|
||||||
if (rate->param.data_rate.rx_ht_bw == MLAN_VHT_BW80)
|
if (rate->param.data_rate.rx_ht_bw == MLAN_VHT_BW80)
|
||||||
sinfo->rxrate.bw = RATE_INFO_BW_80;
|
sinfo->rxrate.bw = RATE_INFO_BW_80;
|
||||||
else if (rate->param.data_rate.rx_ht_bw == MLAN_HT_BW40)
|
else if (rate->param.data_rate.rx_ht_bw == MLAN_HT_BW40)
|
||||||
|
@ -4551,7 +4619,30 @@ static int woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev,
|
||||||
if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN)
|
if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN)
|
||||||
scan_req->chan_list[num_chans].scan_time =
|
scan_req->chan_list[num_chans].scan_time =
|
||||||
INIT_PASSIVE_SCAN_CHAN_TIME;
|
INIT_PASSIVE_SCAN_CHAN_TIME;
|
||||||
else
|
else if ((priv->bss_type == MLAN_BSS_TYPE_STA) &&
|
||||||
|
(1 ==
|
||||||
|
priv->phandle->scan_request->n_channels)) {
|
||||||
|
/*
|
||||||
|
* Set passive scan time to 110ms to discover
|
||||||
|
* all nearby AP's, Current 40ms passive scan
|
||||||
|
* time does not scan all AP's. There are issues
|
||||||
|
* with 40ms scan time:
|
||||||
|
* 1. Regular user passive scan does list
|
||||||
|
* limited nearby AP's.
|
||||||
|
* 2. Radio Measurement RPT with beacon report
|
||||||
|
* for passive scan mode does not list all
|
||||||
|
* required AP's and hence cert fails. This
|
||||||
|
* change is limited to below scenario only:
|
||||||
|
* 1. Single channel user scan is requested
|
||||||
|
* 2. STA is in connected state
|
||||||
|
* 3. Scan type is passive
|
||||||
|
*/
|
||||||
|
if (scan_req->chan_list[num_chans].scan_type ==
|
||||||
|
MLAN_SCAN_TYPE_PASSIVE)
|
||||||
|
scan_req->chan_list[num_chans]
|
||||||
|
.scan_time =
|
||||||
|
PASSIVE_SCAN_CHAN_TIME;
|
||||||
|
} else
|
||||||
scan_req->chan_list[num_chans].scan_time = MIN(
|
scan_req->chan_list[num_chans].scan_time = MIN(
|
||||||
MIN_SPECIFIC_SCAN_CHAN_TIME,
|
MIN_SPECIFIC_SCAN_CHAN_TIME,
|
||||||
scan_cfg.scan_time.specific_scan_time);
|
scan_cfg.scan_time.specific_scan_time);
|
||||||
|
@ -7339,8 +7430,8 @@ void woal_check_auto_tdls(struct wiphy *wiphy, struct net_device *dev)
|
||||||
if (tdls_discovery)
|
if (tdls_discovery)
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)
|
||||||
woal_cfg80211_tdls_mgmt(wiphy, dev, bcast_addr,
|
woal_cfg80211_tdls_mgmt(wiphy, dev, bcast_addr, 0,
|
||||||
0, TDLS_DISCOVERY_REQUEST, 1, 0, 0, 0,
|
TDLS_DISCOVERY_REQUEST, 1, 0, 0, 0,
|
||||||
NULL, 0);
|
NULL, 0);
|
||||||
#else
|
#else
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
||||||
|
@ -8490,8 +8581,41 @@ static int woal_cfg80211_change_station(struct wiphy *wiphy,
|
||||||
struct station_parameters *params)
|
struct station_parameters *params)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
moal_private *priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||||
|
moal_private *vlan_priv = NULL;
|
||||||
|
station_node *sta_node = NULL;
|
||||||
|
int i = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
/** Bind the station to uap virtual interface and
|
||||||
|
save the station info in moal_private */
|
||||||
|
if (params->vlan) {
|
||||||
|
if (params->vlan->ieee80211_ptr &&
|
||||||
|
params->vlan->ieee80211_ptr->iftype ==
|
||||||
|
NL80211_IFTYPE_AP_VLAN) {
|
||||||
|
vlan_priv = (moal_private *)woal_get_netdev_priv(
|
||||||
|
params->vlan);
|
||||||
|
for (i = 0; i < MAX_STA_COUNT; i++) {
|
||||||
|
sta_node = priv->vlan_sta_list[i];
|
||||||
|
if (sta_node &&
|
||||||
|
!moal_memcmp(priv->phandle,
|
||||||
|
sta_node->peer_mac, mac,
|
||||||
|
MLAN_MAC_ADDR_LENGTH)) {
|
||||||
|
PRINTM(MCMND,
|
||||||
|
"wlan: Easymesh change station aid=%d\n",
|
||||||
|
sta_node->aid);
|
||||||
|
sta_node->netdev = params->vlan;
|
||||||
|
sta_node->is_valid = MTRUE;
|
||||||
|
vlan_priv->vlan_sta_ptr = sta_node;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/**do nothing*/
|
/**do nothing*/
|
||||||
|
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -8522,12 +8646,29 @@ static int woal_cfg80211_add_station(struct wiphy *wiphy,
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
station_node *sta_node = NULL;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||||
#ifdef UAP_SUPPORT
|
#ifdef UAP_SUPPORT
|
||||||
if (moal_extflg_isset(priv->phandle, EXT_HOST_MLME) &&
|
if (moal_extflg_isset(priv->phandle, EXT_HOST_MLME) &&
|
||||||
(priv->bss_role == MLAN_BSS_ROLE_UAP)) {
|
(priv->bss_role == MLAN_BSS_ROLE_UAP)) {
|
||||||
|
sta_node = kmalloc(sizeof(station_node), GFP_KERNEL);
|
||||||
|
if (!sta_node) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"Failed to alloc memory for station node\n");
|
||||||
|
LEAVE();
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
memset(sta_node, 0, sizeof(*sta_node));
|
||||||
|
moal_memcpy_ext(priv->phandle, sta_node->peer_mac, mac,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, ETH_ALEN);
|
||||||
|
sta_node->netdev = dev;
|
||||||
|
sta_node->aid = params->aid;
|
||||||
|
sta_node->is_valid = MFALSE;
|
||||||
|
/** AID should start from 1 to MAX_STA_COUNT */
|
||||||
|
priv->vlan_sta_list[(params->aid - 1) % MAX_STA_COUNT] =
|
||||||
|
sta_node;
|
||||||
ret = woal_cfg80211_uap_add_station(wiphy, dev, (u8 *)mac,
|
ret = woal_cfg80211_uap_add_station(wiphy, dev, (u8 *)mac,
|
||||||
params);
|
params);
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -9934,8 +10075,9 @@ mlan_status woal_register_cfg80211(moal_private *priv)
|
||||||
wiphy->max_scan_ssids = MRVDRV_MAX_SSID_LIST_LENGTH;
|
wiphy->max_scan_ssids = MRVDRV_MAX_SSID_LIST_LENGTH;
|
||||||
wiphy->max_scan_ie_len = MAX_IE_SIZE;
|
wiphy->max_scan_ie_len = MAX_IE_SIZE;
|
||||||
wiphy->interface_modes = 0;
|
wiphy->interface_modes = 0;
|
||||||
wiphy->interface_modes =
|
wiphy->interface_modes = MBIT(NL80211_IFTYPE_STATION) |
|
||||||
MBIT(NL80211_IFTYPE_STATION) | MBIT(NL80211_IFTYPE_AP);
|
MBIT(NL80211_IFTYPE_AP_VLAN) |
|
||||||
|
MBIT(NL80211_IFTYPE_AP);
|
||||||
wiphy->interface_modes |= MBIT(NL80211_IFTYPE_MONITOR);
|
wiphy->interface_modes |= MBIT(NL80211_IFTYPE_MONITOR);
|
||||||
|
|
||||||
#ifdef WIFI_DIRECT_SUPPORT
|
#ifdef WIFI_DIRECT_SUPPORT
|
||||||
|
@ -10097,6 +10239,8 @@ mlan_status woal_register_cfg80211(moal_private *priv)
|
||||||
if (moal_extflg_isset(priv->phandle, EXT_HOST_MLME))
|
if (moal_extflg_isset(priv->phandle, EXT_HOST_MLME))
|
||||||
wiphy->features |= NL80211_FEATURE_SAE;
|
wiphy->features |= NL80211_FEATURE_SAE;
|
||||||
#endif
|
#endif
|
||||||
|
wiphy->flags |= WIPHY_FLAG_4ADDR_AP;
|
||||||
|
wiphy->flags |= WIPHY_FLAG_4ADDR_STATION;
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||||
wiphy->features |= NL80211_FEATURE_NEED_OBSS_SCAN;
|
wiphy->features |= NL80211_FEATURE_NEED_OBSS_SCAN;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4111,6 +4111,61 @@ done:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(UAP_CFG80211)
|
||||||
|
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||||
|
/**
|
||||||
|
* @brief Set/Get multi AP mode
|
||||||
|
*
|
||||||
|
* @param priv A pointer to moal_private structure
|
||||||
|
* @param wrq A pointer to structure iwreq
|
||||||
|
*
|
||||||
|
* @return 0 --success, otherwise fail
|
||||||
|
*/
|
||||||
|
int woal_uap_set_get_multi_ap_mode(moal_private *priv, struct iwreq *wrq)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
int mode = 0;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
if (wrq->u.data.length) {
|
||||||
|
if (wrq->u.data.length > 1) {
|
||||||
|
PRINTM(MERROR, "Invalid no of arguments!\n");
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (copy_from_user(&mode, wrq->u.data.pointer, sizeof(int))) {
|
||||||
|
PRINTM(MERROR, "copy from user failed\n");
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (mode == EASY_MESH_MULTI_AP_BSS_MODE_3)
|
||||||
|
/* Supports backhaul and fronthaul BSS */
|
||||||
|
priv->multi_ap_flag = EASY_MESH_MULTI_AP_BH_AND_FH_BSS;
|
||||||
|
else if (mode == EASY_MESH_MULTI_AP_BSS_MODE_2)
|
||||||
|
/* Supports backhaul BSS */
|
||||||
|
priv->multi_ap_flag = EASY_MESH_MULTI_AP_BH_BSS;
|
||||||
|
else if (mode == EASY_MESH_MULTI_AP_BSS_MODE_1)
|
||||||
|
/* Supports fronthaul BSS */
|
||||||
|
priv->multi_ap_flag = EASY_MESH_MULTI_AP_FH_BSS;
|
||||||
|
} else {
|
||||||
|
if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_BH_AND_FH_BSS)
|
||||||
|
mode = EASY_MESH_MULTI_AP_BSS_MODE_3;
|
||||||
|
else if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_BH_BSS)
|
||||||
|
mode = EASY_MESH_MULTI_AP_BSS_MODE_2;
|
||||||
|
else if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_FH_BSS)
|
||||||
|
mode = EASY_MESH_MULTI_AP_BSS_MODE_1;
|
||||||
|
wrq->u.data.length = 1;
|
||||||
|
if (copy_to_user(wrq->u.data.pointer, &mode, sizeof(int)))
|
||||||
|
ret = -EFAULT;
|
||||||
|
}
|
||||||
|
done:
|
||||||
|
LEAVE();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set AP configuration
|
* @brief Set AP configuration
|
||||||
*
|
*
|
||||||
|
|
|
@ -588,6 +588,12 @@ mlan_status woal_set_get_ap_wmm_para(moal_private *priv, t_u16 action,
|
||||||
wmm_parameter_t *ap_wmm_para);
|
wmm_parameter_t *ap_wmm_para);
|
||||||
int woal_uap_set_ap_cfg(moal_private *priv, t_u8 *data, int len);
|
int woal_uap_set_ap_cfg(moal_private *priv, t_u8 *data, int len);
|
||||||
|
|
||||||
|
#if defined(UAP_CFG80211)
|
||||||
|
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||||
|
int woal_uap_set_get_multi_ap_mode(moal_private *priv, struct iwreq *wrq);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
int woal_uap_set_11ac_status(moal_private *priv, t_u8 action, t_u8 vht20_40,
|
int woal_uap_set_11ac_status(moal_private *priv, t_u8 action, t_u8 vht20_40,
|
||||||
IEEEtypes_VHTCap_t *vhtcap_ie);
|
IEEEtypes_VHTCap_t *vhtcap_ie);
|
||||||
int woal_11ax_cfg(moal_private *priv, t_u8 action, mlan_ds_11ax_he_cfg *he_cfg,
|
int woal_11ax_cfg(moal_private *priv, t_u8 action, mlan_ds_11ax_he_cfg *he_cfg,
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Global Variables
|
Global Variables
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
extern const struct net_device_ops woal_uap_netdev_ops;
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Local Functions
|
Local Functions
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
@ -1482,6 +1483,11 @@ static int woal_cfg80211_beacon_config(moal_private *priv,
|
||||||
sys_config->sta_ageout_timer, sys_config->ps_sta_ageout_timer);
|
sys_config->sta_ageout_timer, sys_config->ps_sta_ageout_timer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (priv->multi_ap_flag) {
|
||||||
|
sys_config->multi_ap_flag = priv->multi_ap_flag;
|
||||||
|
PRINTM(MINFO, "%s: multi_ap_flag is 0x%x\n", __func__,
|
||||||
|
sys_config->multi_ap_flag);
|
||||||
|
}
|
||||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, MLAN_ACT_SET,
|
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, MLAN_ACT_SET,
|
||||||
MOAL_IOCTL_WAIT,
|
MOAL_IOCTL_WAIT,
|
||||||
sys_config)) {
|
sys_config)) {
|
||||||
|
@ -1666,6 +1672,167 @@ fail:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function setup the multi-ap virtual interface
|
||||||
|
*
|
||||||
|
* @param dev A pointer to structure net_device
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
static void woal_vlan_virt_if_setup(struct net_device *dev)
|
||||||
|
{
|
||||||
|
ENTER();
|
||||||
|
ether_setup(dev);
|
||||||
|
dev->netdev_ops = &woal_uap_netdev_ops;
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 11, 9)
|
||||||
|
dev->needs_free_netdev = true;
|
||||||
|
#else
|
||||||
|
dev->destructor = free_netdev;
|
||||||
|
#endif
|
||||||
|
LEAVE();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)
|
||||||
|
/**
|
||||||
|
* @brief Request the driver to add a multi-ap virtual interface
|
||||||
|
*
|
||||||
|
* @param wiphy A pointer to wiphy structure
|
||||||
|
* @param name Virtual interface name
|
||||||
|
* @param name_assign_type Interface name assignment type
|
||||||
|
* @param flags Flags for the virtual interface
|
||||||
|
* @param params A pointer to vif_params structure
|
||||||
|
* @param new_dev new net_device to return
|
||||||
|
*
|
||||||
|
* @return 0 -- success, otherwise fail
|
||||||
|
*/
|
||||||
|
static int woal_cfg80211_add_vlan_vir_if(struct wiphy *wiphy, const char *name,
|
||||||
|
unsigned char name_assign_type,
|
||||||
|
#if CFG80211_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
||||||
|
u32 *flags,
|
||||||
|
#endif
|
||||||
|
struct vif_params *params,
|
||||||
|
struct net_device **new_dev)
|
||||||
|
#else
|
||||||
|
/**
|
||||||
|
* @brief Request the driver to add a multi-ap virtual interface
|
||||||
|
*
|
||||||
|
* @param wiphy A pointer to wiphy structure
|
||||||
|
* @param name Virtual interface name
|
||||||
|
* @param flags Flags for the virtual interface
|
||||||
|
* @param params A pointer to vif_params structure
|
||||||
|
* @param new_dev new net_device to return
|
||||||
|
*
|
||||||
|
* @return 0 -- success, otherwise fail
|
||||||
|
*/
|
||||||
|
static int woal_cfg80211_add_vlan_vir_if(struct wiphy *wiphy,
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
|
||||||
|
const
|
||||||
|
#endif
|
||||||
|
char *name,
|
||||||
|
u32 *flags, struct vif_params *params,
|
||||||
|
struct net_device **new_dev)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy);
|
||||||
|
moal_private *priv =
|
||||||
|
(moal_private *)woal_get_priv(handle, MLAN_BSS_ROLE_UAP);
|
||||||
|
moal_private *new_priv = NULL;
|
||||||
|
struct net_device *ndev = NULL;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
ASSERT_RTNL();
|
||||||
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||||
|
#ifndef MAX_WMM_QUEUE
|
||||||
|
#define MAX_WMM_QUEUE 4
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)
|
||||||
|
ndev = alloc_netdev_mq(sizeof(moal_private), name, name_assign_type,
|
||||||
|
woal_vlan_virt_if_setup, 1);
|
||||||
|
#else
|
||||||
|
ndev = alloc_netdev_mq(sizeof(moal_private), name, NET_NAME_UNKNOWN,
|
||||||
|
woal_vlan_virt_if_setup, 1);
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
ndev = alloc_netdev_mq(sizeof(moal_private), name,
|
||||||
|
woal_vlan_virt_if_setup, 1);
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
ndev = alloc_netdev_mq(sizeof(moal_private), name,
|
||||||
|
woal_vlan_virt_if_setup);
|
||||||
|
#endif
|
||||||
|
if (!ndev) {
|
||||||
|
PRINTM(MFATAL, "Init virtual ethernet device failed\n");
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = dev_alloc_name(ndev, ndev->name);
|
||||||
|
if (ret < 0) {
|
||||||
|
PRINTM(MFATAL, "Net device alloc name fail.\n");
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
dev_net_set(ndev, wiphy_net(wiphy));
|
||||||
|
|
||||||
|
moal_memcpy_ext(handle, ndev->perm_addr, wiphy->perm_addr, ETH_ALEN,
|
||||||
|
sizeof(ndev->perm_addr));
|
||||||
|
moal_memcpy_ext(handle, ndev->perm_addr, priv->current_addr, ETH_ALEN,
|
||||||
|
sizeof(ndev->perm_addr));
|
||||||
|
moal_memcpy_ext(handle, (t_void *)ndev->dev_addr, ndev->perm_addr,
|
||||||
|
ETH_ALEN, MAX_ADDR_LEN);
|
||||||
|
|
||||||
|
SET_NETDEV_DEV(ndev, wiphy_dev(wiphy));
|
||||||
|
ndev->watchdog_timeo = MRVDRV_DEFAULT_UAP_WATCHDOG_TIMEOUT;
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
|
||||||
|
ndev->needed_headroom += MLAN_MIN_DATA_HEADER_LEN +
|
||||||
|
sizeof(mlan_buffer) + priv->extra_tx_head_len;
|
||||||
|
#else
|
||||||
|
ndev->hard_header_len += MLAN_MIN_DATA_HEADER_LEN +
|
||||||
|
sizeof(mlan_buffer) + priv->extra_tx_head_len;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ndev->flags |= IFF_BROADCAST | IFF_MULTICAST;
|
||||||
|
|
||||||
|
new_priv = netdev_priv(ndev);
|
||||||
|
|
||||||
|
ndev->ieee80211_ptr = &new_priv->w_dev;
|
||||||
|
|
||||||
|
new_priv->wdev = &new_priv->w_dev;
|
||||||
|
new_priv->netdev = ndev;
|
||||||
|
new_priv->extra_tx_head_len = priv->extra_tx_head_len;
|
||||||
|
|
||||||
|
moal_memcpy_ext(priv->phandle, new_priv->current_addr,
|
||||||
|
priv->current_addr, ETH_ALEN, ETH_ALEN);
|
||||||
|
|
||||||
|
new_priv->phandle = handle;
|
||||||
|
new_priv->wdev->wiphy = handle->wiphy;
|
||||||
|
new_priv->bss_type = MLAN_BSS_TYPE_UAP;
|
||||||
|
new_priv->bss_role = MLAN_BSS_ROLE_UAP;
|
||||||
|
new_priv->bss_index = priv->bss_index;
|
||||||
|
new_priv->parent_priv = priv;
|
||||||
|
new_priv->wdev->iftype = NL80211_IFTYPE_AP_VLAN;
|
||||||
|
|
||||||
|
ndev->ieee80211_ptr->use_4addr = params->use_4addr;
|
||||||
|
|
||||||
|
ret = register_netdevice(ndev);
|
||||||
|
if (ret) {
|
||||||
|
PRINTM(MFATAL, "register net_device failed, ret=%d\n", ret);
|
||||||
|
free_netdev(ndev);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (new_dev)
|
||||||
|
*new_dev = ndev;
|
||||||
|
fail:
|
||||||
|
LEAVE();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WIFI_DIRECT_SUPPORT
|
#ifdef WIFI_DIRECT_SUPPORT
|
||||||
#if CFG80211_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION
|
#if CFG80211_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION
|
||||||
/**
|
/**
|
||||||
|
@ -2348,6 +2515,20 @@ woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, const char *name,
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case NL80211_IFTYPE_AP_VLAN:
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)
|
||||||
|
#if CFG80211_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
||||||
|
ret = woal_cfg80211_add_vlan_vir_if(
|
||||||
|
wiphy, name, name_assign_type, flags, params, &ndev);
|
||||||
|
#else
|
||||||
|
ret = woal_cfg80211_add_vlan_vir_if(
|
||||||
|
wiphy, name, name_assign_type, params, &ndev);
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
ret = woal_cfg80211_add_vlan_vir_if(wiphy, name, flags, params,
|
||||||
|
&ndev);
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
PRINTM(MWARN, "Not supported if type: %d\n", type);
|
PRINTM(MWARN, "Not supported if type: %d\n", type);
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
|
@ -2404,6 +2585,9 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
|
||||||
struct net_device *dev = wdev->netdev;
|
struct net_device *dev = wdev->netdev;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
moal_private *vlan_priv = NULL;
|
||||||
|
t_u16 aid = 0;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
PRINTM(MIOCTL, "del virtual intf %s\n", dev->name);
|
PRINTM(MIOCTL, "del virtual intf %s\n", dev->name);
|
||||||
|
@ -2428,6 +2612,26 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
/**
|
||||||
|
* For multi-ap virtual interface, unregister netdevice
|
||||||
|
* directly for now. Will add more in the future.
|
||||||
|
*/
|
||||||
|
if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP_VLAN) {
|
||||||
|
/* stop network before doing cleanup */
|
||||||
|
if (netif_carrier_ok(dev))
|
||||||
|
netif_carrier_off(dev);
|
||||||
|
vlan_priv = (moal_private *)netdev_priv(dev);
|
||||||
|
aid = vlan_priv->vlan_sta_ptr->aid;
|
||||||
|
PRINTM(MCMND, "wlan: Easymesh del Vlan aid=%d\n", aid);
|
||||||
|
vlan_priv->parent_priv->vlan_sta_list[(aid - 1) % MAX_STA_COUNT]
|
||||||
|
->is_valid = MFALSE;
|
||||||
|
unregister_netdevice(dev);
|
||||||
|
LEAVE();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP) {
|
if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP) {
|
||||||
for (i = 0; i < handle->priv_num; i++) {
|
for (i = 0; i < handle->priv_num; i++) {
|
||||||
vir_priv = handle->priv[i];
|
vir_priv = handle->priv[i];
|
||||||
|
@ -2761,6 +2965,7 @@ int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev)
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
moal_private *pmpriv = NULL;
|
moal_private *pmpriv = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
int i;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -2842,6 +3047,19 @@ int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev)
|
||||||
memset(priv->uap_wep_key, 0, sizeof(priv->uap_wep_key));
|
memset(priv->uap_wep_key, 0, sizeof(priv->uap_wep_key));
|
||||||
priv->channel = 0;
|
priv->channel = 0;
|
||||||
priv->bandwidth = 0;
|
priv->bandwidth = 0;
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
priv->multi_ap_flag = 0;
|
||||||
|
/* Clear the whole backhaul station list in moal */
|
||||||
|
for (i = 0; i < MAX_STA_COUNT; i++) {
|
||||||
|
if (priv->vlan_sta_list[i]) {
|
||||||
|
if (priv->vlan_sta_list[i]->is_valid)
|
||||||
|
unregister_netdevice(
|
||||||
|
priv->vlan_sta_list[i]->netdev);
|
||||||
|
kfree(priv->vlan_sta_list[i]);
|
||||||
|
}
|
||||||
|
priv->vlan_sta_list[i] = NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
PRINTM(MMSG, "wlan: AP stopped\n");
|
PRINTM(MMSG, "wlan: AP stopped\n");
|
||||||
done:
|
done:
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
|
|
@ -119,6 +119,16 @@ int woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
||||||
ret = woal_set_get_bss_role(priv, wrq);
|
ret = woal_set_get_bss_role(priv, wrq);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#if defined(UAP_CFG80211)
|
||||||
|
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||||
|
case WOAL_UAP_SET_MODE:
|
||||||
|
PRINTM(MINFO,
|
||||||
|
"%s: setting multi_ap flag through user command\n",
|
||||||
|
__func__);
|
||||||
|
ret = woal_uap_set_get_multi_ap_mode(priv, wrq);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
|
|
@ -65,6 +65,11 @@ Change log:
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(UAP_CFG80211)
|
||||||
|
/** Private command ID for set multi-AP BSS mode */
|
||||||
|
#define WOAL_UAP_SET_MODE 27
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Private command ID for hostcmd */
|
/** Private command ID for hostcmd */
|
||||||
#define WOAL_UAP_HOST_CMD (WOAL_UAP_IOCTL + 17)
|
#define WOAL_UAP_HOST_CMD (WOAL_UAP_IOCTL + 17)
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,10 @@ static const struct iw_priv_args woal_uap_priv_args[] = {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(UAP_CFG80211)
|
||||||
|
{WOAL_UAP_SET_MODE, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||||
|
"setmode"},
|
||||||
|
#endif
|
||||||
{WOAL_UAP_SET_GET_256_CHAR, IW_PRIV_TYPE_CHAR | 256,
|
{WOAL_UAP_SET_GET_256_CHAR, IW_PRIV_TYPE_CHAR | 256,
|
||||||
IW_PRIV_TYPE_CHAR | 256, ""},
|
IW_PRIV_TYPE_CHAR | 256, ""},
|
||||||
{WOAL_WL_FW_RELOAD, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256,
|
{WOAL_WL_FW_RELOAD, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256,
|
||||||
|
|
Loading…
Reference in a new issue