MLK-24191 net: wireless: nxp: mxm_wifiex: upgrade to mxm4x17175 release
The MxM wifi driver upgrade to. ssh://git@bitbucket.sw.nxp.com/wcswrel/ rel-nxp-wifi-fp92-bt-fp85-linux-android-mxm4x17175-mgpl.git The release main changes: - includes previous bugfixs - fix the coverity issues - fix the coding style Reviewed-by: yang.tian <yang.tian@nxp.com> Signed-off-by: Fugang Duan <fugang.duan@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
749435ba3d
commit
6b4a83a75f
|
@ -266,6 +266,7 @@ endif
|
|||
ccflags-y += -Wno-stringop-overflow
|
||||
ccflags-y += -Wno-tautological-compare
|
||||
ccflags-y += -Wno-packed-bitfield-compat
|
||||
ccflags-y += -Wno-stringop-truncation
|
||||
|
||||
#############################################################################
|
||||
# Make Targets
|
||||
|
|
|
@ -55,9 +55,8 @@ t_u16 wlan_convert_mcsmap_to_maxrate(mlan_private *priv, t_u16 bands,
|
|||
* @return channel center frequency center, if found; O, otherwise
|
||||
*/
|
||||
|
||||
t_u8
|
||||
wlan_get_center_freq_idx(IN mlan_private *pmpriv,
|
||||
IN t_u16 band, IN t_u32 pri_chan, IN t_u8 chan_bw)
|
||||
t_u8 wlan_get_center_freq_idx(IN mlan_private *pmpriv, IN t_u16 band,
|
||||
IN t_u32 pri_chan, IN t_u8 chan_bw)
|
||||
{
|
||||
t_u8 center_freq_idx = 0;
|
||||
|
||||
|
@ -141,7 +140,6 @@ wlan_get_center_freq_idx(IN mlan_private *pmpriv,
|
|||
break;
|
||||
}
|
||||
/* fall through */
|
||||
|
||||
default: /* error. go to the default */
|
||||
center_freq_idx = 42;
|
||||
}
|
||||
|
@ -156,8 +154,7 @@ wlan_get_center_freq_idx(IN mlan_private *pmpriv,
|
|||
*
|
||||
* @return The bitmap of supported nss
|
||||
*/
|
||||
static t_u8
|
||||
wlan_get_nss_vht_mcs(t_u16 mcs_map_set)
|
||||
static t_u8 wlan_get_nss_vht_mcs(t_u16 mcs_map_set)
|
||||
{
|
||||
t_u8 nss, nss_map = 0;
|
||||
for (nss = 1; nss <= 8; nss++) {
|
||||
|
@ -175,8 +172,7 @@ wlan_get_nss_vht_mcs(t_u16 mcs_map_set)
|
|||
*
|
||||
* @return The bitmap of supported nss
|
||||
*/
|
||||
static t_u8
|
||||
wlan_get_nss_num_vht_mcs(t_u16 mcs_map_set)
|
||||
static t_u8 wlan_get_nss_num_vht_mcs(t_u16 mcs_map_set)
|
||||
{
|
||||
t_u8 nss, nss_num = 0;
|
||||
for (nss = 1; nss <= 8; nss++) {
|
||||
|
@ -196,8 +192,8 @@ wlan_get_nss_num_vht_mcs(t_u16 mcs_map_set)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
wlan_fill_cap_info(mlan_private *priv, VHT_capa_t *vht_cap, t_u8 bands)
|
||||
static void wlan_fill_cap_info(mlan_private *priv, VHT_capa_t *vht_cap,
|
||||
t_u8 bands)
|
||||
{
|
||||
t_u32 usr_dot_11ac_dev_cap;
|
||||
|
||||
|
@ -221,8 +217,7 @@ wlan_fill_cap_info(mlan_private *priv, VHT_capa_t *vht_cap, t_u8 bands)
|
|||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_11ac_ioctl_vhtcfg(IN pmlan_adapter pmadapter,
|
||||
static mlan_status wlan_11ac_ioctl_vhtcfg(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -233,7 +228,8 @@ wlan_11ac_ioctl_vhtcfg(IN pmlan_adapter pmadapter,
|
|||
t_u32 cfg_value = 0;
|
||||
t_u32 hw_value = 0;
|
||||
t_u8 nss = 0;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(USB9097) || defined(SD9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SD9097)
|
||||
t_u16 rx_nss = 0;
|
||||
t_u16 tx_nss = 0;
|
||||
#endif
|
||||
|
@ -241,9 +237,8 @@ wlan_11ac_ioctl_vhtcfg(IN pmlan_adapter pmadapter,
|
|||
ENTER();
|
||||
|
||||
#define VHT_CAP_INFO_BIT_FIELDS \
|
||||
(MBIT(4)|MBIT(5)|MBIT(6)|MBIT(7)| \
|
||||
MBIT(11)|MBIT(12)|MBIT(19)|MBIT(20)| \
|
||||
MBIT(21)|MBIT(22)|MBIT(28)|MBIT(29))
|
||||
(MBIT(4) | MBIT(5) | MBIT(6) | MBIT(7) | MBIT(11) | MBIT(12) | \
|
||||
MBIT(19) | MBIT(20) | MBIT(21) | MBIT(22) | MBIT(28) | MBIT(29))
|
||||
|
||||
cfg = (mlan_ds_11ac_cfg *)pioctl_req->pbuf;
|
||||
|
||||
|
@ -296,12 +291,10 @@ wlan_11ac_ioctl_vhtcfg(IN pmlan_adapter pmadapter,
|
|||
hw_value = GET_VHTCAP_NUMSNDDM(pmadapter->hw_dot_11ac_dev_cap);
|
||||
SET_VHTCAP_NUMSNDDM(usr_vht_cap_info, MIN(cfg_value, hw_value));
|
||||
/** set Number of Max AMPDU Length Exponent (bit 23 - bit 25) */
|
||||
cfg_value =
|
||||
GET_VHTCAP_MAXAMPDULENEXP(cfg->param.vht_cfg.
|
||||
vht_cap_info);
|
||||
hw_value =
|
||||
GET_VHTCAP_MAXAMPDULENEXP(pmadapter->
|
||||
hw_dot_11ac_dev_cap);
|
||||
cfg_value = GET_VHTCAP_MAXAMPDULENEXP(
|
||||
cfg->param.vht_cfg.vht_cap_info);
|
||||
hw_value = GET_VHTCAP_MAXAMPDULENEXP(
|
||||
pmadapter->hw_dot_11ac_dev_cap);
|
||||
SET_VHTCAP_MAXAMPDULENEXP(usr_vht_cap_info,
|
||||
MIN(cfg_value, hw_value));
|
||||
/** set VHT Link Adaptation Capable (bit 26 - bit 27) */
|
||||
|
@ -311,101 +304,100 @@ wlan_11ac_ioctl_vhtcfg(IN pmlan_adapter pmadapter,
|
|||
GET_VHTCAP_LINKADPCAP(pmadapter->hw_dot_11ac_dev_cap);
|
||||
SET_VHTCAP_LINKADPCAP(usr_vht_cap_info,
|
||||
MIN(cfg_value, hw_value));
|
||||
/** update the user setting if it is beyond the hw capabiliteis */
|
||||
/** update the user setting if it is beyond the hw capabiliteis
|
||||
*/
|
||||
cfg->param.vht_cfg.vht_cap_info = usr_vht_cap_info;
|
||||
PRINTM(MINFO, "Set: vht cap info 0x%x\n", usr_vht_cap_info);
|
||||
|
||||
/** update the RX MCS map */
|
||||
if (cfg->param.vht_cfg.txrx & MLAN_RADIO_RX) {
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
if (cfg->param.vht_cfg.band == BAND_SELECT_A) {
|
||||
rx_nss = GET_RXMCSSUPP(pmadapter->
|
||||
user_htstream >>
|
||||
8);
|
||||
tx_nss = GET_TXMCSSUPP(pmadapter->
|
||||
user_htstream >>
|
||||
8) & 0x0f;
|
||||
rx_nss = GET_RXMCSSUPP(
|
||||
pmadapter->user_htstream >> 8);
|
||||
tx_nss =
|
||||
GET_TXMCSSUPP(
|
||||
pmadapter->user_htstream >>
|
||||
8) &
|
||||
0x0f;
|
||||
} else {
|
||||
rx_nss = GET_RXMCSSUPP(pmadapter->
|
||||
user_htstream);
|
||||
tx_nss = GET_TXMCSSUPP(pmadapter->
|
||||
user_htstream) &
|
||||
rx_nss = GET_RXMCSSUPP(
|
||||
pmadapter->user_htstream);
|
||||
tx_nss =
|
||||
GET_TXMCSSUPP(
|
||||
pmadapter->user_htstream) &
|
||||
0x0f;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* use the previous user value */
|
||||
if (cfg->param.vht_cfg.vht_rx_mcs == 0xffffffff)
|
||||
cfg->param.vht_cfg.vht_rx_mcs =
|
||||
GET_VHTMCS(pmpriv->
|
||||
usr_dot_11ac_mcs_support);
|
||||
cfg->param.vht_cfg.vht_rx_mcs = GET_VHTMCS(
|
||||
pmpriv->usr_dot_11ac_mcs_support);
|
||||
for (nss = 1; nss <= 8; nss++) {
|
||||
cfg_value =
|
||||
GET_VHTNSSMCS(cfg->param.vht_cfg.
|
||||
vht_rx_mcs, nss);
|
||||
hw_value =
|
||||
GET_DEVNSSRXMCS(pmadapter->
|
||||
hw_dot_11ac_mcs_support,
|
||||
cfg_value = GET_VHTNSSMCS(
|
||||
cfg->param.vht_cfg.vht_rx_mcs, nss);
|
||||
hw_value = GET_DEVNSSRXMCS(
|
||||
pmadapter->hw_dot_11ac_mcs_support,
|
||||
nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
if ((rx_nss != 0) && (nss > rx_nss))
|
||||
cfg_value = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
if ((hw_value == NO_NSS_SUPPORT) ||
|
||||
(cfg_value == NO_NSS_SUPPORT))
|
||||
SET_VHTNSSMCS(cfg->param.vht_cfg.
|
||||
vht_rx_mcs, nss,
|
||||
NO_NSS_SUPPORT);
|
||||
SET_VHTNSSMCS(
|
||||
cfg->param.vht_cfg.vht_rx_mcs,
|
||||
nss, NO_NSS_SUPPORT);
|
||||
else
|
||||
SET_VHTNSSMCS(cfg->param.vht_cfg.
|
||||
vht_rx_mcs, nss,
|
||||
MIN(cfg_value, hw_value));
|
||||
SET_VHTNSSMCS(
|
||||
cfg->param.vht_cfg.vht_rx_mcs,
|
||||
nss, MIN(cfg_value, hw_value));
|
||||
}
|
||||
PRINTM(MINFO, "Set: vht rx mcs set 0x%08x\n",
|
||||
cfg->param.vht_cfg.vht_rx_mcs);
|
||||
/* use the previous user value */
|
||||
if (cfg->param.vht_cfg.vht_tx_mcs == 0xffffffff)
|
||||
cfg->param.vht_cfg.vht_tx_mcs =
|
||||
GET_VHTMCS(pmpriv->
|
||||
usr_dot_11ac_mcs_support >>
|
||||
16);
|
||||
cfg->param.vht_cfg.vht_tx_mcs = GET_VHTMCS(
|
||||
pmpriv->usr_dot_11ac_mcs_support >> 16);
|
||||
for (nss = 1; nss <= 8; nss++) {
|
||||
cfg_value =
|
||||
GET_VHTNSSMCS(cfg->param.vht_cfg.
|
||||
vht_tx_mcs, nss);
|
||||
hw_value =
|
||||
GET_DEVNSSTXMCS(pmadapter->
|
||||
hw_dot_11ac_mcs_support,
|
||||
cfg_value = GET_VHTNSSMCS(
|
||||
cfg->param.vht_cfg.vht_tx_mcs, nss);
|
||||
hw_value = GET_DEVNSSTXMCS(
|
||||
pmadapter->hw_dot_11ac_mcs_support,
|
||||
nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
if ((rx_nss != 0) && (nss > rx_nss))
|
||||
cfg_value = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
if ((hw_value == NO_NSS_SUPPORT) ||
|
||||
(cfg_value == NO_NSS_SUPPORT))
|
||||
SET_VHTNSSMCS(cfg->param.vht_cfg.
|
||||
vht_tx_mcs, nss,
|
||||
NO_NSS_SUPPORT);
|
||||
SET_VHTNSSMCS(
|
||||
cfg->param.vht_cfg.vht_tx_mcs,
|
||||
nss, NO_NSS_SUPPORT);
|
||||
else
|
||||
SET_VHTNSSMCS(cfg->param.vht_cfg.
|
||||
vht_tx_mcs, nss,
|
||||
MIN(cfg_value, hw_value));
|
||||
SET_VHTNSSMCS(
|
||||
cfg->param.vht_cfg.vht_tx_mcs,
|
||||
nss, MIN(cfg_value, hw_value));
|
||||
}
|
||||
PRINTM(MINFO, "Set: vht tx mcs set 0x%08x\n",
|
||||
cfg->param.vht_cfg.vht_tx_mcs);
|
||||
if (!cfg->param.vht_cfg.skip_usr_11ac_mcs_cfg) {
|
||||
RESET_DEVRXMCSMAP(pmpriv->
|
||||
usr_dot_11ac_mcs_support);
|
||||
RESET_DEVRXMCSMAP(
|
||||
pmpriv->usr_dot_11ac_mcs_support);
|
||||
pmpriv->usr_dot_11ac_mcs_support |= GET_VHTMCS(
|
||||
cfg->param.vht_cfg.vht_rx_mcs);
|
||||
RESET_DEVTXMCSMAP(
|
||||
pmpriv->usr_dot_11ac_mcs_support);
|
||||
pmpriv->usr_dot_11ac_mcs_support |=
|
||||
GET_VHTMCS(cfg->param.vht_cfg.
|
||||
vht_rx_mcs);
|
||||
RESET_DEVTXMCSMAP(pmpriv->
|
||||
usr_dot_11ac_mcs_support);
|
||||
pmpriv->usr_dot_11ac_mcs_support |=
|
||||
(GET_VHTMCS
|
||||
(cfg->param.vht_cfg.vht_tx_mcs) << 16);
|
||||
(GET_VHTMCS(
|
||||
cfg->param.vht_cfg.vht_tx_mcs)
|
||||
<< 16);
|
||||
PRINTM(MINFO, "Set: vht mcs set 0x%08x\n",
|
||||
pmpriv->usr_dot_11ac_mcs_support);
|
||||
} else {
|
||||
|
@ -459,32 +451,18 @@ wlan_11ac_ioctl_vhtcfg(IN pmlan_adapter pmadapter,
|
|||
}
|
||||
cfg->param.vht_cfg.bwcfg =
|
||||
pmpriv->usr_dot_11ac_bw;
|
||||
cfg->param.vht_cfg.vht_rx_mcs =
|
||||
GET_DEVRXMCSMAP(pmpriv->
|
||||
usr_dot_11ac_mcs_support);
|
||||
cfg->param.vht_cfg.vht_tx_mcs =
|
||||
GET_DEVTXMCSMAP(pmpriv->
|
||||
usr_dot_11ac_mcs_support);
|
||||
cfg->param.vht_cfg.vht_rx_mcs = GET_DEVRXMCSMAP(
|
||||
pmpriv->usr_dot_11ac_mcs_support);
|
||||
cfg->param.vht_cfg.vht_tx_mcs = GET_DEVTXMCSMAP(
|
||||
pmpriv->usr_dot_11ac_mcs_support);
|
||||
cfg->param.vht_cfg.vht_rx_max_rate =
|
||||
wlan_convert_mcsmap_to_maxrate(pmpriv,
|
||||
cfg->
|
||||
param.
|
||||
vht_cfg.
|
||||
band,
|
||||
cfg->
|
||||
param.
|
||||
vht_cfg.
|
||||
vht_rx_mcs);
|
||||
wlan_convert_mcsmap_to_maxrate(
|
||||
pmpriv, cfg->param.vht_cfg.band,
|
||||
cfg->param.vht_cfg.vht_rx_mcs);
|
||||
cfg->param.vht_cfg.vht_tx_max_rate =
|
||||
wlan_convert_mcsmap_to_maxrate(pmpriv,
|
||||
cfg->
|
||||
param.
|
||||
vht_cfg.
|
||||
band,
|
||||
cfg->
|
||||
param.
|
||||
vht_cfg.
|
||||
vht_tx_mcs);
|
||||
wlan_convert_mcsmap_to_maxrate(
|
||||
pmpriv, cfg->param.vht_cfg.band,
|
||||
cfg->param.vht_cfg.vht_tx_mcs);
|
||||
}
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -497,10 +475,7 @@ wlan_11ac_ioctl_vhtcfg(IN pmlan_adapter pmadapter,
|
|||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_11AC_CFG,
|
||||
cmd_action,
|
||||
0,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_11AC_CFG, cmd_action, 0,
|
||||
(t_void *)pioctl_req,
|
||||
(t_void *)&cfg->param.vht_cfg);
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
|
@ -518,8 +493,7 @@ wlan_11ac_ioctl_vhtcfg(IN pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS --success, otherwise fail
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_11ac_ioctl_opermodecfg(IN pmlan_adapter pmadapter,
|
||||
static mlan_status wlan_11ac_ioctl_opermodecfg(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_ds_11ac_cfg *cfg = MNULL;
|
||||
|
@ -536,10 +510,8 @@ wlan_11ac_ioctl_opermodecfg(IN pmlan_adapter pmadapter,
|
|||
} else if (pioctl_req->action == MLAN_ACT_SET) {
|
||||
hw_bw_160or8080 =
|
||||
GET_VHTCAP_CHWDSET(pmadapter->hw_dot_11ac_dev_cap);
|
||||
hw_rx_nss =
|
||||
wlan_get_nss_num_vht_mcs(GET_DEVRXMCSMAP
|
||||
(pmadapter->
|
||||
hw_dot_11ac_mcs_support));
|
||||
hw_rx_nss = wlan_get_nss_num_vht_mcs(
|
||||
GET_DEVRXMCSMAP(pmadapter->hw_dot_11ac_mcs_support));
|
||||
if ((((cfg->param.opermode_cfg.bw - 1) > BW_80MHZ) &&
|
||||
!hw_bw_160or8080) ||
|
||||
(cfg->param.opermode_cfg.nss > hw_rx_nss)) {
|
||||
|
@ -614,8 +586,7 @@ wlan_11ac_ioctl_supported_mcs_set(IN pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_show_dot11acdevcap(pmlan_adapter pmadapter, t_u32 cap)
|
||||
void wlan_show_dot11acdevcap(pmlan_adapter pmadapter, t_u32 cap)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -678,8 +649,7 @@ wlan_show_dot11acdevcap(pmlan_adapter pmadapter, t_u32 cap)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_show_dot11acmcssupport(pmlan_adapter pmadapter, t_u32 support)
|
||||
void wlan_show_dot11acmcssupport(pmlan_adapter pmadapter, t_u32 support)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -700,8 +670,8 @@ wlan_show_dot11acmcssupport(pmlan_adapter pmadapter, t_u32 support)
|
|||
*
|
||||
* @return the max data rate for long GI
|
||||
*/
|
||||
t_u16
|
||||
wlan_convert_mcsmap_to_maxrate(mlan_private *priv, t_u16 bands, t_u16 mcs_map)
|
||||
t_u16 wlan_convert_mcsmap_to_maxrate(mlan_private *priv, t_u16 bands,
|
||||
t_u16 mcs_map)
|
||||
{
|
||||
t_u8 i;
|
||||
t_u8 nss;
|
||||
|
@ -797,8 +767,8 @@ wlan_convert_mcsmap_to_maxrate(mlan_private *priv, t_u16 bands, t_u16 mcs_map)
|
|||
/* MCS9 is not supported in NSS1/2/4/5/7/8 */
|
||||
if (max_mcs >= 1 && max_rate == 0)
|
||||
max_rate =
|
||||
max_rate_lgi_20MHZ[nss][max_mcs
|
||||
- 1];
|
||||
max_rate_lgi_20MHZ[nss]
|
||||
[max_mcs - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -817,10 +787,8 @@ wlan_convert_mcsmap_to_maxrate(mlan_private *priv, t_u16 bands, t_u16 mcs_map)
|
|||
* @param bw_80p80 TRUE -- enable 80p80
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_fill_vht_cap_tlv(mlan_private *priv,
|
||||
MrvlIETypes_VHTCap_t *pvht_cap, t_u16 bands, t_u8 flag,
|
||||
t_u8 bw_80p80)
|
||||
void wlan_fill_vht_cap_tlv(mlan_private *priv, MrvlIETypes_VHTCap_t *pvht_cap,
|
||||
t_u16 bands, t_u8 flag, t_u8 bw_80p80)
|
||||
{
|
||||
t_u16 mcs_map_user = 0;
|
||||
t_u16 mcs_map_resp = 0;
|
||||
|
@ -828,7 +796,8 @@ wlan_fill_vht_cap_tlv(mlan_private *priv,
|
|||
t_u16 mcs_user = 0;
|
||||
t_u16 mcs_resp = 0;
|
||||
t_u16 nss;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
t_u16 rx_nss = 0, tx_nss = 0;
|
||||
#endif
|
||||
ENTER();
|
||||
|
@ -848,18 +817,20 @@ wlan_fill_vht_cap_tlv(mlan_private *priv,
|
|||
if (flag)
|
||||
mcs_map_resp =
|
||||
wlan_le16_to_cpu(pvht_cap->vht_cap.mcs_sets.rx_mcs_map);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
if (IS_CARD9098(priv->adapter->card_type) ||
|
||||
IS_CARD9097(priv->adapter->card_type)) {
|
||||
if (bands & BAND_A) {
|
||||
rx_nss = GET_RXMCSSUPP(priv->adapter->
|
||||
user_htstream >> 8);
|
||||
tx_nss = GET_TXMCSSUPP(priv->adapter->
|
||||
user_htstream >> 8) & 0x0f;
|
||||
rx_nss = GET_RXMCSSUPP(priv->adapter->user_htstream >>
|
||||
8);
|
||||
tx_nss = GET_TXMCSSUPP(priv->adapter->user_htstream >>
|
||||
8) &
|
||||
0x0f;
|
||||
} else {
|
||||
rx_nss = GET_RXMCSSUPP(priv->adapter->user_htstream);
|
||||
tx_nss = GET_TXMCSSUPP(priv->adapter->
|
||||
user_htstream) & 0x0f;
|
||||
tx_nss = GET_TXMCSSUPP(priv->adapter->user_htstream) &
|
||||
0x0f;
|
||||
}
|
||||
/** force 1x1 when enable 80P80 */
|
||||
if (bw_80p80)
|
||||
|
@ -870,7 +841,8 @@ wlan_fill_vht_cap_tlv(mlan_private *priv,
|
|||
for (nss = 1; nss <= 8; nss++) {
|
||||
mcs_user = GET_VHTNSSMCS(mcs_map_user, nss);
|
||||
mcs_resp = GET_VHTNSSMCS(mcs_map_resp, nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
if ((rx_nss != 0) && (nss > rx_nss))
|
||||
mcs_user = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
|
@ -901,7 +873,8 @@ wlan_fill_vht_cap_tlv(mlan_private *priv,
|
|||
for (nss = 1; nss <= 8; nss++) {
|
||||
mcs_user = GET_VHTNSSMCS(mcs_map_user, nss);
|
||||
mcs_resp = GET_VHTNSSMCS(mcs_map_resp, nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
if ((tx_nss != 0) && (nss > tx_nss))
|
||||
mcs_user = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
|
@ -935,9 +908,8 @@ wlan_fill_vht_cap_tlv(mlan_private *priv,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_fill_vht_cap_ie(mlan_private *priv,
|
||||
IEEEtypes_VHTCap_t *pvht_cap, t_u16 bands)
|
||||
void wlan_fill_vht_cap_ie(mlan_private *priv, IEEEtypes_VHTCap_t *pvht_cap,
|
||||
t_u16 bands)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -952,19 +924,15 @@ wlan_fill_vht_cap_ie(mlan_private *priv,
|
|||
GET_DEVRXMCSMAP(priv->usr_dot_11ac_mcs_support);
|
||||
|
||||
/* rx highest rate */
|
||||
pvht_cap->vht_cap.mcs_sets.rx_max_rate =
|
||||
wlan_convert_mcsmap_to_maxrate(priv, bands,
|
||||
pvht_cap->vht_cap.mcs_sets.
|
||||
rx_mcs_map);
|
||||
pvht_cap->vht_cap.mcs_sets.rx_max_rate = wlan_convert_mcsmap_to_maxrate(
|
||||
priv, bands, pvht_cap->vht_cap.mcs_sets.rx_mcs_map);
|
||||
|
||||
/* tx MCS map */
|
||||
pvht_cap->vht_cap.mcs_sets.tx_mcs_map =
|
||||
GET_DEVTXMCSMAP(priv->usr_dot_11ac_mcs_support);
|
||||
/* tx highest rate */
|
||||
pvht_cap->vht_cap.mcs_sets.tx_max_rate =
|
||||
wlan_convert_mcsmap_to_maxrate(priv, bands,
|
||||
pvht_cap->vht_cap.mcs_sets.
|
||||
tx_mcs_map);
|
||||
pvht_cap->vht_cap.mcs_sets.tx_max_rate = wlan_convert_mcsmap_to_maxrate(
|
||||
priv, bands, pvht_cap->vht_cap.mcs_sets.tx_mcs_map);
|
||||
|
||||
LEAVE();
|
||||
return;
|
||||
|
@ -978,11 +946,11 @@ wlan_fill_vht_cap_ie(mlan_private *priv,
|
|||
*
|
||||
* @return ret suport 80+80Mhz or not
|
||||
*/
|
||||
t_u8
|
||||
wlan_is_80_80_support(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
||||
t_u8 wlan_is_80_80_support(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
||||
{
|
||||
t_u8 ret = MFALSE;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
t_u16 rx_nss = 0, tx_nss = 0;
|
||||
IEEEtypes_VHTCap_t *pvht_cap = pbss_desc->pvht_cap;
|
||||
MrvlIEtypes_He_cap_t *phecap = MNULL;
|
||||
|
@ -991,9 +959,10 @@ wlan_is_80_80_support(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
|
||||
ENTER();
|
||||
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
if (!IS_CARD9098(pmpriv->adapter->card_type)
|
||||
&& !IS_CARD9097(pmpriv->adapter->card_type))
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
if (!IS_CARD9098(pmpriv->adapter->card_type) &&
|
||||
!IS_CARD9097(pmpriv->adapter->card_type))
|
||||
return ret;
|
||||
/** check band A */
|
||||
if (!(pbss_desc->bss_band & BAND_A))
|
||||
|
@ -1006,15 +975,15 @@ wlan_is_80_80_support(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
if (rx_nss != 2 || tx_nss != 2)
|
||||
return ret;
|
||||
/** check if AP support AC 80P80 */
|
||||
if (ISSUPP_11ACBW8080(pmpriv->usr_dot_11ac_dev_cap_a)
|
||||
&& pvht_cap && ISSUPP_11ACBW8080(pvht_cap->vht_cap.vht_cap_info))
|
||||
if (ISSUPP_11ACBW8080(pmpriv->usr_dot_11ac_dev_cap_a) && pvht_cap &&
|
||||
ISSUPP_11ACBW8080(pvht_cap->vht_cap.vht_cap_info))
|
||||
ret = MTRUE;
|
||||
/** check if AP support AX 80P80 */
|
||||
if (pbss_desc->phe_cap) {
|
||||
pBsshecap = (IEEEtypes_HECap_t *)pbss_desc->phe_cap;
|
||||
phecap = (MrvlIEtypes_He_cap_t *)pmpriv->user_he_cap;
|
||||
if (ret && (phecap->he_phy_cap[0] & MBIT(4))
|
||||
&& (pBsshecap->he_phy_cap[0] & MBIT(4)))
|
||||
if (ret && (phecap->he_phy_cap[0] & MBIT(4)) &&
|
||||
(pBsshecap->he_phy_cap[0] & MBIT(4)))
|
||||
ret = MTRUE;
|
||||
else
|
||||
ret = MFALSE;
|
||||
|
@ -1033,8 +1002,7 @@ wlan_is_80_80_support(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
*
|
||||
* @return bytes added to the buffer
|
||||
*/
|
||||
int
|
||||
wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
||||
int wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
||||
t_u8 **ppbuffer)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
|
@ -1044,7 +1012,8 @@ wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
t_u16 nss;
|
||||
int ret_len = 0;
|
||||
t_u8 bw_80p80 = MFALSE;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(USB9097) || defined(SD9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SD9097)
|
||||
t_u16 rx_nss = 0;
|
||||
#endif
|
||||
|
||||
|
@ -1062,8 +1031,8 @@ wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
|
||||
/* VHT Capabilities IE */
|
||||
if (pbss_desc->pvht_cap &&
|
||||
wlan_get_nss_vht_mcs(pbss_desc->pvht_cap->vht_cap.mcs_sets.
|
||||
rx_mcs_map)) {
|
||||
wlan_get_nss_vht_mcs(
|
||||
pbss_desc->pvht_cap->vht_cap.mcs_sets.rx_mcs_map)) {
|
||||
pvht_cap = (MrvlIETypes_VHTCap_t *)*ppbuffer;
|
||||
memset(pmadapter, pvht_cap, 0, sizeof(MrvlIETypes_VHTCap_t));
|
||||
pvht_cap->header.type = wlan_cpu_to_le16(VHT_CAPABILITY);
|
||||
|
@ -1071,8 +1040,8 @@ wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
memcpy_ext(pmadapter,
|
||||
(t_u8 *)pvht_cap + sizeof(MrvlIEtypesHeader_t),
|
||||
(t_u8 *)pbss_desc->pvht_cap +
|
||||
sizeof(IEEEtypes_Header_t), pvht_cap->header.len,
|
||||
sizeof(VHT_capa_t));
|
||||
sizeof(IEEEtypes_Header_t),
|
||||
pvht_cap->header.len, sizeof(VHT_capa_t));
|
||||
bw_80p80 = wlan_is_80_80_support(pmpriv, pbss_desc);
|
||||
wlan_fill_vht_cap_tlv(pmpriv, pvht_cap, pbss_desc->bss_band,
|
||||
MTRUE, bw_80p80);
|
||||
|
@ -1102,34 +1071,36 @@ wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
pmpriv->usr_dot_11ac_opermode_bw - 1;
|
||||
if (pbss_desc->bss_band & BAND_G) {
|
||||
if (!(IS_OPER_MODE_20M(pmrvl_oper_mode->oper_mode))) {
|
||||
if (pbss_desc->pht_cap->ht_cap.
|
||||
ht_cap_info & MBIT(1))
|
||||
SET_OPER_MODE_40M(pmrvl_oper_mode->
|
||||
oper_mode);
|
||||
if (pbss_desc->pht_cap->ht_cap.ht_cap_info &
|
||||
MBIT(1))
|
||||
SET_OPER_MODE_40M(
|
||||
pmrvl_oper_mode->oper_mode);
|
||||
else
|
||||
SET_OPER_MODE_20M(pmrvl_oper_mode->
|
||||
oper_mode);
|
||||
SET_OPER_MODE_20M(
|
||||
pmrvl_oper_mode->oper_mode);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/** set default bandwidth:80M*/
|
||||
SET_OPER_MODE_80M(pmrvl_oper_mode->oper_mode);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
if (pbss_desc->bss_band & BAND_A)
|
||||
rx_nss = GET_RXMCSSUPP(pmadapter->
|
||||
user_htstream >> 8);
|
||||
rx_nss = GET_RXMCSSUPP(
|
||||
pmadapter->user_htstream >> 8);
|
||||
else
|
||||
rx_nss = GET_RXMCSSUPP(pmadapter->
|
||||
user_htstream);
|
||||
rx_nss =
|
||||
GET_RXMCSSUPP(pmadapter->user_htstream);
|
||||
}
|
||||
#endif
|
||||
mcs_map_user =
|
||||
GET_DEVRXMCSMAP(pmpriv->usr_dot_11ac_mcs_support);
|
||||
nss = wlan_get_nss_num_vht_mcs(mcs_map_user);
|
||||
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
PRINTM(MCMND, "rx_nss=%d nss=%d\n", rx_nss, nss);
|
||||
|
@ -1170,8 +1141,8 @@ wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS --success, otherwise fail
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11ac_cfg_ioctl(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
||||
mlan_status wlan_11ac_cfg_ioctl(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
mlan_ds_11ac_cfg *cfg = MNULL;
|
||||
|
@ -1216,10 +1187,9 @@ wlan_11ac_cfg_ioctl(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
|||
* @param pdata_buf A pointer to data buffer
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_cmd_11ac_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_void *pdata_buf)
|
||||
mlan_status wlan_cmd_11ac_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
HostCmd_DS_11AC_CFG *vhtcfg = &cmd->params.vhtcfg;
|
||||
|
@ -1258,9 +1228,9 @@ wlan_cmd_11ac_cfg(IN pmlan_private pmpriv,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_ret_11ac_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf)
|
||||
mlan_status wlan_ret_11ac_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
IN mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
mlan_ds_11ac_cfg *cfg = MNULL;
|
||||
|
@ -1291,33 +1261,29 @@ wlan_ret_11ac_cfg(IN pmlan_private pmpriv,
|
|||
cfg->param.vht_cfg.vht_tx_mcs =
|
||||
wlan_le32_to_cpu(cfg->param.vht_cfg.vht_tx_mcs);
|
||||
cfg->param.vht_cfg.vht_rx_max_rate =
|
||||
wlan_convert_mcsmap_to_maxrate(pmpriv,
|
||||
cfg->param.vht_cfg.band,
|
||||
cfg->param.vht_cfg.
|
||||
vht_rx_mcs);
|
||||
wlan_convert_mcsmap_to_maxrate(
|
||||
pmpriv, cfg->param.vht_cfg.band,
|
||||
cfg->param.vht_cfg.vht_rx_mcs);
|
||||
cfg->param.vht_cfg.vht_tx_max_rate =
|
||||
wlan_convert_mcsmap_to_maxrate(pmpriv,
|
||||
cfg->param.vht_cfg.band,
|
||||
cfg->param.vht_cfg.
|
||||
vht_tx_mcs);
|
||||
wlan_convert_mcsmap_to_maxrate(
|
||||
pmpriv, cfg->param.vht_cfg.band,
|
||||
cfg->param.vht_cfg.vht_tx_mcs);
|
||||
}
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
wlan_update_11ac_cap(mlan_private *pmpriv)
|
||||
void wlan_update_11ac_cap(mlan_private *pmpriv)
|
||||
{
|
||||
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
|
||||
pmpriv->usr_dot_11ac_mcs_support = pmadapter->hw_dot_11ac_mcs_support;
|
||||
pmpriv->usr_dot_11ac_dev_cap_bg =
|
||||
pmadapter->
|
||||
hw_dot_11ac_dev_cap & ~DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK;
|
||||
pmadapter->hw_dot_11ac_dev_cap &
|
||||
~DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK;
|
||||
pmpriv->usr_dot_11ac_dev_cap_a =
|
||||
pmadapter->
|
||||
hw_dot_11ac_dev_cap & ~DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK;
|
||||
pmadapter->hw_dot_11ac_dev_cap &
|
||||
~DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK;
|
||||
pmpriv->usr_dot_11ac_bw = BW_FOLLOW_VHTCAP;
|
||||
}
|
||||
|
||||
|
@ -1329,8 +1295,7 @@ wlan_update_11ac_cap(mlan_private *pmpriv)
|
|||
*
|
||||
* @return 0--not allowed, other value allowed
|
||||
*/
|
||||
t_u8
|
||||
wlan_11ac_bandconfig_allowed(mlan_private *pmpriv, t_u16 bss_band)
|
||||
t_u8 wlan_11ac_bandconfig_allowed(mlan_private *pmpriv, t_u16 bss_band)
|
||||
{
|
||||
if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS) {
|
||||
if (bss_band & BAND_G)
|
||||
|
|
|
@ -44,8 +44,8 @@ t_u8 wlan_11ac_bandconfig_allowed(mlan_private *pmpriv, t_u8 bss_band);
|
|||
t_u8 wlan_is_80_80_support(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc);
|
||||
|
||||
mlan_status wlan_cmd_11ac_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_void *pdata_buf);
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf);
|
||||
|
||||
mlan_status wlan_ret_11ac_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
|
|
|
@ -55,8 +55,7 @@
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_show_dot11axmaccap(pmlan_adapter pmadapter, t_u32 cap)
|
||||
void wlan_show_dot11axmaccap(pmlan_adapter pmadapter, t_u32 cap)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -71,8 +70,7 @@ wlan_show_dot11axmaccap(pmlan_adapter pmadapter, t_u32 cap)
|
|||
*
|
||||
* @return MTRUE/MFALSE
|
||||
*/
|
||||
t_u8
|
||||
wlan_check_ap_11ax_twt_supported(BSSDescriptor_t *pbss_desc)
|
||||
t_u8 wlan_check_ap_11ax_twt_supported(BSSDescriptor_t *pbss_desc)
|
||||
{
|
||||
if (!pbss_desc->phe_cap)
|
||||
return MFALSE;
|
||||
|
@ -92,8 +90,8 @@ wlan_check_ap_11ax_twt_supported(BSSDescriptor_t *pbss_desc)
|
|||
*
|
||||
* @return MTRUE/MFALSE
|
||||
*/
|
||||
t_u8
|
||||
wlan_check_11ax_twt_supported(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
||||
t_u8 wlan_check_11ax_twt_supported(mlan_private *pmpriv,
|
||||
BSSDescriptor_t *pbss_desc)
|
||||
{
|
||||
MrvlIEtypes_He_cap_t *phecap = MNULL;
|
||||
MrvlIEtypes_He_cap_t *hw_he_cap = MNULL;
|
||||
|
@ -101,18 +99,16 @@ wlan_check_11ax_twt_supported(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
if (!wlan_check_ap_11ax_twt_supported(pbss_desc))
|
||||
return MFALSE;
|
||||
if (pbss_desc->bss_band & BAND_A) {
|
||||
hw_he_cap =
|
||||
(MrvlIEtypes_He_cap_t *) & pmpriv->adapter->hw_he_cap;
|
||||
hw_he_cap = (MrvlIEtypes_He_cap_t *)&pmpriv->adapter->hw_he_cap;
|
||||
phecap = (MrvlIEtypes_He_cap_t *)&pmpriv->user_he_cap;
|
||||
} else {
|
||||
hw_he_cap =
|
||||
(MrvlIEtypes_He_cap_t *) & pmpriv->adapter->
|
||||
hw_2g_he_cap;
|
||||
(MrvlIEtypes_He_cap_t *)&pmpriv->adapter->hw_2g_he_cap;
|
||||
phecap = (MrvlIEtypes_He_cap_t *)&pmpriv->user_2g_he_cap;
|
||||
}
|
||||
if (!(hw_he_cap->he_mac_cap[0] & HE_MAC_CAP_TWT_REQ_SUPPORT))
|
||||
return MFALSE;
|
||||
if (phecap->he_mac_cap[0] & HE_MAC_CAP_TWT_REQ_SUPPORT) ;
|
||||
if (phecap->he_mac_cap[0] & HE_MAC_CAP_TWT_REQ_SUPPORT)
|
||||
return MTRUE;
|
||||
return MFALSE;
|
||||
}
|
||||
|
@ -125,8 +121,7 @@ wlan_check_11ax_twt_supported(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_show_dot11axphycap(pmlan_adapter pmadapter, t_u32 support)
|
||||
void wlan_show_dot11axphycap(pmlan_adapter pmadapter, t_u32 support)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -145,8 +140,7 @@ wlan_show_dot11axphycap(pmlan_adapter pmadapter, t_u32 support)
|
|||
*
|
||||
* @return bytes added to the phe_cap
|
||||
*/
|
||||
t_u16
|
||||
wlan_fill_he_cap_tlv(mlan_private *pmpriv, t_u8 band,
|
||||
t_u16 wlan_fill_he_cap_tlv(mlan_private *pmpriv, t_u8 band,
|
||||
MrvlIEtypes_Extension_t *phe_cap, t_u8 flag)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
|
@ -183,8 +177,7 @@ wlan_fill_he_cap_tlv(mlan_private *pmpriv, t_u8 band,
|
|||
*
|
||||
* @return bytes added to the buffer
|
||||
*/
|
||||
int
|
||||
wlan_cmd_append_11ax_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
||||
int wlan_cmd_append_11ax_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
||||
t_u8 **ppbuffer)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
|
@ -257,11 +250,9 @@ wlan_cmd_append_11ax_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_update_11ax_cap(mlan_adapter *pmadapter,
|
||||
void wlan_update_11ax_cap(mlan_adapter *pmadapter,
|
||||
MrvlIEtypes_Extension_t *hw_he_cap)
|
||||
{
|
||||
|
||||
MrvlIEtypes_He_cap_t *phe_cap = MNULL;
|
||||
t_u8 i = 0;
|
||||
t_u8 he_cap_2g = 0;
|
||||
|
@ -274,8 +265,8 @@ wlan_update_11ax_cap(mlan_adapter *pmadapter,
|
|||
return;
|
||||
}
|
||||
phe_cap = (MrvlIEtypes_He_cap_t *)hw_he_cap;
|
||||
if (phe_cap->
|
||||
he_phy_cap[0] & (AX_2G_40MHZ_SUPPORT | AX_2G_20MHZ_SUPPORT)) {
|
||||
if (phe_cap->he_phy_cap[0] &
|
||||
(AX_2G_40MHZ_SUPPORT | AX_2G_20MHZ_SUPPORT)) {
|
||||
pmadapter->hw_2g_hecap_len =
|
||||
hw_he_cap->len + sizeof(MrvlIEtypesHeader_t);
|
||||
memcpy_ext(pmadapter, pmadapter->hw_2g_he_cap,
|
||||
|
@ -311,17 +302,17 @@ wlan_update_11ax_cap(mlan_adapter *pmadapter,
|
|||
pmadapter->priv[i]->user_2g_he_cap,
|
||||
pmadapter->hw_2g_he_cap,
|
||||
pmadapter->hw_2g_hecap_len,
|
||||
sizeof(pmadapter->priv[i]->
|
||||
user_2g_he_cap));
|
||||
sizeof(pmadapter->priv[i]
|
||||
->user_2g_he_cap));
|
||||
} else {
|
||||
pmadapter->priv[i]->user_hecap_len =
|
||||
pmadapter->hw_hecap_len;
|
||||
memcpy_ext(pmadapter,
|
||||
memcpy_ext(
|
||||
pmadapter,
|
||||
pmadapter->priv[i]->user_he_cap,
|
||||
pmadapter->hw_he_cap,
|
||||
pmadapter->hw_hecap_len,
|
||||
sizeof(pmadapter->priv[i]->
|
||||
user_he_cap));
|
||||
sizeof(pmadapter->priv[i]->user_he_cap));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -337,10 +328,8 @@ wlan_update_11ax_cap(mlan_adapter *pmadapter,
|
|||
*
|
||||
* @return 0--not allowed, other value allowed
|
||||
*/
|
||||
t_u16
|
||||
wlan_11ax_bandconfig_allowed(mlan_private *pmpriv, t_u16 bss_band)
|
||||
t_u16 wlan_11ax_bandconfig_allowed(mlan_private *pmpriv, t_u16 bss_band)
|
||||
{
|
||||
|
||||
if (!IS_FW_SUPPORT_11AX(pmpriv->adapter))
|
||||
return MFALSE;
|
||||
if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS) {
|
||||
|
@ -365,8 +354,8 @@ wlan_11ax_bandconfig_allowed(mlan_private *pmpriv, t_u16 bss_band)
|
|||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_11ax_ioctl_hecfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req)
|
||||
static mlan_status wlan_11ax_ioctl_hecfg(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
|
@ -402,10 +391,7 @@ wlan_11ax_ioctl_hecfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req)
|
|||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_11AX_CFG,
|
||||
cmd_action,
|
||||
0,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_11AX_CFG, cmd_action, 0,
|
||||
(t_void *)pioctl_req,
|
||||
(t_void *)&cfg->param.he_cfg);
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
|
@ -423,8 +409,8 @@ wlan_11ax_ioctl_hecfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS --success, otherwise fail
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11ax_cfg_ioctl(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
||||
mlan_status wlan_11ax_cfg_ioctl(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
mlan_ds_11ax_cfg *cfg = MNULL;
|
||||
|
@ -439,6 +425,9 @@ wlan_11ax_cfg_ioctl(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
|||
case MLAN_OID_11AX_CMD_CFG:
|
||||
status = wlan_11ax_ioctl_cmd(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_11AX_TWT_CFG:
|
||||
status = wlan_11ax_ioctl_twtcfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
default:
|
||||
pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID;
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
|
@ -457,10 +446,9 @@ wlan_11ax_cfg_ioctl(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
|||
* @param pdata_buf A pointer to data buffer
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_cmd_11ax_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_void *pdata_buf)
|
||||
mlan_status wlan_cmd_11ax_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
HostCmd_DS_11AX_CFG *axcfg = &cmd->params.axcfg;
|
||||
|
@ -481,8 +469,8 @@ wlan_cmd_11ax_cfg(IN pmlan_private pmpriv,
|
|||
tlv = (MrvlIEtypes_Extension_t *)pos;
|
||||
tlv->type = wlan_cpu_to_le16(hecfg->he_cap.id);
|
||||
tlv->len = wlan_cpu_to_le16(hecfg->he_cap.len);
|
||||
memcpy_ext(pmadapter, &tlv->ext_id,
|
||||
&hecfg->he_cap.ext_id, hecfg->he_cap.len,
|
||||
memcpy_ext(pmadapter, &tlv->ext_id, &hecfg->he_cap.ext_id,
|
||||
hecfg->he_cap.len,
|
||||
MRVDRV_SIZE_OF_CMD_BUFFER - cmd->size);
|
||||
cmd->size += hecfg->he_cap.len + sizeof(MrvlIEtypesHeader_t);
|
||||
pos += hecfg->he_cap.len + sizeof(MrvlIEtypesHeader_t);
|
||||
|
@ -493,7 +481,6 @@ wlan_cmd_11ax_cfg(IN pmlan_private pmpriv,
|
|||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of 11axcfg
|
||||
*
|
||||
|
@ -503,9 +490,9 @@ wlan_cmd_11ax_cfg(IN pmlan_private pmpriv,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_ret_11ax_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf)
|
||||
mlan_status wlan_ret_11ax_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
IN mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
mlan_ds_11ax_cfg *cfg = MNULL;
|
||||
|
@ -541,32 +528,31 @@ wlan_ret_11ax_cfg(IN pmlan_private pmpriv,
|
|||
sizeof(mlan_ds_11ax_he_capa) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
if (cfg->param.he_cfg.band & MBIT(1)) {
|
||||
memcpy_ext(pmadapter,
|
||||
memcpy_ext(
|
||||
pmadapter,
|
||||
(t_u8 *)&pmpriv->user_he_cap,
|
||||
(t_u8 *)tlv,
|
||||
tlv_len +
|
||||
sizeof(MrvlIEtypesHeader_t),
|
||||
sizeof(pmpriv->user_he_cap));
|
||||
pmpriv->user_hecap_len =
|
||||
MIN(tlv_len +
|
||||
pmpriv->user_hecap_len = MIN(
|
||||
tlv_len +
|
||||
sizeof(MrvlIEtypesHeader_t),
|
||||
sizeof(pmpriv->
|
||||
user_he_cap));
|
||||
sizeof(pmpriv->user_he_cap));
|
||||
PRINTM(MCMND, "user_hecap_len=%d\n",
|
||||
pmpriv->user_hecap_len);
|
||||
} else {
|
||||
memcpy_ext(pmadapter,
|
||||
(t_u8 *)&pmpriv->
|
||||
user_2g_he_cap, (t_u8 *)tlv,
|
||||
memcpy_ext(
|
||||
pmadapter,
|
||||
(t_u8 *)&pmpriv->user_2g_he_cap,
|
||||
(t_u8 *)tlv,
|
||||
tlv_len +
|
||||
sizeof(MrvlIEtypesHeader_t),
|
||||
sizeof(pmpriv->
|
||||
user_2g_he_cap));
|
||||
pmpriv->user_2g_hecap_len =
|
||||
MIN(tlv_len +
|
||||
sizeof(pmpriv->user_2g_he_cap));
|
||||
pmpriv->user_2g_hecap_len = MIN(
|
||||
tlv_len +
|
||||
sizeof(MrvlIEtypesHeader_t),
|
||||
sizeof(pmpriv->
|
||||
user_2g_he_cap));
|
||||
sizeof(pmpriv->user_2g_he_cap));
|
||||
PRINTM(MCMND, "user_2g_hecap_len=%d\n",
|
||||
pmpriv->user_2g_hecap_len);
|
||||
}
|
||||
|
@ -594,8 +580,8 @@ done:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS --success, otherwise fail
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11ax_ioctl_cmd(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
||||
mlan_status wlan_11ax_ioctl_cmd(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
mlan_ds_11ax_cmd_cfg *cfg = MNULL;
|
||||
|
@ -620,10 +606,8 @@ wlan_11ax_ioctl_cmd(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
|||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
/* Send request to firmware */
|
||||
status = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_11AX_CMD,
|
||||
cmd_action,
|
||||
0, (t_void *)pioctl_req, (t_void *)cfg);
|
||||
status = wlan_prepare_cmd(pmpriv, HostCmd_CMD_11AX_CMD, cmd_action, 0,
|
||||
(t_void *)pioctl_req, (t_void *)cfg);
|
||||
if (status == MLAN_STATUS_SUCCESS)
|
||||
status = MLAN_STATUS_PENDING;
|
||||
|
||||
|
@ -640,10 +624,9 @@ wlan_11ax_ioctl_cmd(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
|||
* @param pdata_buf A pointer to data buffer
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_cmd_11ax_cmd(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_void *pdata_buf)
|
||||
mlan_status wlan_cmd_11ax_cmd(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
HostCmd_DS_11AX_CMD_CFG *axcmd = &cmd->params.axcmd;
|
||||
|
@ -654,6 +637,12 @@ wlan_cmd_11ax_cmd(IN pmlan_private pmpriv,
|
|||
(mlan_ds_11ax_beam_cmd *)&ds_11ax_cmd->param;
|
||||
mlan_ds_11ax_htc_cmd *htc_cmd =
|
||||
(mlan_ds_11ax_htc_cmd *)&ds_11ax_cmd->param;
|
||||
mlan_ds_11ax_txop_cmd *txop_cmd =
|
||||
(mlan_ds_11ax_txop_cmd *)&ds_11ax_cmd->param;
|
||||
mlan_ds_11ax_txomi_cmd *txomi_cmd =
|
||||
(mlan_ds_11ax_txomi_cmd *)&ds_11ax_cmd->param;
|
||||
mlan_ds_11ax_toltime_cmd *toltime_cmd =
|
||||
(mlan_ds_11ax_toltime_cmd *)&ds_11ax_cmd->param;
|
||||
MrvlIEtypes_Data_t *tlv = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
@ -670,7 +659,7 @@ wlan_cmd_11ax_cmd(IN pmlan_private pmpriv,
|
|||
memcpy_ext(pmadapter, tlv->data,
|
||||
&sr_cmd->param.obss_pd_offset.offset, sr_cmd->len,
|
||||
sr_cmd->len);
|
||||
cmd->size += +sizeof(MrvlIEtypesHeader_t) + sr_cmd->len;
|
||||
cmd->size += sizeof(MrvlIEtypesHeader_t) + sr_cmd->len;
|
||||
break;
|
||||
case MLAN_11AXCMD_BEAM_SUBID:
|
||||
axcmd->val[0] = beam_cmd->value;
|
||||
|
@ -680,6 +669,21 @@ wlan_cmd_11ax_cmd(IN pmlan_private pmpriv,
|
|||
axcmd->val[0] = htc_cmd->value;
|
||||
cmd->size += sizeof(t_u8);
|
||||
break;
|
||||
case MLAN_11AXCMD_TXOPRTS_SUBID:
|
||||
memcpy_ext(pmadapter, axcmd->val, &txop_cmd->rts_thres,
|
||||
sizeof(t_u16), sizeof(t_u16));
|
||||
cmd->size += sizeof(t_u16);
|
||||
break;
|
||||
case MLAN_11AXCMD_TXOMI_SUBID:
|
||||
memcpy_ext(pmadapter, axcmd->val, &txomi_cmd->omi,
|
||||
sizeof(t_u16), sizeof(t_u16));
|
||||
cmd->size += sizeof(t_u16);
|
||||
break;
|
||||
case MLAN_11AXCMD_OBSS_TOLTIME_SUBID:
|
||||
memcpy_ext(pmadapter, axcmd->val, &toltime_cmd->tol_time,
|
||||
sizeof(t_u32), sizeof(t_u32));
|
||||
cmd->size += sizeof(t_u32);
|
||||
break;
|
||||
default:
|
||||
PRINTM(MERROR, "Unknown subcmd %x\n", ds_11ax_cmd->sub_id);
|
||||
break;
|
||||
|
@ -700,9 +704,9 @@ wlan_cmd_11ax_cmd(IN pmlan_private pmpriv,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_ret_11ax_cmd(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf)
|
||||
mlan_status wlan_ret_11ax_cmd(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
IN mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
mlan_ds_11ax_cmd_cfg *cfg = MNULL;
|
||||
|
@ -729,13 +733,14 @@ wlan_ret_11ax_cmd(IN pmlan_private pmpriv,
|
|||
while (left_len > sizeof(MrvlIEtypesHeader_t)) {
|
||||
tlv_type = wlan_le16_to_cpu(tlv->header.type);
|
||||
tlv_len = wlan_le16_to_cpu(tlv->header.len);
|
||||
memcpy_ext(pmadapter,
|
||||
cfg->param.sr_cfg.param.obss_pd_offset.
|
||||
offset, tlv->data, tlv_len, tlv_len);
|
||||
memcpy_ext(
|
||||
pmadapter,
|
||||
cfg->param.sr_cfg.param.obss_pd_offset.offset,
|
||||
tlv->data, tlv_len, tlv_len);
|
||||
left_len -= (sizeof(MrvlIEtypesHeader_t) + tlv_len);
|
||||
tlv = (MrvlIEtypes_Data_t *)((t_u8 *)tlv + tlv_len +
|
||||
sizeof
|
||||
(MrvlIEtypesHeader_t));
|
||||
tlv = (MrvlIEtypes_Data_t
|
||||
*)((t_u8 *)tlv + tlv_len +
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
}
|
||||
break;
|
||||
case MLAN_11AXCMD_BEAM_SUBID:
|
||||
|
@ -744,6 +749,18 @@ wlan_ret_11ax_cmd(IN pmlan_private pmpriv,
|
|||
case MLAN_11AXCMD_HTC_SUBID:
|
||||
cfg->param.htc_cfg.value = *axcmd->val;
|
||||
break;
|
||||
case MLAN_11AXCMD_TXOPRTS_SUBID:
|
||||
memcpy_ext(pmadapter, &cfg->param.txop_cfg.rts_thres,
|
||||
axcmd->val, sizeof(t_u16), sizeof(t_u16));
|
||||
break;
|
||||
case MLAN_11AXCMD_TXOMI_SUBID:
|
||||
memcpy_ext(pmadapter, &cfg->param.txomi_cfg.omi, axcmd->val,
|
||||
sizeof(t_u16), sizeof(t_u16));
|
||||
break;
|
||||
case MLAN_11AXCMD_OBSS_TOLTIME_SUBID:
|
||||
memcpy_ext(pmadapter, &cfg->param.toltime_cfg.tol_time,
|
||||
axcmd->val, sizeof(t_u32), sizeof(t_u32));
|
||||
break;
|
||||
default:
|
||||
PRINTM(MERROR, "Unknown subcmd %x\n", axcmd->sub_id);
|
||||
break;
|
||||
|
@ -753,3 +770,129 @@ done:
|
|||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares TWT cfg command to configure
|
||||
* setup/teardown
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param cmd A pointer to HostCmd_DS_COMMAND structure
|
||||
* @param cmd_action The action: GET or SET
|
||||
* @param pdata_buf A pointer to data buffer
|
||||
* @return Status returned
|
||||
*/
|
||||
mlan_status wlan_cmd_twt_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
HostCmd_DS_TWT_CFG *hostcmd_twtcfg =
|
||||
(HostCmd_DS_TWT_CFG *)&cmd->params.twtcfg;
|
||||
mlan_ds_twtcfg *ds_twtcfg = (mlan_ds_twtcfg *)pdata_buf;
|
||||
hostcmd_twt_setup *twt_setup_params = MNULL;
|
||||
hostcmd_twt_teardown *twt_teardown_params = MNULL;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_TWT_CFG);
|
||||
|
||||
hostcmd_twtcfg->action = wlan_cpu_to_le16(cmd_action);
|
||||
hostcmd_twtcfg->sub_id = wlan_cpu_to_le16(ds_twtcfg->sub_id);
|
||||
|
||||
cmd->size = S_DS_GEN + sizeof(hostcmd_twtcfg->action) +
|
||||
sizeof(hostcmd_twtcfg->sub_id);
|
||||
|
||||
switch (hostcmd_twtcfg->sub_id) {
|
||||
case MLAN_11AX_TWT_SETUP_SUBID:
|
||||
twt_setup_params = &hostcmd_twtcfg->param.twt_setup;
|
||||
memset(pmadapter, twt_setup_params, 0x00,
|
||||
sizeof(hostcmd_twtcfg->param.twt_setup));
|
||||
twt_setup_params->implicit =
|
||||
ds_twtcfg->param.twt_setup.implicit;
|
||||
twt_setup_params->announced =
|
||||
ds_twtcfg->param.twt_setup.announced;
|
||||
twt_setup_params->trigger_enabled =
|
||||
ds_twtcfg->param.twt_setup.trigger_enabled;
|
||||
twt_setup_params->twt_info_disabled =
|
||||
ds_twtcfg->param.twt_setup.twt_info_disabled;
|
||||
twt_setup_params->negotiation_type =
|
||||
ds_twtcfg->param.twt_setup.negotiation_type;
|
||||
twt_setup_params->twt_wakeup_duration =
|
||||
ds_twtcfg->param.twt_setup.twt_wakeup_duration;
|
||||
twt_setup_params->flow_identifier =
|
||||
ds_twtcfg->param.twt_setup.flow_identifier;
|
||||
twt_setup_params->hard_constraint =
|
||||
ds_twtcfg->param.twt_setup.hard_constraint;
|
||||
twt_setup_params->twt_exponent =
|
||||
ds_twtcfg->param.twt_setup.twt_exponent;
|
||||
twt_setup_params->twt_mantissa = wlan_cpu_to_le16(
|
||||
ds_twtcfg->param.twt_setup.twt_mantissa);
|
||||
cmd->size += sizeof(hostcmd_twtcfg->param.twt_setup);
|
||||
break;
|
||||
case MLAN_11AX_TWT_TEARDOWN_SUBID:
|
||||
twt_teardown_params = &hostcmd_twtcfg->param.twt_teardown;
|
||||
memset(pmadapter, twt_teardown_params, 0x00,
|
||||
sizeof(hostcmd_twtcfg->param.twt_teardown));
|
||||
twt_teardown_params->flow_identifier =
|
||||
ds_twtcfg->param.twt_teardown.flow_identifier;
|
||||
twt_teardown_params->negotiation_type =
|
||||
ds_twtcfg->param.twt_teardown.negotiation_type;
|
||||
twt_teardown_params->teardown_all_twt =
|
||||
ds_twtcfg->param.twt_teardown.teardown_all_twt;
|
||||
cmd->size += sizeof(hostcmd_twtcfg->param.twt_teardown);
|
||||
break;
|
||||
default:
|
||||
PRINTM(MERROR, "Unknown subcmd %x\n", ds_twtcfg->sub_id);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
break;
|
||||
}
|
||||
|
||||
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TWT config command handler
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS --success, otherwise fail
|
||||
*/
|
||||
mlan_status wlan_11ax_ioctl_twtcfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_ds_twtcfg *cfg = MNULL;
|
||||
t_u16 cmd_action = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_req->buf_len < sizeof(mlan_ds_twtcfg)) {
|
||||
PRINTM(MERROR, "MLAN bss IOCTL length is too short.\n");
|
||||
pioctl_req->data_read_written = 0;
|
||||
pioctl_req->buf_len_needed = sizeof(mlan_ds_twtcfg);
|
||||
pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER;
|
||||
LEAVE();
|
||||
return MLAN_STATUS_RESOURCE;
|
||||
}
|
||||
|
||||
cfg = (mlan_ds_twtcfg *)pioctl_req->pbuf;
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_SET)
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_TWT_CFG, cmd_action, 0,
|
||||
(t_void *)pioctl_req, (t_void *)cfg);
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,11 @@
|
|||
|
||||
t_u8 wlan_check_11ax_twt_supported(mlan_private *pmpriv,
|
||||
BSSDescriptor_t *pbss_desc);
|
||||
mlan_status wlan_11ax_ioctl_twtcfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_cmd_twt_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf);
|
||||
t_u16 wlan_fill_he_cap_tlv(mlan_private *pmpriv, t_u8 band,
|
||||
MrvlIEtypes_Extension_t *phe_cap, t_u8 flag);
|
||||
void wlan_update_11ax_cap(mlan_adapter *pmadapter,
|
||||
|
@ -43,14 +48,14 @@ mlan_status wlan_11ax_ioctl_cmd(pmlan_adapter pmadapter,
|
|||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
mlan_status wlan_cmd_11ax_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_void *pdata_buf);
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf);
|
||||
mlan_status wlan_ret_11ax_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
IN mlan_ioctl_req *pioctl_buf);
|
||||
mlan_status wlan_cmd_11ax_cmd(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_void *pdata_buf);
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf);
|
||||
mlan_status wlan_ret_11ax_cmd(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
IN mlan_ioctl_req *pioctl_buf);
|
||||
|
|
|
@ -70,54 +70,31 @@ static region_code_mapping_t region_code_mapping[] = {
|
|||
/* Following two structures define the supported channels */
|
||||
/** Channels for 802.11b/g */
|
||||
static chan_freq_power_t channel_freq_power_UN_BG[] = {
|
||||
{1, 2412, TX_PWR_DEFAULT},
|
||||
{2, 2417, TX_PWR_DEFAULT},
|
||||
{3, 2422, TX_PWR_DEFAULT},
|
||||
{4, 2427, TX_PWR_DEFAULT},
|
||||
{5, 2432, TX_PWR_DEFAULT},
|
||||
{6, 2437, TX_PWR_DEFAULT},
|
||||
{7, 2442, TX_PWR_DEFAULT},
|
||||
{8, 2447, TX_PWR_DEFAULT},
|
||||
{9, 2452, TX_PWR_DEFAULT},
|
||||
{10, 2457, TX_PWR_DEFAULT},
|
||||
{11, 2462, TX_PWR_DEFAULT},
|
||||
{12, 2467, TX_PWR_DEFAULT},
|
||||
{13, 2472, TX_PWR_DEFAULT},
|
||||
{14, 2484, TX_PWR_DEFAULT}
|
||||
};
|
||||
{1, 2412, TX_PWR_DEFAULT}, {2, 2417, TX_PWR_DEFAULT},
|
||||
{3, 2422, TX_PWR_DEFAULT}, {4, 2427, TX_PWR_DEFAULT},
|
||||
{5, 2432, TX_PWR_DEFAULT}, {6, 2437, TX_PWR_DEFAULT},
|
||||
{7, 2442, TX_PWR_DEFAULT}, {8, 2447, TX_PWR_DEFAULT},
|
||||
{9, 2452, TX_PWR_DEFAULT}, {10, 2457, TX_PWR_DEFAULT},
|
||||
{11, 2462, TX_PWR_DEFAULT}, {12, 2467, TX_PWR_DEFAULT},
|
||||
{13, 2472, TX_PWR_DEFAULT}, {14, 2484, TX_PWR_DEFAULT}};
|
||||
|
||||
/** Channels for 802.11a/j */
|
||||
static chan_freq_power_t channel_freq_power_UN_AJ[] = {
|
||||
{8, 5040, TX_PWR_DEFAULT},
|
||||
{12, 5060, TX_PWR_DEFAULT},
|
||||
{16, 5080, TX_PWR_DEFAULT},
|
||||
{34, 5170, TX_PWR_DEFAULT},
|
||||
{38, 5190, TX_PWR_DEFAULT},
|
||||
{42, 5210, TX_PWR_DEFAULT},
|
||||
{46, 5230, TX_PWR_DEFAULT},
|
||||
{36, 5180, TX_PWR_DEFAULT},
|
||||
{40, 5200, TX_PWR_DEFAULT},
|
||||
{44, 5220, TX_PWR_DEFAULT},
|
||||
{48, 5240, TX_PWR_DEFAULT},
|
||||
{52, 5260, TX_PWR_DEFAULT},
|
||||
{56, 5280, TX_PWR_DEFAULT},
|
||||
{60, 5300, TX_PWR_DEFAULT},
|
||||
{64, 5320, TX_PWR_DEFAULT},
|
||||
{100, 5500, TX_PWR_DEFAULT},
|
||||
{104, 5520, TX_PWR_DEFAULT},
|
||||
{108, 5540, TX_PWR_DEFAULT},
|
||||
{112, 5560, TX_PWR_DEFAULT},
|
||||
{116, 5580, TX_PWR_DEFAULT},
|
||||
{120, 5600, TX_PWR_DEFAULT},
|
||||
{124, 5620, TX_PWR_DEFAULT},
|
||||
{128, 5640, TX_PWR_DEFAULT},
|
||||
{132, 5660, TX_PWR_DEFAULT},
|
||||
{136, 5680, TX_PWR_DEFAULT},
|
||||
{140, 5700, TX_PWR_DEFAULT},
|
||||
{149, 5745, TX_PWR_DEFAULT},
|
||||
{153, 5765, TX_PWR_DEFAULT},
|
||||
{157, 5785, TX_PWR_DEFAULT},
|
||||
{161, 5805, TX_PWR_DEFAULT},
|
||||
{8, 5040, TX_PWR_DEFAULT}, {12, 5060, TX_PWR_DEFAULT},
|
||||
{16, 5080, TX_PWR_DEFAULT}, {34, 5170, TX_PWR_DEFAULT},
|
||||
{38, 5190, TX_PWR_DEFAULT}, {42, 5210, TX_PWR_DEFAULT},
|
||||
{46, 5230, TX_PWR_DEFAULT}, {36, 5180, TX_PWR_DEFAULT},
|
||||
{40, 5200, TX_PWR_DEFAULT}, {44, 5220, TX_PWR_DEFAULT},
|
||||
{48, 5240, TX_PWR_DEFAULT}, {52, 5260, TX_PWR_DEFAULT},
|
||||
{56, 5280, TX_PWR_DEFAULT}, {60, 5300, TX_PWR_DEFAULT},
|
||||
{64, 5320, TX_PWR_DEFAULT}, {100, 5500, TX_PWR_DEFAULT},
|
||||
{104, 5520, TX_PWR_DEFAULT}, {108, 5540, TX_PWR_DEFAULT},
|
||||
{112, 5560, TX_PWR_DEFAULT}, {116, 5580, TX_PWR_DEFAULT},
|
||||
{120, 5600, TX_PWR_DEFAULT}, {124, 5620, TX_PWR_DEFAULT},
|
||||
{128, 5640, TX_PWR_DEFAULT}, {132, 5660, TX_PWR_DEFAULT},
|
||||
{136, 5680, TX_PWR_DEFAULT}, {140, 5700, TX_PWR_DEFAULT},
|
||||
{149, 5745, TX_PWR_DEFAULT}, {153, 5765, TX_PWR_DEFAULT},
|
||||
{157, 5785, TX_PWR_DEFAULT}, {161, 5805, TX_PWR_DEFAULT},
|
||||
{165, 5825, TX_PWR_DEFAULT},
|
||||
/* {240, 4920, TX_PWR_DEFAULT},
|
||||
{244, 4940, TX_PWR_DEFAULT},
|
||||
|
@ -142,8 +119,7 @@ channels for 11J JP 10M channel gap */
|
|||
*
|
||||
* @return Region string
|
||||
*/
|
||||
static t_u8 *
|
||||
wlan_11d_code_2_region(pmlan_adapter pmadapter, t_u8 code)
|
||||
static t_u8 *wlan_11d_code_2_region(pmlan_adapter pmadapter, t_u8 code)
|
||||
{
|
||||
t_u8 i;
|
||||
|
||||
|
@ -172,10 +148,9 @@ wlan_11d_code_2_region(pmlan_adapter pmadapter, t_u8 code)
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static t_u8
|
||||
wlan_11d_channel_known(pmlan_adapter pmadapter,
|
||||
t_u8 band,
|
||||
t_u8 chan, parsed_region_chan_11d_t *parsed_region_chan)
|
||||
static t_u8 wlan_11d_channel_known(pmlan_adapter pmadapter, t_u8 band,
|
||||
t_u8 chan,
|
||||
parsed_region_chan_11d_t *parsed_region_chan)
|
||||
{
|
||||
chan_power_11d_t *pchan_pwr = parsed_region_chan->chan_pwr;
|
||||
t_u8 no_of_chan = parsed_region_chan->no_of_chan;
|
||||
|
@ -196,12 +171,12 @@ wlan_11d_channel_known(pmlan_adapter pmadapter,
|
|||
ret = MTRUE;
|
||||
|
||||
if (band & BAND_A) {
|
||||
/* If chan is a DFS channel, we need to see an AP on it */
|
||||
/* If chan is a DFS channel, we need to see an
|
||||
* AP on it */
|
||||
pmpriv = wlan_get_priv(pmadapter,
|
||||
MLAN_BSS_ROLE_STA);
|
||||
if (pmpriv &&
|
||||
wlan_11h_radar_detect_required(pmpriv,
|
||||
chan)) {
|
||||
if (pmpriv && wlan_11h_radar_detect_required(
|
||||
pmpriv, chan)) {
|
||||
PRINTM(MINFO,
|
||||
"11H: DFS channel %d, and ap_seen=%d\n",
|
||||
chan, pchan_pwr[i].ap_seen);
|
||||
|
@ -229,11 +204,9 @@ wlan_11d_channel_known(pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static t_void
|
||||
wlan_11d_generate_parsed_region_chan(pmlan_adapter pmadapter,
|
||||
region_chan_t *region_chan,
|
||||
parsed_region_chan_11d_t
|
||||
*parsed_region_chan)
|
||||
static t_void wlan_11d_generate_parsed_region_chan(
|
||||
pmlan_adapter pmadapter, region_chan_t *region_chan,
|
||||
parsed_region_chan_11d_t *parsed_region_chan)
|
||||
{
|
||||
chan_freq_power_t *cfp;
|
||||
t_u8 i;
|
||||
|
@ -364,8 +337,8 @@ wlan_11d_generate_domain_info(pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_11d_update_chan_pwr_table(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
||||
static mlan_status wlan_11d_update_chan_pwr_table(mlan_private *pmpriv,
|
||||
BSSDescriptor_t *pbss_desc)
|
||||
{
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
parsed_region_chan_11d_t *parsed_region_chan =
|
||||
|
@ -388,16 +361,16 @@ wlan_11d_update_chan_pwr_table(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
|
||||
/* Check whether the channel already exists in channel power table of
|
||||
parsed region */
|
||||
for (i = 0; ((i < parsed_region_chan->no_of_chan) &&
|
||||
(i < MAX_NO_OF_CHAN)); i++) {
|
||||
if (parsed_region_chan->chan_pwr[i].chan == chan
|
||||
&& parsed_region_chan->chan_pwr[i].band ==
|
||||
for (i = 0;
|
||||
((i < parsed_region_chan->no_of_chan) && (i < MAX_NO_OF_CHAN));
|
||||
i++) {
|
||||
if (parsed_region_chan->chan_pwr[i].chan == chan &&
|
||||
parsed_region_chan->chan_pwr[i].band ==
|
||||
pbss_desc->bss_band) {
|
||||
/* Channel already exists, use minimum of existing and
|
||||
tx_power */
|
||||
parsed_region_chan->chan_pwr[i].pwr =
|
||||
MIN(parsed_region_chan->chan_pwr[i].pwr,
|
||||
tx_power);
|
||||
parsed_region_chan->chan_pwr[i].pwr = MIN(
|
||||
parsed_region_chan->chan_pwr[i].pwr, tx_power);
|
||||
parsed_region_chan->chan_pwr[i].ap_seen = MTRUE;
|
||||
break;
|
||||
}
|
||||
|
@ -429,9 +402,8 @@ wlan_11d_update_chan_pwr_table(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static t_u8
|
||||
wlan_11d_get_chan(pmlan_adapter pmadapter, t_u8 band, t_u8 first_chan,
|
||||
t_u8 no_of_chan, t_u8 *chan)
|
||||
static t_u8 wlan_11d_get_chan(pmlan_adapter pmadapter, t_u8 band,
|
||||
t_u8 first_chan, t_u8 no_of_chan, t_u8 *chan)
|
||||
{
|
||||
chan_freq_power_t *cfp = MNULL;
|
||||
t_u8 i;
|
||||
|
@ -479,8 +451,8 @@ wlan_11d_get_chan(pmlan_adapter pmadapter, t_u8 band, t_u8 first_chan,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_11d_process_country_info(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
||||
static mlan_status wlan_11d_process_country_info(mlan_private *pmpriv,
|
||||
BSSDescriptor_t *pbss_desc)
|
||||
{
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
parsed_region_chan_11d_t region_chan;
|
||||
|
@ -507,18 +479,20 @@ wlan_11d_process_country_info(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
*/
|
||||
for (i = 0; (i < region_chan.no_of_chan && i < MAX_NO_OF_CHAN);
|
||||
i++) {
|
||||
for (j = 0;
|
||||
(j < parsed_region_chan->no_of_chan &&
|
||||
j < MAX_NO_OF_CHAN); j++) {
|
||||
for (j = 0; (j < parsed_region_chan->no_of_chan &&
|
||||
j < MAX_NO_OF_CHAN);
|
||||
j++) {
|
||||
/*
|
||||
* Channel already exists, update the tx power
|
||||
* with new tx power, since country IE is valid
|
||||
* here.
|
||||
*/
|
||||
if (region_chan.chan_pwr[i].chan ==
|
||||
parsed_region_chan->chan_pwr[j].chan &&
|
||||
parsed_region_chan->chan_pwr[j]
|
||||
.chan &&
|
||||
region_chan.chan_pwr[i].band ==
|
||||
parsed_region_chan->chan_pwr[j].band) {
|
||||
parsed_region_chan->chan_pwr[j]
|
||||
.band) {
|
||||
parsed_region_chan->chan_pwr[j].pwr =
|
||||
region_chan.chan_pwr[i].pwr;
|
||||
break;
|
||||
|
@ -532,34 +506,33 @@ wlan_11d_process_country_info(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
* table, update this new chan and tx_power
|
||||
* to the channel power table
|
||||
*/
|
||||
parsed_region_chan->
|
||||
chan_pwr[parsed_region_chan->
|
||||
no_of_chan +
|
||||
num_chan_added].chan =
|
||||
region_chan.chan_pwr[i].chan;
|
||||
parsed_region_chan->
|
||||
chan_pwr[parsed_region_chan->
|
||||
no_of_chan +
|
||||
num_chan_added].band =
|
||||
region_chan.chan_pwr[i].band;
|
||||
parsed_region_chan->
|
||||
chan_pwr[parsed_region_chan->
|
||||
no_of_chan +
|
||||
num_chan_added].pwr =
|
||||
region_chan.chan_pwr[i].pwr;
|
||||
parsed_region_chan->
|
||||
chan_pwr[parsed_region_chan->
|
||||
no_of_chan +
|
||||
num_chan_added].ap_seen =
|
||||
MFALSE;
|
||||
parsed_region_chan
|
||||
->chan_pwr[parsed_region_chan
|
||||
->no_of_chan +
|
||||
num_chan_added]
|
||||
.chan = region_chan.chan_pwr[i].chan;
|
||||
parsed_region_chan
|
||||
->chan_pwr[parsed_region_chan
|
||||
->no_of_chan +
|
||||
num_chan_added]
|
||||
.band = region_chan.chan_pwr[i].band;
|
||||
parsed_region_chan
|
||||
->chan_pwr[parsed_region_chan
|
||||
->no_of_chan +
|
||||
num_chan_added]
|
||||
.pwr = region_chan.chan_pwr[i].pwr;
|
||||
parsed_region_chan
|
||||
->chan_pwr[parsed_region_chan
|
||||
->no_of_chan +
|
||||
num_chan_added]
|
||||
.ap_seen = MFALSE;
|
||||
num_chan_added++;
|
||||
}
|
||||
}
|
||||
parsed_region_chan->no_of_chan += num_chan_added;
|
||||
} else {
|
||||
/* Parsed region is empty, copy the first one */
|
||||
memcpy_ext(pmadapter, parsed_region_chan,
|
||||
®ion_chan,
|
||||
memcpy_ext(pmadapter, parsed_region_chan, ®ion_chan,
|
||||
sizeof(parsed_region_chan_11d_t),
|
||||
sizeof(parsed_region_chan_11d_t));
|
||||
}
|
||||
|
@ -576,8 +549,8 @@ wlan_11d_process_country_info(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static t_void
|
||||
wlan_11d_copy_chan_power(chan_power_11d_t *chan_dst, chan_power_11d_t *chan_src)
|
||||
static t_void wlan_11d_copy_chan_power(chan_power_11d_t *chan_dst,
|
||||
chan_power_11d_t *chan_src)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -636,18 +609,17 @@ wlan_11d_sort_parsed_region_chan(parsed_region_chan_11d_t *parsed_region_chan)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_11d_send_domain_info(mlan_private *pmpriv, t_void *pioctl_buf)
|
||||
static mlan_status wlan_11d_send_domain_info(mlan_private *pmpriv,
|
||||
t_void *pioctl_buf)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
/* Send cmd to FW to set domain info */
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_802_11D_DOMAIN_INFO,
|
||||
HostCmd_ACT_GEN_SET,
|
||||
0, (t_void *)pioctl_buf, MNULL);
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11D_DOMAIN_INFO,
|
||||
HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_buf,
|
||||
MNULL);
|
||||
if (ret)
|
||||
PRINTM(MERROR, "11D: Failed to download domain Info\n");
|
||||
|
||||
|
@ -667,10 +639,8 @@ wlan_11d_send_domain_info(mlan_private *pmpriv, t_void *pioctl_buf)
|
|||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_11d_set_domain_info(mlan_private *pmpriv,
|
||||
t_u8 band,
|
||||
t_u8 country_code[COUNTRY_CODE_LEN],
|
||||
t_u8 num_sub_band,
|
||||
wlan_11d_set_domain_info(mlan_private *pmpriv, t_u8 band,
|
||||
t_u8 country_code[COUNTRY_CODE_LEN], t_u8 num_sub_band,
|
||||
IEEEtypes_SubbandSet_t *sub_band_list)
|
||||
{
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
|
@ -703,8 +673,7 @@ wlan_11d_set_domain_info(mlan_private *pmpriv,
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
t_bool
|
||||
wlan_is_station(mlan_private *pmpriv)
|
||||
t_bool wlan_is_station(mlan_private *pmpriv)
|
||||
{
|
||||
ENTER();
|
||||
LEAVE();
|
||||
|
@ -718,14 +687,14 @@ wlan_is_station(mlan_private *pmpriv)
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
t_bool
|
||||
wlan_11d_is_enabled(mlan_private *pmpriv)
|
||||
t_bool wlan_11d_is_enabled(mlan_private *pmpriv)
|
||||
{
|
||||
ENTER();
|
||||
LEAVE();
|
||||
return (pmpriv->state_11d.enable_11d == ENABLE_11D &&
|
||||
pmpriv->state_11d.user_enable_11d ==
|
||||
ENABLE_11D) ? MTRUE : MFALSE;
|
||||
pmpriv->state_11d.user_enable_11d == ENABLE_11D) ?
|
||||
MTRUE :
|
||||
MFALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -735,8 +704,7 @@ wlan_11d_is_enabled(mlan_private *pmpriv)
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
t_bool
|
||||
wlan_fw_11d_is_enabled(mlan_private *pmpriv)
|
||||
t_bool wlan_fw_11d_is_enabled(mlan_private *pmpriv)
|
||||
{
|
||||
ENTER();
|
||||
LEAVE();
|
||||
|
@ -750,8 +718,7 @@ wlan_fw_11d_is_enabled(mlan_private *pmpriv)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
wlan_11d_priv_init(mlan_private *pmpriv)
|
||||
t_void wlan_11d_priv_init(mlan_private *pmpriv)
|
||||
{
|
||||
wlan_802_11d_state_t *state = &pmpriv->state_11d;
|
||||
|
||||
|
@ -762,9 +729,10 @@ wlan_11d_priv_init(mlan_private *pmpriv)
|
|||
if (!pmpriv->adapter->init_para.cfg_11d)
|
||||
state->user_enable_11d = DEFAULT_11D_STATE;
|
||||
else
|
||||
state->user_enable_11d =
|
||||
(pmpriv->adapter->init_para.cfg_11d ==
|
||||
MLAN_INIT_PARA_DISABLED) ? DISABLE_11D : ENABLE_11D;
|
||||
state->user_enable_11d = (pmpriv->adapter->init_para.cfg_11d ==
|
||||
MLAN_INIT_PARA_DISABLED) ?
|
||||
DISABLE_11D :
|
||||
ENABLE_11D;
|
||||
|
||||
LEAVE();
|
||||
return;
|
||||
|
@ -777,8 +745,7 @@ wlan_11d_priv_init(mlan_private *pmpriv)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
wlan_11d_init(mlan_adapter *pmadapter)
|
||||
t_void wlan_11d_init(mlan_adapter *pmadapter)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -804,8 +771,8 @@ wlan_11d_init(mlan_adapter *pmadapter)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11d_enable(mlan_private *pmpriv, t_void *pioctl_buf, state_11d_t flag)
|
||||
mlan_status wlan_11d_enable(mlan_private *pmpriv, t_void *pioctl_buf,
|
||||
state_11d_t flag)
|
||||
{
|
||||
#ifdef STA_SUPPORT
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
|
@ -816,10 +783,9 @@ wlan_11d_enable(mlan_private *pmpriv, t_void *pioctl_buf, state_11d_t flag)
|
|||
ENTER();
|
||||
|
||||
/* Send cmd to FW to enable/disable 11D function */
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_802_11_SNMP_MIB,
|
||||
HostCmd_ACT_GEN_SET,
|
||||
Dot11D_i, (t_void *)pioctl_buf, &enable);
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_SNMP_MIB,
|
||||
HostCmd_ACT_GEN_SET, Dot11D_i,
|
||||
(t_void *)pioctl_buf, &enable);
|
||||
|
||||
if (ret) {
|
||||
PRINTM(MERROR, "11D: Failed to %s 11D\n",
|
||||
|
@ -847,9 +813,9 @@ wlan_11d_enable(mlan_private *pmpriv, t_void *pioctl_buf, state_11d_t flag)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_cmd_802_11d_domain_info(mlan_private *pmpriv,
|
||||
HostCmd_DS_COMMAND *pcmd, t_u16 cmd_action)
|
||||
mlan_status wlan_cmd_802_11d_domain_info(mlan_private *pmpriv,
|
||||
HostCmd_DS_COMMAND *pcmd,
|
||||
t_u16 cmd_action)
|
||||
{
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
HostCmd_DS_802_11D_DOMAIN_INFO *pdomain_info =
|
||||
|
@ -875,8 +841,7 @@ wlan_cmd_802_11d_domain_info(mlan_private *pmpriv,
|
|||
pdomain_info->action = wlan_cpu_to_le16(cmd_action);
|
||||
if (cmd_action == HostCmd_ACT_GEN_GET) {
|
||||
/* Dump domain info */
|
||||
pcmd->size =
|
||||
wlan_cpu_to_le16(sizeof(pdomain_info->action) +
|
||||
pcmd->size = wlan_cpu_to_le16(sizeof(pdomain_info->action) +
|
||||
S_DS_GEN);
|
||||
HEXDUMP("11D: 802_11D_DOMAIN_INFO", (t_u8 *)pcmd,
|
||||
wlan_le16_to_cpu(pcmd->size));
|
||||
|
@ -901,13 +866,11 @@ wlan_cmd_802_11d_domain_info(mlan_private *pmpriv,
|
|||
MRVDRV_MAX_SUBBAND_802_11D *
|
||||
sizeof(IEEEtypes_SubbandSet_t));
|
||||
|
||||
pcmd->size = wlan_cpu_to_le16(sizeof(pdomain_info->action) +
|
||||
domain->header.len +
|
||||
sizeof(MrvlIEtypesHeader_t) +
|
||||
S_DS_GEN);
|
||||
pcmd->size = wlan_cpu_to_le16(
|
||||
sizeof(pdomain_info->action) + domain->header.len +
|
||||
sizeof(MrvlIEtypesHeader_t) + S_DS_GEN);
|
||||
} else {
|
||||
pcmd->size =
|
||||
wlan_cpu_to_le16(sizeof(pdomain_info->action) +
|
||||
pcmd->size = wlan_cpu_to_le16(sizeof(pdomain_info->action) +
|
||||
S_DS_GEN);
|
||||
}
|
||||
domain->header.len = wlan_cpu_to_le16(domain->header.len);
|
||||
|
@ -927,8 +890,8 @@ wlan_cmd_802_11d_domain_info(mlan_private *pmpriv,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_ret_802_11d_domain_info(mlan_private *pmpriv, HostCmd_DS_COMMAND *resp)
|
||||
mlan_status wlan_ret_802_11d_domain_info(mlan_private *pmpriv,
|
||||
HostCmd_DS_COMMAND *resp)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
HostCmd_DS_802_11D_DOMAIN_INFO_RSP *domain_info =
|
||||
|
@ -942,9 +905,9 @@ wlan_ret_802_11d_domain_info(mlan_private *pmpriv, HostCmd_DS_COMMAND *resp)
|
|||
/* Dump domain info response data */
|
||||
HEXDUMP("11D: DOMAIN Info Rsp Data", (t_u8 *)resp, resp->size);
|
||||
|
||||
no_of_sub_band =
|
||||
(t_u8)((wlan_le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN)
|
||||
/ sizeof(IEEEtypes_SubbandSet_t));
|
||||
no_of_sub_band = (t_u8)(
|
||||
(wlan_le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) /
|
||||
sizeof(IEEEtypes_SubbandSet_t));
|
||||
|
||||
PRINTM(MINFO, "11D Domain Info Resp: number of sub-band=%d\n",
|
||||
no_of_sub_band);
|
||||
|
@ -980,8 +943,7 @@ wlan_ret_802_11d_domain_info(mlan_private *pmpriv, HostCmd_DS_COMMAND *resp)
|
|||
*
|
||||
* @return Channel frequency
|
||||
*/
|
||||
t_u32
|
||||
wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u8 band)
|
||||
t_u32 wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u8 band)
|
||||
{
|
||||
chan_freq_power_t *cf;
|
||||
t_u16 cnt;
|
||||
|
@ -1020,11 +982,9 @@ wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u8 band)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11d_parse_domain_info(pmlan_adapter pmadapter,
|
||||
IEEEtypes_CountryInfoFullSet_t *country_info,
|
||||
t_u8 band,
|
||||
parsed_region_chan_11d_t *parsed_region_chan)
|
||||
mlan_status wlan_11d_parse_domain_info(
|
||||
pmlan_adapter pmadapter, IEEEtypes_CountryInfoFullSet_t *country_info,
|
||||
t_u8 band, parsed_region_chan_11d_t *parsed_region_chan)
|
||||
{
|
||||
t_u8 no_of_sub_band, no_of_chan;
|
||||
t_u8 last_chan, first_chan, cur_chan = 0;
|
||||
|
@ -1057,9 +1017,9 @@ wlan_11d_parse_domain_info(pmlan_adapter pmadapter,
|
|||
sizeof(IEEEtypes_SubbandSet_t);
|
||||
|
||||
for (j = 0, last_chan = 0; j < no_of_sub_band; j++) {
|
||||
|
||||
if (country_info->sub_band[j].first_chan <= last_chan) {
|
||||
/* Step2&3: Check First Chan Num increment and no overlap */
|
||||
/* Step2&3: Check First Chan Num increment and no
|
||||
* overlap */
|
||||
PRINTM(MINFO, "11D: Chan[%d>%d] Overlap\n",
|
||||
country_info->sub_band[j].first_chan, last_chan);
|
||||
continue;
|
||||
|
@ -1070,8 +1030,7 @@ wlan_11d_parse_domain_info(pmlan_adapter pmadapter,
|
|||
|
||||
for (i = 0; idx < MAX_NO_OF_CHAN && i < no_of_chan; i++) {
|
||||
/* Step 4 : Channel is supported? */
|
||||
if (wlan_11d_get_chan
|
||||
(pmadapter, band, first_chan, i,
|
||||
if (wlan_11d_get_chan(pmadapter, band, first_chan, i,
|
||||
&cur_chan) == MFALSE) {
|
||||
/* Chan is not found in UN table */
|
||||
PRINTM(MWARN,
|
||||
|
@ -1113,8 +1072,7 @@ wlan_11d_parse_domain_info(pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11d_set_universaltable(mlan_private *pmpriv, t_u8 band)
|
||||
mlan_status wlan_11d_set_universaltable(mlan_private *pmpriv, t_u8 band)
|
||||
{
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
t_u16 i = 0;
|
||||
|
@ -1184,10 +1142,8 @@ wlan_11d_set_universaltable(mlan_private *pmpriv, t_u8 band)
|
|||
* @return PASSIVE if chan is unknown; ACTIVE
|
||||
* if chan is known
|
||||
*/
|
||||
t_u8
|
||||
wlan_11d_get_scan_type(pmlan_adapter pmadapter,
|
||||
t_u8 band,
|
||||
t_u8 chan, parsed_region_chan_11d_t *parsed_region_chan)
|
||||
t_u8 wlan_11d_get_scan_type(pmlan_adapter pmadapter, t_u8 band, t_u8 chan,
|
||||
parsed_region_chan_11d_t *parsed_region_chan)
|
||||
{
|
||||
t_u8 scan_type = MLAN_SCAN_TYPE_PASSIVE;
|
||||
|
||||
|
@ -1212,8 +1168,7 @@ wlan_11d_get_scan_type(pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11d_clear_parsedtable(mlan_private *pmpriv)
|
||||
mlan_status wlan_11d_clear_parsedtable(mlan_private *pmpriv)
|
||||
{
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -1239,8 +1194,7 @@ wlan_11d_clear_parsedtable(mlan_private *pmpriv)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u8 band)
|
||||
mlan_status wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u8 band)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
|
@ -1252,7 +1206,6 @@ wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u8 band)
|
|||
|
||||
/* Only valid if 11D is enabled */
|
||||
if (wlan_11d_is_enabled(pmpriv)) {
|
||||
|
||||
PRINTM(MINFO, "11D: Band[%d]\n", band);
|
||||
|
||||
/* Update parsed_region_chan; download domain info to FW */
|
||||
|
@ -1338,8 +1291,7 @@ wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u8 band)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11d_parse_dnld_countryinfo(mlan_private *pmpriv,
|
||||
mlan_status wlan_11d_parse_dnld_countryinfo(mlan_private *pmpriv,
|
||||
BSSDescriptor_t *pbss_desc)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -1352,7 +1304,6 @@ wlan_11d_parse_dnld_countryinfo(mlan_private *pmpriv,
|
|||
|
||||
/* Only valid if 11D is enabled */
|
||||
if (wlan_11d_is_enabled(pmpriv)) {
|
||||
|
||||
memset(pmadapter, ®ion_chan, 0,
|
||||
sizeof(parsed_region_chan_11d_t));
|
||||
memset(pmadapter, &bssdesc_region_chan, 0,
|
||||
|
@ -1365,44 +1316,46 @@ wlan_11d_parse_dnld_countryinfo(mlan_private *pmpriv,
|
|||
|
||||
if (pbss_desc) {
|
||||
/* Parse domain info if available */
|
||||
ret = wlan_11d_parse_domain_info(pmadapter,
|
||||
&pbss_desc->
|
||||
country_info,
|
||||
(t_u8)pbss_desc->
|
||||
bss_band,
|
||||
ret = wlan_11d_parse_domain_info(
|
||||
pmadapter, &pbss_desc->country_info,
|
||||
(t_u8)pbss_desc->bss_band,
|
||||
&bssdesc_region_chan);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS) {
|
||||
/* Update the channel-power table */
|
||||
for (i = 0;
|
||||
((i < bssdesc_region_chan.no_of_chan)
|
||||
&& (i < MAX_NO_OF_CHAN)); i++) {
|
||||
|
||||
((i < bssdesc_region_chan.no_of_chan) &&
|
||||
(i < MAX_NO_OF_CHAN));
|
||||
i++) {
|
||||
for (j = 0;
|
||||
((j < region_chan.no_of_chan)
|
||||
&& (j < MAX_NO_OF_CHAN)); j++) {
|
||||
((j < region_chan.no_of_chan) &&
|
||||
(j < MAX_NO_OF_CHAN));
|
||||
j++) {
|
||||
/*
|
||||
* Channel already exists, use minimum
|
||||
* of existing tx power and tx_power
|
||||
* received from country info of the
|
||||
* current AP
|
||||
* Channel already exists, use
|
||||
* minimum of existing tx power
|
||||
* and tx_power received from
|
||||
* country info of the current
|
||||
* AP
|
||||
*/
|
||||
if (region_chan.chan_pwr[i].
|
||||
chan ==
|
||||
bssdesc_region_chan.
|
||||
chan_pwr[j].chan &&
|
||||
region_chan.chan_pwr[i].
|
||||
band ==
|
||||
bssdesc_region_chan.
|
||||
chan_pwr[j].band) {
|
||||
region_chan.chan_pwr[j].
|
||||
pwr =
|
||||
MIN(region_chan.
|
||||
chan_pwr[j].
|
||||
pwr,
|
||||
bssdesc_region_chan.
|
||||
chan_pwr[i].
|
||||
pwr);
|
||||
if (region_chan.chan_pwr[i]
|
||||
.chan ==
|
||||
bssdesc_region_chan
|
||||
.chan_pwr[j]
|
||||
.chan &&
|
||||
region_chan.chan_pwr[i]
|
||||
.band ==
|
||||
bssdesc_region_chan
|
||||
.chan_pwr[j]
|
||||
.band) {
|
||||
region_chan.chan_pwr[j]
|
||||
.pwr = MIN(
|
||||
region_chan
|
||||
.chan_pwr[j]
|
||||
.pwr,
|
||||
bssdesc_region_chan
|
||||
.chan_pwr[i]
|
||||
.pwr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1433,8 +1386,7 @@ wlan_11d_parse_dnld_countryinfo(mlan_private *pmpriv,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11d_prepare_dnld_domain_info_cmd(mlan_private *pmpriv)
|
||||
mlan_status wlan_11d_prepare_dnld_domain_info_cmd(mlan_private *pmpriv)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
|
@ -1449,30 +1401,26 @@ wlan_11d_prepare_dnld_domain_info_cmd(mlan_private *pmpriv)
|
|||
pcountry_full =
|
||||
&pmadapter->pscan_table[idx].country_info;
|
||||
|
||||
ret = wlan_11d_update_chan_pwr_table(pmpriv,
|
||||
&pmadapter->
|
||||
pscan_table[idx]);
|
||||
ret = wlan_11d_update_chan_pwr_table(
|
||||
pmpriv, &pmadapter->pscan_table[idx]);
|
||||
|
||||
if (*(pcountry_full->country_code) != 0 &&
|
||||
(pcountry_full->len > COUNTRY_CODE_LEN)) {
|
||||
/* Country info found in the BSS Descriptor */
|
||||
ret = wlan_11d_process_country_info(pmpriv,
|
||||
&pmadapter->
|
||||
pscan_table
|
||||
[idx]);
|
||||
ret = wlan_11d_process_country_info(
|
||||
pmpriv, &pmadapter->pscan_table[idx]);
|
||||
}
|
||||
}
|
||||
|
||||
/* Sort parsed_region_chan in ascending channel number */
|
||||
wlan_11d_sort_parsed_region_chan(&pmadapter->
|
||||
parsed_region_chan);
|
||||
wlan_11d_sort_parsed_region_chan(
|
||||
&pmadapter->parsed_region_chan);
|
||||
|
||||
/* Check if connected */
|
||||
if (pmpriv->media_connected == MTRUE) {
|
||||
ret = wlan_11d_parse_dnld_countryinfo(pmpriv,
|
||||
&pmpriv->
|
||||
curr_bss_params.
|
||||
bss_descriptor);
|
||||
ret = wlan_11d_parse_dnld_countryinfo(
|
||||
pmpriv,
|
||||
&pmpriv->curr_bss_params.bss_descriptor);
|
||||
} else {
|
||||
ret = wlan_11d_parse_dnld_countryinfo(pmpriv, MNULL);
|
||||
}
|
||||
|
@ -1491,12 +1439,12 @@ wlan_11d_prepare_dnld_domain_info_cmd(mlan_private *pmpriv)
|
|||
*
|
||||
* @return Pointer to the mapped country code string
|
||||
*/
|
||||
static t_u8 *
|
||||
wlan_11d_map_country_code(IN pmlan_adapter pmadapter, IN t_u8 *pcountry_code)
|
||||
static t_u8 *wlan_11d_map_country_code(IN pmlan_adapter pmadapter,
|
||||
IN t_u8 *pcountry_code)
|
||||
{
|
||||
/* Since firmware can only recognize EU as ETSI domain and there is no memory left
|
||||
* for some devices to convert it in firmware, driver need to convert it before
|
||||
* passing country code to firmware through tlv
|
||||
/* Since firmware can only recognize EU as ETSI domain and there is no
|
||||
* memory left for some devices to convert it in firmware, driver need
|
||||
* to convert it before passing country code to firmware through tlv
|
||||
*/
|
||||
|
||||
if (wlan_is_etsi_country(pmadapter, pcountry_code))
|
||||
|
@ -1513,8 +1461,7 @@ wlan_11d_map_country_code(IN pmlan_adapter pmadapter, IN t_u8 *pcountry_code)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11d_cfg_domain_info(IN pmlan_adapter pmadapter,
|
||||
mlan_status wlan_11d_cfg_domain_info(IN pmlan_adapter pmadapter,
|
||||
IN mlan_ioctl_req *pioctl_req)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -1539,22 +1486,19 @@ wlan_11d_cfg_domain_info(IN pmlan_adapter pmadapter,
|
|||
memcpy_ext(pmadapter, pmadapter->country_code,
|
||||
domain_info->country_code, COUNTRY_CODE_LEN,
|
||||
COUNTRY_CODE_LEN);
|
||||
wlan_11d_set_domain_info(pmpriv, domain_info->band,
|
||||
wlan_11d_map_country_code(pmadapter,
|
||||
domain_info->
|
||||
country_code),
|
||||
wlan_11d_set_domain_info(
|
||||
pmpriv, domain_info->band,
|
||||
wlan_11d_map_country_code(pmadapter, domain_info->country_code),
|
||||
domain_info->no_of_sub_band,
|
||||
(IEEEtypes_SubbandSet_t *)domain_info->
|
||||
sub_band);
|
||||
(IEEEtypes_SubbandSet_t *)domain_info->sub_band);
|
||||
ret = wlan_11d_send_domain_info(pmpriv, pioctl_req);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
/* Update region code and table based on country code */
|
||||
if (wlan_misc_country_2_cfp_table_code(pmadapter,
|
||||
domain_info->country_code,
|
||||
&cfp_bg, &cfp_a)) {
|
||||
if (wlan_misc_country_2_cfp_table_code(
|
||||
pmadapter, domain_info->country_code, &cfp_bg, &cfp_a)) {
|
||||
PRINTM(MIOCTL, "Country code %c%c not found!\n",
|
||||
domain_info->country_code[0],
|
||||
domain_info->country_code[1]);
|
||||
|
@ -1569,8 +1513,8 @@ wlan_11d_cfg_domain_info(IN pmlan_adapter pmadapter,
|
|||
else
|
||||
pmadapter->region_code = 0;
|
||||
if (wlan_set_regiontable(pmpriv, pmadapter->region_code,
|
||||
pmadapter->config_bands | pmadapter->
|
||||
adhoc_start_band)) {
|
||||
pmadapter->config_bands |
|
||||
pmadapter->adhoc_start_band)) {
|
||||
PRINTM(MIOCTL, "Fail to set regiontabl\n");
|
||||
goto done;
|
||||
}
|
||||
|
@ -1591,9 +1535,9 @@ done:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11d_handle_uap_domain_info(mlan_private *pmpriv,
|
||||
t_u8 band, t_u8 *domain_tlv, t_void *pioctl_buf)
|
||||
mlan_status wlan_11d_handle_uap_domain_info(mlan_private *pmpriv, t_u8 band,
|
||||
t_u8 *domain_tlv,
|
||||
t_void *pioctl_buf)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
|
@ -1606,10 +1550,9 @@ wlan_11d_handle_uap_domain_info(mlan_private *pmpriv,
|
|||
pdomain_tlv = (MrvlIEtypes_DomainParamSet_t *)domain_tlv;
|
||||
|
||||
/* update region code & table based on country string */
|
||||
if (wlan_misc_country_2_cfp_table_code(pmadapter,
|
||||
pdomain_tlv->country_code,
|
||||
&cfp_bg,
|
||||
&cfp_a) == MLAN_STATUS_SUCCESS) {
|
||||
if (wlan_misc_country_2_cfp_table_code(
|
||||
pmadapter, pdomain_tlv->country_code, &cfp_bg, &cfp_a) ==
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
pmadapter->cfp_code_bg = cfp_bg;
|
||||
pmadapter->cfp_code_a = cfp_a;
|
||||
if (cfp_a)
|
||||
|
@ -1619,8 +1562,8 @@ wlan_11d_handle_uap_domain_info(mlan_private *pmpriv,
|
|||
else
|
||||
pmadapter->region_code = 0;
|
||||
if (wlan_set_regiontable(pmpriv, pmadapter->region_code,
|
||||
pmadapter->config_bands | pmadapter->
|
||||
adhoc_start_band)) {
|
||||
pmadapter->config_bands |
|
||||
pmadapter->adhoc_start_band)) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
@ -1629,9 +1572,8 @@ wlan_11d_handle_uap_domain_info(mlan_private *pmpriv,
|
|||
memcpy_ext(pmadapter, pmadapter->country_code,
|
||||
pdomain_tlv->country_code, COUNTRY_CODE_LEN,
|
||||
COUNTRY_CODE_LEN);
|
||||
num_sub_band =
|
||||
((pdomain_tlv->header.len -
|
||||
COUNTRY_CODE_LEN) / sizeof(IEEEtypes_SubbandSet_t));
|
||||
num_sub_band = ((pdomain_tlv->header.len - COUNTRY_CODE_LEN) /
|
||||
sizeof(IEEEtypes_SubbandSet_t));
|
||||
|
||||
/* TODO: don't just clobber pmadapter->domain_reg.
|
||||
* Add some checking or merging between STA & UAP domain_info
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -104,17 +104,14 @@ extern t_s32 wlan_11h_issue_radar_detect(mlan_private *priv,
|
|||
extern mlan_status wlan_11h_check_chan_report(mlan_private *priv, t_u8 chan);
|
||||
|
||||
/** Add any 11h TLVs necessary to complete an adhoc start command */
|
||||
extern t_s32 wlan_11h_process_start(mlan_private *priv,
|
||||
t_u8 **ppbuffer,
|
||||
extern t_s32 wlan_11h_process_start(mlan_private *priv, t_u8 **ppbuffer,
|
||||
IEEEtypes_CapInfo_t *pcap_info,
|
||||
t_u32 channel,
|
||||
wlan_11h_bss_info_t *p11h_bss_info);
|
||||
|
||||
/** Add any 11h TLVs necessary to complete a join command (adhoc or infra) */
|
||||
extern t_s32 wlan_11h_process_join(mlan_private *priv,
|
||||
t_u8 **ppbuffer,
|
||||
IEEEtypes_CapInfo_t *pcap_info,
|
||||
t_u8 band,
|
||||
extern t_s32 wlan_11h_process_join(mlan_private *priv, t_u8 **ppbuffer,
|
||||
IEEEtypes_CapInfo_t *pcap_info, t_u8 band,
|
||||
t_u32 channel,
|
||||
wlan_11h_bss_info_t *p11h_bss_info);
|
||||
|
||||
|
@ -148,16 +145,18 @@ mlan_status wlan_11h_print_event_radar_detected(mlan_private *priv,
|
|||
/** Handler for DFS_TESTING IOCTL */
|
||||
extern mlan_status wlan_11h_ioctl_dfs_testing(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
extern mlan_status wlan_11h_ioctl_get_channel_nop_info(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req
|
||||
pioctl_req);
|
||||
extern mlan_status
|
||||
wlan_11h_ioctl_get_channel_nop_info(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
extern mlan_status
|
||||
|
||||
wlan_11h_ioctl_dfs_cancel_chan_report(mlan_private *priv,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
extern
|
||||
mlan_status wlan_11h_ioctl_chan_switch_count(pmlan_adapter pmadapter,
|
||||
extern mlan_status wlan_11h_ioctl_chan_switch_count(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
/** get/set dfs w53 cfg */
|
||||
mlan_status wlan_11h_ioctl_dfs_w53_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
/** Check if channel is under a NOP duration (should not be used) */
|
||||
|
@ -172,11 +171,13 @@ extern mlan_status wlan_11h_radar_detected_callback(t_void *priv);
|
|||
/** set dfs check channel */
|
||||
void wlan_11h_set_dfs_check_chan(mlan_private *priv, t_u8 chan);
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/** BW_change event Handler for dfs_repeater */
|
||||
void wlan_dfs_rep_bw_change(mlan_adapter *pmadapter);
|
||||
|
||||
/** disconnect event Handler for dfs_repeater */
|
||||
void wlan_dfs_rep_disconnect(mlan_adapter *pmadapter);
|
||||
#endif
|
||||
|
||||
/** Handler for RADAR_DETECTED */
|
||||
extern mlan_status wlan_11h_radar_detected_handling(mlan_adapter *pmadapter,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -63,8 +63,8 @@ mlan_status wlan_ret_reject_addba_req(IN pmlan_private pmpriv,
|
|||
IN mlan_ioctl_req *pioctl_buf);
|
||||
/** Prepare TX BF configuration command */
|
||||
mlan_status wlan_cmd_tx_bf_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_void *pdata_buf);
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf);
|
||||
/** Handle the command response TX BF configuration */
|
||||
mlan_status wlan_ret_tx_bf_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
|
@ -118,16 +118,15 @@ mlan_status wlan_ret_amsdu_aggr_ctrl(pmlan_private pmpriv,
|
|||
mlan_ioctl_req *pioctl_buf);
|
||||
void wlan_set_tx_pause_flag(mlan_private *priv, t_u8 flag);
|
||||
/** reconfigure tx buf size */
|
||||
mlan_status wlan_cmd_recfg_tx_buf(mlan_private *priv,
|
||||
HostCmd_DS_COMMAND *cmd,
|
||||
mlan_status wlan_cmd_recfg_tx_buf(mlan_private *priv, HostCmd_DS_COMMAND *cmd,
|
||||
int cmd_action, void *pdata_buf);
|
||||
/** AMSDU aggr control cmd */
|
||||
mlan_status wlan_cmd_amsdu_aggr_ctrl(mlan_private *priv,
|
||||
HostCmd_DS_COMMAND *cmd,
|
||||
int cmd_action, void *pdata_buf);
|
||||
HostCmd_DS_COMMAND *cmd, int cmd_action,
|
||||
void *pdata_buf);
|
||||
|
||||
t_u8 wlan_validate_chan_offset(IN mlan_private *pmpriv,
|
||||
IN t_u16 band, IN t_u32 chan, IN t_u8 chan_bw);
|
||||
t_u8 wlan_validate_chan_offset(IN mlan_private *pmpriv, IN t_u16 band,
|
||||
IN t_u32 chan, IN t_u8 chan_bw);
|
||||
/** get channel offset */
|
||||
t_u8 wlan_get_second_channel_offset(int chan);
|
||||
|
||||
|
@ -142,8 +141,7 @@ void wlan_11n_cleanup_txbastream_tbl(mlan_private *priv, t_u8 *ra);
|
|||
* @param mac station mac address
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static INLINE t_u8
|
||||
is_station_11n_enabled(mlan_private *priv, t_u8 *mac)
|
||||
static INLINE t_u8 is_station_11n_enabled(mlan_private *priv, t_u8 *mac)
|
||||
{
|
||||
sta_node *sta_ptr = MNULL;
|
||||
sta_ptr = wlan_get_station_entry(priv, mac);
|
||||
|
@ -159,8 +157,7 @@ is_station_11n_enabled(mlan_private *priv, t_u8 *mac)
|
|||
* @param mac station mac address
|
||||
* @return max amsdu size statio supported
|
||||
*/
|
||||
static INLINE t_u16
|
||||
get_station_max_amsdu_size(mlan_private *priv, t_u8 *mac)
|
||||
static INLINE t_u16 get_station_max_amsdu_size(mlan_private *priv, t_u8 *mac)
|
||||
{
|
||||
sta_node *sta_ptr = MNULL;
|
||||
sta_ptr = wlan_get_station_entry(priv, mac);
|
||||
|
@ -177,8 +174,8 @@ get_station_max_amsdu_size(mlan_private *priv, t_u8 *mac)
|
|||
* @param tid TID value for ptr
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static INLINE t_u8
|
||||
is_station_ampdu_allowed(mlan_private *priv, raListTbl *ptr, int tid)
|
||||
static INLINE t_u8 is_station_ampdu_allowed(mlan_private *priv, raListTbl *ptr,
|
||||
int tid)
|
||||
{
|
||||
sta_node *sta_ptr = MNULL;
|
||||
sta_ptr = wlan_get_station_entry(priv, ptr->ra);
|
||||
|
@ -188,8 +185,9 @@ is_station_ampdu_allowed(mlan_private *priv, raListTbl *ptr, int tid)
|
|||
!sta_ptr->wapi_key_on)
|
||||
return MFALSE;
|
||||
}
|
||||
return (sta_ptr->ampdu_sta[tid] != BA_STREAM_NOT_ALLOWED)
|
||||
? MTRUE : MFALSE;
|
||||
return (sta_ptr->ampdu_sta[tid] != BA_STREAM_NOT_ALLOWED) ?
|
||||
MTRUE :
|
||||
MFALSE;
|
||||
}
|
||||
return MFALSE;
|
||||
}
|
||||
|
@ -202,8 +200,7 @@ is_station_ampdu_allowed(mlan_private *priv, raListTbl *ptr, int tid)
|
|||
* @param ra station mac address
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE void
|
||||
disable_station_ampdu(mlan_private *priv, t_u8 tid, t_u8 *ra)
|
||||
static INLINE void disable_station_ampdu(mlan_private *priv, t_u8 tid, t_u8 *ra)
|
||||
{
|
||||
sta_node *sta_ptr = MNULL;
|
||||
sta_ptr = wlan_get_station_entry(priv, ra);
|
||||
|
@ -220,8 +217,7 @@ disable_station_ampdu(mlan_private *priv, t_u8 tid, t_u8 *ra)
|
|||
* @param ra station mac address
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE void
|
||||
reset_station_ampdu(mlan_private *priv, t_u8 tid, t_u8 *ra)
|
||||
static INLINE void reset_station_ampdu(mlan_private *priv, t_u8 tid, t_u8 *ra)
|
||||
{
|
||||
sta_node *sta_ptr = MNULL;
|
||||
sta_ptr = wlan_get_station_entry(priv, ra);
|
||||
|
@ -240,10 +236,9 @@ reset_station_ampdu(mlan_private *priv, t_u8 tid, t_u8 *ra)
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static INLINE t_u8
|
||||
wlan_is_ampdu_allowed(mlan_private *priv, raListTbl *ptr, int tid)
|
||||
static INLINE t_u8 wlan_is_ampdu_allowed(mlan_private *priv, raListTbl *ptr,
|
||||
int tid)
|
||||
{
|
||||
|
||||
if ((!priv->is_data_rate_auto) && IS_BG_RATE)
|
||||
return MFALSE;
|
||||
#ifdef UAP_SUPPORT
|
||||
|
@ -252,14 +247,15 @@ wlan_is_ampdu_allowed(mlan_private *priv, raListTbl *ptr, int tid)
|
|||
#endif /* UAP_SUPPORT */
|
||||
if (priv->sec_info.wapi_enabled && !priv->sec_info.wapi_key_on)
|
||||
return MFALSE;
|
||||
return (priv->aggr_prio_tbl[tid].ampdu_ap != BA_STREAM_NOT_ALLOWED)
|
||||
? MTRUE : MFALSE;
|
||||
return (priv->aggr_prio_tbl[tid].ampdu_ap != BA_STREAM_NOT_ALLOWED) ?
|
||||
MTRUE :
|
||||
MFALSE;
|
||||
}
|
||||
|
||||
#define BA_RSSI_HIGH_THRESHOLD -70
|
||||
|
||||
static INLINE void
|
||||
wlan_update_station_del_ba_count(mlan_private *priv, raListTbl *ptr)
|
||||
static INLINE void wlan_update_station_del_ba_count(mlan_private *priv,
|
||||
raListTbl *ptr)
|
||||
{
|
||||
sta_node *sta_ptr = MNULL;
|
||||
t_s8 rssi;
|
||||
|
@ -272,8 +268,7 @@ wlan_update_station_del_ba_count(mlan_private *priv, raListTbl *ptr)
|
|||
return;
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
wlan_update_del_ba_count(mlan_private *priv, raListTbl *ptr)
|
||||
static INLINE void wlan_update_del_ba_count(mlan_private *priv, raListTbl *ptr)
|
||||
{
|
||||
t_s8 rssi;
|
||||
#ifdef UAP_802_11N
|
||||
|
@ -296,8 +291,8 @@ wlan_update_del_ba_count(mlan_private *priv, raListTbl *ptr)
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static INLINE t_u8
|
||||
wlan_is_amsdu_allowed(mlan_private *priv, raListTbl *ptr, int tid)
|
||||
static INLINE t_u8 wlan_is_amsdu_allowed(mlan_private *priv, raListTbl *ptr,
|
||||
int tid)
|
||||
{
|
||||
#ifdef UAP_SUPPORT
|
||||
sta_node *sta_ptr = MNULL;
|
||||
|
@ -315,11 +310,12 @@ wlan_is_amsdu_allowed(mlan_private *priv, raListTbl *ptr, int tid)
|
|||
}
|
||||
#endif /* UAP_SUPPORT */
|
||||
#define TXRATE_BITMAP_INDEX_MCS0_7 2
|
||||
return ((priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED)
|
||||
&&((priv->is_data_rate_auto)
|
||||
||
|
||||
!(((priv->bitmap_rates[TXRATE_BITMAP_INDEX_MCS0_7]) & 0x03)
|
||||
|| IS_BG_RATE))) ? MTRUE : MFALSE;
|
||||
return ((priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED) &&
|
||||
((priv->is_data_rate_auto) ||
|
||||
!(((priv->bitmap_rates[TXRATE_BITMAP_INDEX_MCS0_7]) & 0x03) ||
|
||||
IS_BG_RATE))) ?
|
||||
MTRUE :
|
||||
MFALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -329,8 +325,7 @@ wlan_is_amsdu_allowed(mlan_private *priv, raListTbl *ptr, int tid)
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static INLINE t_u8
|
||||
wlan_is_bastream_avail(mlan_private *priv)
|
||||
static INLINE t_u8 wlan_is_bastream_avail(mlan_private *priv)
|
||||
{
|
||||
mlan_private *pmpriv = MNULL;
|
||||
t_u8 i = 0;
|
||||
|
@ -339,9 +334,8 @@ wlan_is_bastream_avail(mlan_private *priv)
|
|||
for (i = 0; i < priv->adapter->priv_num; i++) {
|
||||
pmpriv = priv->adapter->priv[i];
|
||||
if (pmpriv)
|
||||
bastream_num +=
|
||||
wlan_wmm_list_len((pmlan_list_head)&pmpriv->
|
||||
tx_ba_stream_tbl_ptr);
|
||||
bastream_num += wlan_wmm_list_len(
|
||||
(pmlan_list_head)&pmpriv->tx_ba_stream_tbl_ptr);
|
||||
}
|
||||
bastream_max = ISSUPP_GETTXBASTREAM(priv->adapter->hw_dot_11n_dev_cap);
|
||||
if (bastream_max == 0)
|
||||
|
@ -360,9 +354,9 @@ wlan_is_bastream_avail(mlan_private *priv)
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static INLINE t_u8
|
||||
wlan_find_stream_to_delete(mlan_private *priv,
|
||||
raListTbl *ptr, int ptr_tid, int *ptid, t_u8 *ra)
|
||||
static INLINE t_u8 wlan_find_stream_to_delete(mlan_private *priv,
|
||||
raListTbl *ptr, int ptr_tid,
|
||||
int *ptid, t_u8 *ra)
|
||||
{
|
||||
int tid;
|
||||
t_u8 ret = MFALSE;
|
||||
|
@ -403,8 +397,7 @@ wlan_find_stream_to_delete(mlan_private *priv,
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static INLINE int
|
||||
wlan_is_11n_enabled(mlan_private *priv, t_u8 *ra)
|
||||
static INLINE int wlan_is_11n_enabled(mlan_private *priv, t_u8 *ra)
|
||||
{
|
||||
int ret = MFALSE;
|
||||
ENTER();
|
||||
|
|
|
@ -56,9 +56,8 @@ Change log:
|
|||
*
|
||||
* @return Final packet size
|
||||
*/
|
||||
static int
|
||||
wlan_11n_form_amsdu_pkt(pmlan_adapter pmadapter, t_u8 *amsdu_buf, t_u8 *data,
|
||||
int pkt_len, int *pad)
|
||||
static int wlan_11n_form_amsdu_pkt(pmlan_adapter pmadapter, t_u8 *amsdu_buf,
|
||||
t_u8 *data, int pkt_len, int *pad)
|
||||
{
|
||||
int dt_offset, amsdu_buf_offset;
|
||||
Rfc1042Hdr_t snap = {
|
||||
|
@ -81,12 +80,9 @@ wlan_11n_form_amsdu_pkt(pmlan_adapter pmadapter, t_u8 *amsdu_buf, t_u8 *data,
|
|||
|
||||
snap.snap_type = *(t_u16 *)(data + dt_offset);
|
||||
dt_offset += sizeof(t_u16);
|
||||
*(t_u16 *)(amsdu_buf + amsdu_buf_offset) = mlan_htons(pkt_len +
|
||||
LLC_SNAP_LEN -
|
||||
((2 *
|
||||
MLAN_MAC_ADDR_LENGTH)
|
||||
+
|
||||
sizeof(t_u16)));
|
||||
*(t_u16 *)(amsdu_buf + amsdu_buf_offset) =
|
||||
mlan_htons(pkt_len + LLC_SNAP_LEN -
|
||||
((2 * MLAN_MAC_ADDR_LENGTH) + sizeof(t_u16)));
|
||||
amsdu_buf_offset += sizeof(t_u16);
|
||||
memcpy_ext(pmadapter, amsdu_buf + amsdu_buf_offset, &snap, LLC_SNAP_LEN,
|
||||
LLC_SNAP_LEN);
|
||||
|
@ -94,9 +90,9 @@ wlan_11n_form_amsdu_pkt(pmlan_adapter pmadapter, t_u8 *amsdu_buf, t_u8 *data,
|
|||
|
||||
memcpy_ext(pmadapter, amsdu_buf + amsdu_buf_offset, data + dt_offset,
|
||||
pkt_len - dt_offset, pkt_len - dt_offset);
|
||||
*pad = (((pkt_len + LLC_SNAP_LEN) & 3)) ? (4 -
|
||||
(((pkt_len +
|
||||
LLC_SNAP_LEN)) & 3)) : 0;
|
||||
*pad = (((pkt_len + LLC_SNAP_LEN) & 3)) ?
|
||||
(4 - (((pkt_len + LLC_SNAP_LEN)) & 3)) :
|
||||
0;
|
||||
|
||||
LEAVE();
|
||||
return pkt_len + LLC_SNAP_LEN + *pad;
|
||||
|
@ -110,8 +106,7 @@ wlan_11n_form_amsdu_pkt(pmlan_adapter pmadapter, t_u8 *amsdu_buf, t_u8 *data,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
wlan_11n_form_amsdu_txpd(mlan_private *priv, mlan_buffer *mbuf)
|
||||
static void wlan_11n_form_amsdu_txpd(mlan_private *priv, mlan_buffer *mbuf)
|
||||
{
|
||||
TxPD *ptx_pd;
|
||||
mlan_adapter *pmadapter = priv->adapter;
|
||||
|
@ -150,8 +145,8 @@ wlan_11n_form_amsdu_txpd(mlan_private *priv, mlan_buffer *mbuf)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE void
|
||||
wlan_11n_update_pktlen_amsdu_txpd(mlan_private *priv, pmlan_buffer mbuf)
|
||||
static INLINE void wlan_11n_update_pktlen_amsdu_txpd(mlan_private *priv,
|
||||
pmlan_buffer mbuf)
|
||||
{
|
||||
TxPD *ptx_pd;
|
||||
ENTER();
|
||||
|
@ -179,8 +174,7 @@ wlan_11n_update_pktlen_amsdu_txpd(mlan_private *priv, pmlan_buffer mbuf)
|
|||
*
|
||||
* @return Number of packets
|
||||
*/
|
||||
static int
|
||||
wlan_11n_get_num_aggrpkts(t_u8 *data, int total_pkt_len)
|
||||
static int wlan_11n_get_num_aggrpkts(t_u8 *data, int total_pkt_len)
|
||||
{
|
||||
int pkt_count = 0, pkt_len, pad;
|
||||
t_u8 hdr_len = sizeof(Eth803Hdr_t);
|
||||
|
@ -188,15 +182,16 @@ wlan_11n_get_num_aggrpkts(t_u8 *data, int total_pkt_len)
|
|||
ENTER();
|
||||
while (total_pkt_len >= hdr_len) {
|
||||
/* Length will be in network format, change it to host */
|
||||
pkt_len = mlan_ntohs((*(t_u16 *)(data + (2 *
|
||||
MLAN_MAC_ADDR_LENGTH))));
|
||||
pkt_len = mlan_ntohs(
|
||||
(*(t_u16 *)(data + (2 * MLAN_MAC_ADDR_LENGTH))));
|
||||
if (pkt_len > total_pkt_len) {
|
||||
PRINTM(MERROR, "Error in packet length.\n");
|
||||
break;
|
||||
}
|
||||
|
||||
pad = (((pkt_len + sizeof(Eth803Hdr_t)) & 3)) ?
|
||||
(4 - ((pkt_len + sizeof(Eth803Hdr_t)) & 3)) : 0;
|
||||
(4 - ((pkt_len + sizeof(Eth803Hdr_t)) & 3)) :
|
||||
0;
|
||||
data += pkt_len + pad + sizeof(Eth803Hdr_t);
|
||||
total_pkt_len -= pkt_len + pad + sizeof(Eth803Hdr_t);
|
||||
++pkt_count;
|
||||
|
@ -217,8 +212,7 @@ wlan_11n_get_num_aggrpkts(t_u8 *data, int total_pkt_len)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS --success, otherwise fail
|
||||
*/
|
||||
mlan_status
|
||||
wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
||||
mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
||||
{
|
||||
t_u16 pkt_len;
|
||||
int total_pkt_len;
|
||||
|
@ -230,8 +224,7 @@ wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
RxPacketHdr_t *prx_pkt;
|
||||
mlan_buffer *daggr_mbuf = MNULL;
|
||||
t_u8 rfc1042_eth_hdr[MLAN_MAC_ADDR_LENGTH] = {0xaa, 0xaa, 0x03,
|
||||
0x00, 0x00, 0x00
|
||||
};
|
||||
0x00, 0x00, 0x00};
|
||||
t_u8 hdr_len = sizeof(Eth803Hdr_t);
|
||||
t_u8 eapol_type[2] = {0x88, 0x8e};
|
||||
|
||||
|
@ -250,16 +243,18 @@ wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
MLAN_USB_AGGR_MODE_NUM) {
|
||||
max_rx_data_size *=
|
||||
MAX(MLAN_USB_MAX_PKT_SIZE,
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.
|
||||
aggr_ctrl.aggr_align);
|
||||
pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_align);
|
||||
max_rx_data_size =
|
||||
MAX(max_rx_data_size, MLAN_RX_DATA_BUF_SIZE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (total_pkt_len > max_rx_data_size) {
|
||||
PRINTM(MERROR, "Total packet length greater than tx buffer"
|
||||
" size %d\n", total_pkt_len);
|
||||
PRINTM(MERROR,
|
||||
"Total packet length greater than tx buffer"
|
||||
" size %d\n",
|
||||
total_pkt_len);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -268,8 +263,8 @@ wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
while (total_pkt_len >= hdr_len) {
|
||||
prx_pkt = (RxPacketHdr_t *)data;
|
||||
/* Length will be in network format, change it to host */
|
||||
pkt_len = mlan_ntohs((*(t_u16 *)(data + (2 *
|
||||
MLAN_MAC_ADDR_LENGTH))));
|
||||
pkt_len = mlan_ntohs(
|
||||
(*(t_u16 *)(data + (2 * MLAN_MAC_ADDR_LENGTH))));
|
||||
if (pkt_len > total_pkt_len) {
|
||||
PRINTM(MERROR,
|
||||
"Error in packet length: total_pkt_len = %d, pkt_len = %d\n",
|
||||
|
@ -279,25 +274,25 @@ wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
}
|
||||
|
||||
pad = (((pkt_len + sizeof(Eth803Hdr_t)) & 3)) ?
|
||||
(4 - ((pkt_len + sizeof(Eth803Hdr_t)) & 3)) : 0;
|
||||
(4 - ((pkt_len + sizeof(Eth803Hdr_t)) & 3)) :
|
||||
0;
|
||||
|
||||
total_pkt_len -= pkt_len + pad + sizeof(Eth803Hdr_t);
|
||||
|
||||
if (memcmp(pmadapter, &prx_pkt->rfc1042_hdr,
|
||||
rfc1042_eth_hdr, sizeof(rfc1042_eth_hdr)) == 0) {
|
||||
memmove(pmadapter, data + LLC_SNAP_LEN, data, (2 *
|
||||
MLAN_MAC_ADDR_LENGTH));
|
||||
if (memcmp(pmadapter, &prx_pkt->rfc1042_hdr, rfc1042_eth_hdr,
|
||||
sizeof(rfc1042_eth_hdr)) == 0) {
|
||||
memmove(pmadapter, data + LLC_SNAP_LEN, data,
|
||||
(2 * MLAN_MAC_ADDR_LENGTH));
|
||||
data += LLC_SNAP_LEN;
|
||||
pkt_len += sizeof(Eth803Hdr_t) - LLC_SNAP_LEN;
|
||||
} else {
|
||||
*(t_u16 *)(data + (2 * MLAN_MAC_ADDR_LENGTH))
|
||||
= (t_u16)0;
|
||||
*(t_u16 *)(data + (2 * MLAN_MAC_ADDR_LENGTH)) =
|
||||
(t_u16)0;
|
||||
pkt_len += sizeof(Eth803Hdr_t);
|
||||
}
|
||||
daggr_mbuf =
|
||||
wlan_alloc_mlan_buffer(pmadapter,
|
||||
pkt_len + MLAN_NET_IP_ALIGN, 0,
|
||||
MOAL_ALLOC_MLAN_BUFFER);
|
||||
daggr_mbuf = wlan_alloc_mlan_buffer(pmadapter,
|
||||
pkt_len + MLAN_NET_IP_ALIGN,
|
||||
0, MOAL_ALLOC_MLAN_BUFFER);
|
||||
if (daggr_mbuf == MNULL) {
|
||||
PRINTM(MERROR, "Error allocating daggr mlan_buffer\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
|
@ -322,16 +317,17 @@ wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
#endif /* UAP_SUPPORT */
|
||||
/** send EAPOL from AMSDU pkt to firmware */
|
||||
if (priv->sec_info.ewpa_enabled &&
|
||||
(!memcmp
|
||||
(pmadapter,
|
||||
daggr_mbuf->pbuf + daggr_mbuf->data_offset +
|
||||
MLAN_ETHER_PKT_TYPE_OFFSET, eapol_type,
|
||||
sizeof(eapol_type)))) {
|
||||
ret = wlan_prepare_cmd(priv,
|
||||
HostCmd_CMD_802_11_EAPOL_PKT,
|
||||
0, 0, MNULL, daggr_mbuf);
|
||||
(!memcmp(pmadapter,
|
||||
daggr_mbuf->pbuf +
|
||||
daggr_mbuf->data_offset +
|
||||
MLAN_ETHER_PKT_TYPE_OFFSET,
|
||||
eapol_type, sizeof(eapol_type)))) {
|
||||
ret = wlan_prepare_cmd(
|
||||
priv, HostCmd_CMD_802_11_EAPOL_PKT, 0,
|
||||
0, MNULL, daggr_mbuf);
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
wlan_recv_event(priv,
|
||||
wlan_recv_event(
|
||||
priv,
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||
MNULL);
|
||||
wlan_free_mlan_buffer(pmadapter, daggr_mbuf);
|
||||
|
@ -339,9 +335,8 @@ wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
continue;
|
||||
}
|
||||
|
||||
ret = pmadapter->callbacks.moal_recv_packet(pmadapter->
|
||||
pmoal_handle,
|
||||
daggr_mbuf);
|
||||
ret = pmadapter->callbacks.moal_recv_packet(
|
||||
pmadapter->pmoal_handle, daggr_mbuf);
|
||||
#ifdef UAP_SUPPORT
|
||||
}
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
@ -383,8 +378,7 @@ done:
|
|||
*
|
||||
* @return Final packet size or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
int
|
||||
wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
||||
int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
||||
int headroom, int ptrindex)
|
||||
{
|
||||
int pkt_size = 0;
|
||||
|
@ -405,19 +399,17 @@ wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
|
||||
PRINTM(MDAT_D, "Handling Aggr packet\n");
|
||||
|
||||
pmbuf_src =
|
||||
(pmlan_buffer)util_peek_list(pmadapter->pmoal_handle,
|
||||
&pra_list->buf_head, MNULL, MNULL);
|
||||
pmbuf_src = (pmlan_buffer)util_peek_list(
|
||||
pmadapter->pmoal_handle, &pra_list->buf_head, MNULL, MNULL);
|
||||
if (pmbuf_src) {
|
||||
pmbuf_aggr = wlan_alloc_mlan_buffer(pmadapter,
|
||||
pmadapter->tx_buf_size, 0,
|
||||
MOAL_MALLOC_BUFFER);
|
||||
if (!pmbuf_aggr) {
|
||||
PRINTM(MERROR, "Error allocating mlan_buffer\n");
|
||||
pmadapter->callbacks.moal_spin_unlock(pmadapter->
|
||||
pmoal_handle,
|
||||
priv->wmm.
|
||||
ra_list_spinlock);
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
priv->wmm.ra_list_spinlock);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
@ -442,18 +434,17 @@ wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
#endif
|
||||
priv->msdu_in_tx_amsdu_cnt++;
|
||||
} else {
|
||||
pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
priv->wmm.
|
||||
ra_list_spinlock);
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle, priv->wmm.ra_list_spinlock);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
while (pmbuf_src && ((pkt_size + (pmbuf_src->data_len + LLC_SNAP_LEN)
|
||||
+ headroom) <= max_amsdu_size)) {
|
||||
|
||||
pmbuf_src = (pmlan_buffer)
|
||||
util_dequeue_list(pmadapter->pmoal_handle,
|
||||
&pra_list->buf_head, MNULL, MNULL);
|
||||
while (pmbuf_src && ((pkt_size + (pmbuf_src->data_len + LLC_SNAP_LEN) +
|
||||
headroom) <= max_amsdu_size)) {
|
||||
pmbuf_src =
|
||||
(pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle,
|
||||
&pra_list->buf_head,
|
||||
MNULL, MNULL);
|
||||
|
||||
pra_list->total_pkts--;
|
||||
|
||||
|
@ -462,18 +453,14 @@ wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
util_scalar_decrement(pmadapter->pmoal_handle,
|
||||
&priv->wmm.tx_pkts_queued, MNULL, MNULL);
|
||||
|
||||
pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
priv->wmm.
|
||||
ra_list_spinlock);
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle, priv->wmm.ra_list_spinlock);
|
||||
|
||||
if (pmbuf_src) {
|
||||
pkt_size += wlan_11n_form_amsdu_pkt(pmadapter,
|
||||
(data + pkt_size),
|
||||
pmbuf_src->pbuf +
|
||||
pmbuf_src->
|
||||
data_offset,
|
||||
pmbuf_src->data_len,
|
||||
&pad);
|
||||
pkt_size += wlan_11n_form_amsdu_pkt(
|
||||
pmadapter, (data + pkt_size),
|
||||
pmbuf_src->pbuf + pmbuf_src->data_offset,
|
||||
pmbuf_src->data_len, &pad);
|
||||
|
||||
DBG_HEXDUMP(MDAT_D, "pmbuf_src", pmbuf_src,
|
||||
sizeof(mlan_buffer));
|
||||
|
@ -485,10 +472,9 @@ wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
priv->wmm.ra_list_spinlock);
|
||||
|
||||
if (!wlan_is_ralist_valid(priv, pra_list, ptrindex)) {
|
||||
pmadapter->callbacks.moal_spin_unlock(pmadapter->
|
||||
pmoal_handle,
|
||||
priv->wmm.
|
||||
ra_list_spinlock);
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
priv->wmm.ra_list_spinlock);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
@ -509,11 +495,11 @@ wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
wlan_11n_update_pktlen_amsdu_txpd(priv, pmbuf_aggr);
|
||||
pmbuf_aggr->data_len += headroom;
|
||||
pmbuf_aggr->pbuf = data - headroom;
|
||||
tx_param.next_pkt_len = ((pmbuf_src) ?
|
||||
pmbuf_src->data_len + sizeof(TxPD) : 0);
|
||||
tx_param.next_pkt_len =
|
||||
((pmbuf_src) ? pmbuf_src->data_len + sizeof(TxPD) : 0);
|
||||
|
||||
ret = pmadapter->ops.host_to_card(priv, MLAN_TYPE_DATA,
|
||||
pmbuf_aggr, &tx_param);
|
||||
ret = pmadapter->ops.host_to_card(priv, MLAN_TYPE_DATA, pmbuf_aggr,
|
||||
&tx_param);
|
||||
switch (ret) {
|
||||
#ifdef USB
|
||||
case MLAN_STATUS_PRESOURCE:
|
||||
|
@ -525,10 +511,9 @@ wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
priv->wmm.ra_list_spinlock);
|
||||
|
||||
if (!wlan_is_ralist_valid(priv, pra_list, ptrindex)) {
|
||||
pmadapter->callbacks.moal_spin_unlock(pmadapter->
|
||||
pmoal_handle,
|
||||
priv->wmm.
|
||||
ra_list_spinlock);
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
priv->wmm.ra_list_spinlock);
|
||||
pmbuf_aggr->status_code = MLAN_ERROR_PKT_INVALID;
|
||||
wlan_write_data_complete(pmadapter, pmbuf_aggr,
|
||||
MLAN_STATUS_FAILURE);
|
||||
|
@ -557,9 +542,8 @@ wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
util_scalar_increment(pmadapter->pmoal_handle,
|
||||
&priv->wmm.tx_pkts_queued, MNULL, MNULL);
|
||||
pmbuf_aggr->flags |= MLAN_BUF_FLAG_REQUEUED_PKT;
|
||||
pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
priv->wmm.
|
||||
ra_list_spinlock);
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle, priv->wmm.ra_list_spinlock);
|
||||
PRINTM(MINFO, "MLAN_STATUS_RESOURCE is returned\n");
|
||||
pmbuf_aggr->status_code = MLAN_ERROR_PKT_INVALID;
|
||||
break;
|
||||
|
@ -584,11 +568,10 @@ wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
priv->wmm.tid_tbl_ptr[ptrindex].ra_list_curr = pra_list;
|
||||
}
|
||||
pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur =
|
||||
pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur->
|
||||
pnext;
|
||||
pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
priv->wmm.
|
||||
ra_list_spinlock);
|
||||
pmadapter->bssprio_tbl[priv->bss_priority]
|
||||
.bssprio_cur->pnext;
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle, priv->wmm.ra_list_spinlock);
|
||||
}
|
||||
PRINTM_GET_SYS_TIME(MDATA, &sec, &usec);
|
||||
PRINTM_NETINTF(MDATA, priv);
|
||||
|
|
|
@ -32,7 +32,7 @@ Change log:
|
|||
/** Aggregate 11N packets */
|
||||
mlan_status wlan_11n_deaggregate_pkt(pmlan_private priv, pmlan_buffer pmbuf);
|
||||
/** Deaggregate 11N packets */
|
||||
int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *ptr,
|
||||
int headroom, int ptrindex);
|
||||
int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *ptr, int headroom,
|
||||
int ptrindex);
|
||||
|
||||
#endif /* !_MLAN_11N_AGGR_H_ */
|
||||
|
|
|
@ -55,8 +55,8 @@ Change log:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_11n_dispatch_amsdu_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
||||
static mlan_status wlan_11n_dispatch_amsdu_pkt(mlan_private *priv,
|
||||
pmlan_buffer pmbuf)
|
||||
{
|
||||
RxPD *prx_pd;
|
||||
prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset);
|
||||
|
@ -82,8 +82,7 @@ wlan_11n_dispatch_amsdu_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_11n_dispatch_pkt(t_void *priv, t_void *payload)
|
||||
static mlan_status wlan_11n_dispatch_pkt(t_void *priv, t_void *payload)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#ifdef STA_SUPPORT
|
||||
|
@ -129,8 +128,7 @@ wlan_11n_dispatch_pkt(t_void *priv, t_void *payload)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
mlan_11n_rxreorder_timer_restart(pmlan_adapter pmadapter,
|
||||
static void mlan_11n_rxreorder_timer_restart(pmlan_adapter pmadapter,
|
||||
RxReorderTbl *rx_reor_tbl_ptr)
|
||||
{
|
||||
t_u16 min_flush_time = 0;
|
||||
|
@ -142,15 +140,13 @@ mlan_11n_rxreorder_timer_restart(pmlan_adapter pmadapter,
|
|||
min_flush_time = MIN_FLUSH_TIMER_MS;
|
||||
|
||||
if (rx_reor_tbl_ptr->timer_context.timer_is_set)
|
||||
pmadapter->callbacks.moal_stop_timer(pmadapter->pmoal_handle,
|
||||
rx_reor_tbl_ptr->
|
||||
timer_context.timer);
|
||||
pmadapter->callbacks.moal_stop_timer(
|
||||
pmadapter->pmoal_handle,
|
||||
rx_reor_tbl_ptr->timer_context.timer);
|
||||
|
||||
pmadapter->callbacks.moal_start_timer(pmadapter->pmoal_handle,
|
||||
rx_reor_tbl_ptr->timer_context.
|
||||
timer, MFALSE,
|
||||
(rx_reor_tbl_ptr->win_size *
|
||||
min_flush_time));
|
||||
pmadapter->callbacks.moal_start_timer(
|
||||
pmadapter->pmoal_handle, rx_reor_tbl_ptr->timer_context.timer,
|
||||
MFALSE, (rx_reor_tbl_ptr->win_size * min_flush_time));
|
||||
|
||||
rx_reor_tbl_ptr->timer_context.timer_is_set = MTRUE;
|
||||
LEAVE();
|
||||
|
@ -166,10 +162,8 @@ mlan_11n_rxreorder_timer_restart(pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_11n_dispatch_pkt_until_start_win(t_void *priv,
|
||||
RxReorderTbl *rx_reor_tbl_ptr,
|
||||
int start_win)
|
||||
static mlan_status wlan_11n_dispatch_pkt_until_start_win(
|
||||
t_void *priv, RxReorderTbl *rx_reor_tbl_ptr, int start_win)
|
||||
{
|
||||
int no_pkt_to_send, i, xchg;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -180,21 +174,19 @@ wlan_11n_dispatch_pkt_until_start_win(t_void *priv,
|
|||
|
||||
no_pkt_to_send = (start_win > rx_reor_tbl_ptr->start_win) ?
|
||||
MIN((start_win - rx_reor_tbl_ptr->start_win),
|
||||
rx_reor_tbl_ptr->win_size) : rx_reor_tbl_ptr->win_size;
|
||||
rx_reor_tbl_ptr->win_size) :
|
||||
rx_reor_tbl_ptr->win_size;
|
||||
|
||||
for (i = 0; i < no_pkt_to_send; ++i) {
|
||||
pmpriv->adapter->callbacks.moal_spin_lock(pmpriv->adapter->
|
||||
pmoal_handle,
|
||||
pmpriv->rx_pkt_lock);
|
||||
pmpriv->adapter->callbacks.moal_spin_lock(
|
||||
pmpriv->adapter->pmoal_handle, pmpriv->rx_pkt_lock);
|
||||
rx_tmp_ptr = MNULL;
|
||||
if (rx_reor_tbl_ptr->rx_reorder_ptr[i]) {
|
||||
rx_tmp_ptr = rx_reor_tbl_ptr->rx_reorder_ptr[i];
|
||||
rx_reor_tbl_ptr->rx_reorder_ptr[i] = MNULL;
|
||||
}
|
||||
pmpriv->adapter->callbacks.moal_spin_unlock(pmpriv->adapter->
|
||||
pmoal_handle,
|
||||
pmpriv->
|
||||
rx_pkt_lock);
|
||||
pmpriv->adapter->callbacks.moal_spin_unlock(
|
||||
pmpriv->adapter->pmoal_handle, pmpriv->rx_pkt_lock);
|
||||
if (rx_tmp_ptr)
|
||||
wlan_11n_dispatch_pkt(priv, rx_tmp_ptr);
|
||||
}
|
||||
|
@ -213,9 +205,8 @@ wlan_11n_dispatch_pkt_until_start_win(t_void *priv,
|
|||
}
|
||||
|
||||
rx_reor_tbl_ptr->start_win = start_win;
|
||||
pmpriv->adapter->callbacks.moal_spin_unlock(pmpriv->adapter->
|
||||
pmoal_handle,
|
||||
pmpriv->rx_pkt_lock);
|
||||
pmpriv->adapter->callbacks.moal_spin_unlock(
|
||||
pmpriv->adapter->pmoal_handle, pmpriv->rx_pkt_lock);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -229,8 +220,8 @@ wlan_11n_dispatch_pkt_until_start_win(t_void *priv,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static t_void
|
||||
wlan_11n_display_tbl_ptr(pmlan_adapter pmadapter, RxReorderTbl *rx_reor_tbl_ptr)
|
||||
static t_void wlan_11n_display_tbl_ptr(pmlan_adapter pmadapter,
|
||||
RxReorderTbl *rx_reor_tbl_ptr)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -250,8 +241,8 @@ wlan_11n_display_tbl_ptr(pmlan_adapter pmadapter, RxReorderTbl *rx_reor_tbl_ptr)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_11n_scan_and_dispatch(t_void *priv, RxReorderTbl *rx_reor_tbl_ptr)
|
||||
static mlan_status wlan_11n_scan_and_dispatch(t_void *priv,
|
||||
RxReorderTbl *rx_reor_tbl_ptr)
|
||||
{
|
||||
int i, j, xchg;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -261,23 +252,18 @@ wlan_11n_scan_and_dispatch(t_void *priv, RxReorderTbl *rx_reor_tbl_ptr)
|
|||
ENTER();
|
||||
|
||||
for (i = 0; i < rx_reor_tbl_ptr->win_size; ++i) {
|
||||
pmpriv->adapter->callbacks.moal_spin_lock(pmpriv->adapter->
|
||||
pmoal_handle,
|
||||
pmpriv->rx_pkt_lock);
|
||||
pmpriv->adapter->callbacks.moal_spin_lock(
|
||||
pmpriv->adapter->pmoal_handle, pmpriv->rx_pkt_lock);
|
||||
if (!rx_reor_tbl_ptr->rx_reorder_ptr[i]) {
|
||||
pmpriv->adapter->callbacks.moal_spin_unlock(pmpriv->
|
||||
adapter->
|
||||
pmoal_handle,
|
||||
pmpriv->
|
||||
rx_pkt_lock);
|
||||
pmpriv->adapter->callbacks.moal_spin_unlock(
|
||||
pmpriv->adapter->pmoal_handle,
|
||||
pmpriv->rx_pkt_lock);
|
||||
break;
|
||||
}
|
||||
rx_tmp_ptr = rx_reor_tbl_ptr->rx_reorder_ptr[i];
|
||||
rx_reor_tbl_ptr->rx_reorder_ptr[i] = MNULL;
|
||||
pmpriv->adapter->callbacks.moal_spin_unlock(pmpriv->adapter->
|
||||
pmoal_handle,
|
||||
pmpriv->
|
||||
rx_pkt_lock);
|
||||
pmpriv->adapter->callbacks.moal_spin_unlock(
|
||||
pmpriv->adapter->pmoal_handle, pmpriv->rx_pkt_lock);
|
||||
wlan_11n_dispatch_pkt(priv, rx_tmp_ptr);
|
||||
}
|
||||
|
||||
|
@ -296,12 +282,11 @@ wlan_11n_scan_and_dispatch(t_void *priv, RxReorderTbl *rx_reor_tbl_ptr)
|
|||
}
|
||||
}
|
||||
|
||||
rx_reor_tbl_ptr->start_win = (rx_reor_tbl_ptr->start_win + i)
|
||||
& (MAX_TID_VALUE - 1);
|
||||
rx_reor_tbl_ptr->start_win =
|
||||
(rx_reor_tbl_ptr->start_win + i) & (MAX_TID_VALUE - 1);
|
||||
|
||||
pmpriv->adapter->callbacks.moal_spin_unlock(pmpriv->adapter->
|
||||
pmoal_handle,
|
||||
pmpriv->rx_pkt_lock);
|
||||
pmpriv->adapter->callbacks.moal_spin_unlock(
|
||||
pmpriv->adapter->pmoal_handle, pmpriv->rx_pkt_lock);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
@ -315,8 +300,7 @@ wlan_11n_scan_and_dispatch(t_void *priv, RxReorderTbl *rx_reor_tbl_ptr)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static t_void
|
||||
wlan_11n_delete_rxreorder_tbl_entry(mlan_private *priv,
|
||||
static t_void wlan_11n_delete_rxreorder_tbl_entry(mlan_private *priv,
|
||||
RxReorderTbl *rx_reor_tbl_ptr)
|
||||
{
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
|
@ -329,36 +313,33 @@ wlan_11n_delete_rxreorder_tbl_entry(mlan_private *priv,
|
|||
}
|
||||
mlan_block_rx_process(pmadapter, MTRUE);
|
||||
|
||||
wlan_11n_dispatch_pkt_until_start_win(priv, rx_reor_tbl_ptr,
|
||||
(rx_reor_tbl_ptr->start_win +
|
||||
rx_reor_tbl_ptr->win_size)
|
||||
& (MAX_TID_VALUE - 1));
|
||||
wlan_11n_dispatch_pkt_until_start_win(
|
||||
priv, rx_reor_tbl_ptr,
|
||||
(rx_reor_tbl_ptr->start_win + rx_reor_tbl_ptr->win_size) &
|
||||
(MAX_TID_VALUE - 1));
|
||||
|
||||
if (rx_reor_tbl_ptr->timer_context.timer) {
|
||||
if (rx_reor_tbl_ptr->timer_context.timer_is_set) {
|
||||
priv->adapter->callbacks.moal_stop_timer(pmadapter->
|
||||
pmoal_handle,
|
||||
rx_reor_tbl_ptr->timer_context.
|
||||
timer);
|
||||
priv->adapter->callbacks.moal_stop_timer(
|
||||
pmadapter->pmoal_handle,
|
||||
rx_reor_tbl_ptr->timer_context.timer);
|
||||
rx_reor_tbl_ptr->timer_context.timer_is_set = MFALSE;
|
||||
}
|
||||
priv->adapter->callbacks.moal_free_timer(pmadapter->
|
||||
pmoal_handle,
|
||||
rx_reor_tbl_ptr->timer_context.
|
||||
timer);
|
||||
priv->adapter->callbacks.moal_free_timer(
|
||||
pmadapter->pmoal_handle,
|
||||
rx_reor_tbl_ptr->timer_context.timer);
|
||||
rx_reor_tbl_ptr->timer_context.timer = MNULL;
|
||||
}
|
||||
|
||||
PRINTM(MDAT_D, "Delete rx_reor_tbl_ptr: %p\n", rx_reor_tbl_ptr);
|
||||
util_unlink_list(pmadapter->pmoal_handle,
|
||||
&priv->rx_reorder_tbl_ptr,
|
||||
util_unlink_list(pmadapter->pmoal_handle, &priv->rx_reorder_tbl_ptr,
|
||||
(pmlan_linked_list)rx_reor_tbl_ptr,
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks.moal_spin_unlock);
|
||||
|
||||
pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle,
|
||||
(t_u8 *)rx_reor_tbl_ptr->
|
||||
rx_reorder_ptr);
|
||||
pmadapter->callbacks.moal_mfree(
|
||||
pmadapter->pmoal_handle,
|
||||
(t_u8 *)rx_reor_tbl_ptr->rx_reorder_ptr);
|
||||
pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle,
|
||||
(t_u8 *)rx_reor_tbl_ptr);
|
||||
mlan_block_rx_process(pmadapter, MFALSE);
|
||||
|
@ -373,8 +354,7 @@ wlan_11n_delete_rxreorder_tbl_entry(mlan_private *priv,
|
|||
*
|
||||
* @return Last used sequence number
|
||||
*/
|
||||
static int
|
||||
wlan_11n_find_last_seqnum(RxReorderTbl *rx_reorder_tbl_ptr)
|
||||
static int wlan_11n_find_last_seqnum(RxReorderTbl *rx_reorder_tbl_ptr)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -397,10 +377,9 @@ wlan_11n_find_last_seqnum(RxReorderTbl *rx_reorder_tbl_ptr)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static t_void
|
||||
wlan_start_flush_data(mlan_private *priv, RxReorderTbl *rx_reor_tbl_ptr)
|
||||
static t_void wlan_start_flush_data(mlan_private *priv,
|
||||
RxReorderTbl *rx_reor_tbl_ptr)
|
||||
{
|
||||
|
||||
int startWin;
|
||||
|
||||
ENTER();
|
||||
|
@ -409,11 +388,10 @@ wlan_start_flush_data(mlan_private *priv, RxReorderTbl *rx_reor_tbl_ptr)
|
|||
startWin = wlan_11n_find_last_seqnum(rx_reor_tbl_ptr);
|
||||
if (startWin >= 0) {
|
||||
PRINTM(MINFO, "Flush data %d\n", startWin);
|
||||
wlan_11n_dispatch_pkt_until_start_win(priv, rx_reor_tbl_ptr,
|
||||
((rx_reor_tbl_ptr->
|
||||
start_win + startWin +
|
||||
1) & (MAX_TID_VALUE -
|
||||
1)));
|
||||
wlan_11n_dispatch_pkt_until_start_win(
|
||||
priv, rx_reor_tbl_ptr,
|
||||
((rx_reor_tbl_ptr->start_win + startWin + 1) &
|
||||
(MAX_TID_VALUE - 1)));
|
||||
}
|
||||
wlan_11n_display_tbl_ptr(priv->adapter, rx_reor_tbl_ptr);
|
||||
LEAVE();
|
||||
|
@ -426,8 +404,7 @@ wlan_start_flush_data(mlan_private *priv, RxReorderTbl *rx_reor_tbl_ptr)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static t_void
|
||||
wlan_flush_data(t_void *context)
|
||||
static t_void wlan_flush_data(t_void *context)
|
||||
{
|
||||
reorder_tmr_cnxt_t *reorder_cnxt = (reorder_tmr_cnxt_t *)context;
|
||||
ENTER();
|
||||
|
@ -452,9 +429,8 @@ wlan_flush_data(t_void *context)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static t_void
|
||||
wlan_11n_create_rxreorder_tbl(mlan_private *priv, t_u8 *ta, int tid,
|
||||
int win_size, int seq_num)
|
||||
static t_void wlan_11n_create_rxreorder_tbl(mlan_private *priv, t_u8 *ta,
|
||||
int tid, int win_size, int seq_num)
|
||||
{
|
||||
int i;
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
|
@ -476,12 +452,11 @@ wlan_11n_create_rxreorder_tbl(mlan_private *priv, t_u8 *ta, int tid,
|
|||
wlan_11n_delete_rxreorder_tbl_entry(priv, rx_reor_tbl_ptr);
|
||||
}
|
||||
mlan_block_rx_process(pmadapter, MTRUE);
|
||||
PRINTM(MCMND, "%s: seq_num %d, tid %d, ta " MACSTR
|
||||
", win_size %d\n", __func__,
|
||||
seq_num, tid, MAC2STR(ta), win_size);
|
||||
if (pmadapter->callbacks.
|
||||
moal_malloc(pmadapter->pmoal_handle, sizeof(RxReorderTbl),
|
||||
MLAN_MEM_DEF, (t_u8 **)&new_node)) {
|
||||
PRINTM(MCMND, "%s: seq_num %d, tid %d, ta " MACSTR ", win_size %d\n",
|
||||
__func__, seq_num, tid, MAC2STR(ta), win_size);
|
||||
if (pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle,
|
||||
sizeof(RxReorderTbl), MLAN_MEM_DEF,
|
||||
(t_u8 **)&new_node)) {
|
||||
PRINTM(MERROR, "Rx reorder memory allocation failed\n");
|
||||
mlan_block_rx_process(pmadapter, MFALSE);
|
||||
LEAVE();
|
||||
|
@ -489,10 +464,11 @@ wlan_11n_create_rxreorder_tbl(mlan_private *priv, t_u8 *ta, int tid,
|
|||
}
|
||||
|
||||
util_init_list((pmlan_linked_list)new_node);
|
||||
if (pmadapter->callbacks.
|
||||
moal_malloc(pmadapter->pmoal_handle, sizeof(t_void *) * win_size,
|
||||
if (pmadapter->callbacks.moal_malloc(
|
||||
pmadapter->pmoal_handle, sizeof(pmlan_buffer) * win_size,
|
||||
MLAN_MEM_DEF, (t_u8 **)&new_node->rx_reorder_ptr)) {
|
||||
PRINTM(MERROR, "Rx reorder table memory allocation" "failed\n");
|
||||
PRINTM(MERROR, "Rx reorder table memory allocation"
|
||||
"failed\n");
|
||||
pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle,
|
||||
(t_u8 *)new_node);
|
||||
mlan_block_rx_process(pmadapter, MFALSE);
|
||||
|
@ -554,8 +530,7 @@ wlan_11n_create_rxreorder_tbl(mlan_private *priv, t_u8 *ta, int tid,
|
|||
*
|
||||
* @return A pointer to structure RxReorderTbl
|
||||
*/
|
||||
RxReorderTbl *
|
||||
wlan_11n_get_rxreorder_tbl(mlan_private *priv, int tid, t_u8 *ta)
|
||||
RxReorderTbl *wlan_11n_get_rxreorder_tbl(mlan_private *priv, int tid, t_u8 *ta)
|
||||
{
|
||||
RxReorderTbl *rx_reor_tbl_ptr;
|
||||
|
||||
|
@ -571,9 +546,9 @@ wlan_11n_get_rxreorder_tbl(mlan_private *priv, int tid, t_u8 *ta)
|
|||
}
|
||||
|
||||
while (rx_reor_tbl_ptr != (RxReorderTbl *)&priv->rx_reorder_tbl_ptr) {
|
||||
if ((!memcmp
|
||||
(priv->adapter, rx_reor_tbl_ptr->ta, ta,
|
||||
MLAN_MAC_ADDR_LENGTH)) && (rx_reor_tbl_ptr->tid == tid)) {
|
||||
if ((!memcmp(priv->adapter, rx_reor_tbl_ptr->ta, ta,
|
||||
MLAN_MAC_ADDR_LENGTH)) &&
|
||||
(rx_reor_tbl_ptr->tid == tid)) {
|
||||
LEAVE();
|
||||
return rx_reor_tbl_ptr;
|
||||
}
|
||||
|
@ -595,17 +570,16 @@ wlan_11n_get_rxreorder_tbl(mlan_private *priv, int tid, t_u8 *ta)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_cmd_11n_addba_req(mlan_private *priv,
|
||||
HostCmd_DS_COMMAND *cmd, t_void *pdata_buf)
|
||||
mlan_status wlan_cmd_11n_addba_req(mlan_private *priv, HostCmd_DS_COMMAND *cmd,
|
||||
t_void *pdata_buf)
|
||||
{
|
||||
HostCmd_DS_11N_ADDBA_REQ *padd_ba_req = (HostCmd_DS_11N_ADDBA_REQ *)
|
||||
&cmd->params.add_ba_req;
|
||||
HostCmd_DS_11N_ADDBA_REQ *padd_ba_req =
|
||||
(HostCmd_DS_11N_ADDBA_REQ *)&cmd->params.add_ba_req;
|
||||
ENTER();
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_11N_ADDBA_REQ);
|
||||
cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_11N_ADDBA_REQ) +
|
||||
S_DS_GEN);
|
||||
cmd->size =
|
||||
wlan_cpu_to_le16(sizeof(HostCmd_DS_11N_ADDBA_REQ) + S_DS_GEN);
|
||||
|
||||
memcpy_ext(priv->adapter, padd_ba_req, pdata_buf,
|
||||
sizeof(HostCmd_DS_11N_ADDBA_REQ),
|
||||
|
@ -629,14 +603,12 @@ wlan_cmd_11n_addba_req(mlan_private *priv,
|
|||
*
|
||||
* @return MTRUE/MFALSE
|
||||
*/
|
||||
t_u8
|
||||
wlan_is_addba_reject(mlan_private *priv, t_u8 tid)
|
||||
t_u8 wlan_is_addba_reject(mlan_private *priv, t_u8 tid)
|
||||
{
|
||||
#ifdef STA_SUPPORT
|
||||
#endif
|
||||
return priv->addba_reject[tid];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares command for adding a block ack
|
||||
* response.
|
||||
|
@ -647,12 +619,11 @@ wlan_is_addba_reject(mlan_private *priv, t_u8 tid)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_cmd_11n_addba_rspgen(mlan_private *priv,
|
||||
mlan_status wlan_cmd_11n_addba_rspgen(mlan_private *priv,
|
||||
HostCmd_DS_COMMAND *cmd, void *pdata_buf)
|
||||
{
|
||||
HostCmd_DS_11N_ADDBA_RSP *padd_ba_rsp = (HostCmd_DS_11N_ADDBA_RSP *)
|
||||
&cmd->params.add_ba_rsp;
|
||||
HostCmd_DS_11N_ADDBA_RSP *padd_ba_rsp =
|
||||
(HostCmd_DS_11N_ADDBA_RSP *)&cmd->params.add_ba_rsp;
|
||||
HostCmd_DS_11N_ADDBA_REQ *pevt_addba_req =
|
||||
(HostCmd_DS_11N_ADDBA_REQ *)pdata_buf;
|
||||
t_u8 tid = 0;
|
||||
|
@ -680,20 +651,20 @@ wlan_cmd_11n_addba_rspgen(mlan_private *priv,
|
|||
padd_ba_rsp->add_rsp_result = 0;
|
||||
|
||||
padd_ba_rsp->block_ack_param_set = pevt_addba_req->block_ack_param_set;
|
||||
tid = (padd_ba_rsp->block_ack_param_set & BLOCKACKPARAM_TID_MASK)
|
||||
>> BLOCKACKPARAM_TID_POS;
|
||||
tid = (padd_ba_rsp->block_ack_param_set & BLOCKACKPARAM_TID_MASK) >>
|
||||
BLOCKACKPARAM_TID_POS;
|
||||
if (wlan_is_addba_reject(priv, tid)
|
||||
#ifdef STA_SUPPORT
|
||||
|| ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA)
|
||||
&& priv->wps.session_enable)
|
||||
|| ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) &&
|
||||
priv->wps.session_enable)
|
||||
#endif
|
||||
#ifdef UAP_SUPPORT
|
||||
|| ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP)
|
||||
&& (util_scalar_read(priv->adapter->pmoal_handle,
|
||||
|| ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) &&
|
||||
(util_scalar_read(priv->adapter->pmoal_handle,
|
||||
&priv->adapter->pending_bridge_pkts,
|
||||
priv->adapter->callbacks.moal_spin_lock,
|
||||
priv->adapter->callbacks.
|
||||
moal_spin_unlock) > RX_LOW_THRESHOLD))
|
||||
priv->adapter->callbacks.moal_spin_unlock) >
|
||||
RX_LOW_THRESHOLD))
|
||||
#endif
|
||||
)
|
||||
padd_ba_rsp->status_code =
|
||||
|
@ -707,11 +678,11 @@ wlan_cmd_11n_addba_rspgen(mlan_private *priv,
|
|||
padd_ba_rsp->block_ack_param_set &=
|
||||
~BLOCKACKPARAM_AMSDU_SUPP_MASK;
|
||||
|
||||
padd_ba_rsp->block_ack_param_set |= (priv->add_ba_param.rx_win_size <<
|
||||
BLOCKACKPARAM_WINSIZE_POS);
|
||||
win_size =
|
||||
(padd_ba_rsp->block_ack_param_set & BLOCKACKPARAM_WINSIZE_MASK)
|
||||
>> BLOCKACKPARAM_WINSIZE_POS;
|
||||
padd_ba_rsp->block_ack_param_set |=
|
||||
(priv->add_ba_param.rx_win_size << BLOCKACKPARAM_WINSIZE_POS);
|
||||
win_size = (padd_ba_rsp->block_ack_param_set &
|
||||
BLOCKACKPARAM_WINSIZE_MASK) >>
|
||||
BLOCKACKPARAM_WINSIZE_POS;
|
||||
|
||||
if (win_size == 0)
|
||||
padd_ba_rsp->status_code =
|
||||
|
@ -740,11 +711,11 @@ wlan_cmd_11n_addba_rspgen(mlan_private *priv,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_cmd_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *cmd, void *pdata_buf)
|
||||
mlan_status wlan_cmd_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *cmd,
|
||||
void *pdata_buf)
|
||||
{
|
||||
HostCmd_DS_11N_DELBA *pdel_ba = (HostCmd_DS_11N_DELBA *)
|
||||
&cmd->params.del_ba;
|
||||
HostCmd_DS_11N_DELBA *pdel_ba =
|
||||
(HostCmd_DS_11N_DELBA *)&cmd->params.del_ba;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -774,8 +745,7 @@ wlan_cmd_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *cmd, void *pdata_buf)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid,
|
||||
mlan_status mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid,
|
||||
t_u8 *ta, t_u8 pkt_type, void *payload)
|
||||
{
|
||||
RxReorderTbl *rx_reor_tbl_ptr;
|
||||
|
@ -821,12 +791,13 @@ mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid,
|
|||
/** drop duplicate packet */
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
} else {
|
||||
/** forward the packet to kernel */
|
||||
/** forward the packet to kernel
|
||||
*/
|
||||
rx_reor_tbl_ptr->last_seq =
|
||||
seq_num;
|
||||
if (pkt_type != PKT_TYPE_BAR)
|
||||
wlan_11n_dispatch_pkt
|
||||
(priv, payload);
|
||||
wlan_11n_dispatch_pkt(
|
||||
priv, payload);
|
||||
}
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -835,15 +806,15 @@ mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid,
|
|||
if ((seq_num != rx_reor_tbl_ptr->start_win) &&
|
||||
(rx_reor_tbl_ptr->last_seq !=
|
||||
DEFAULT_SEQ_NUM)) {
|
||||
end_win =
|
||||
(rx_reor_tbl_ptr->start_win +
|
||||
end_win = (rx_reor_tbl_ptr->start_win +
|
||||
rx_reor_tbl_ptr->win_size -
|
||||
1) & (MAX_TID_VALUE - 1);
|
||||
1) &
|
||||
(MAX_TID_VALUE - 1);
|
||||
if (((end_win >
|
||||
rx_reor_tbl_ptr->start_win)
|
||||
&& (rx_reor_tbl_ptr->last_seq >=
|
||||
rx_reor_tbl_ptr->start_win)
|
||||
&& (rx_reor_tbl_ptr->last_seq <
|
||||
rx_reor_tbl_ptr->start_win) &&
|
||||
(rx_reor_tbl_ptr->last_seq >=
|
||||
rx_reor_tbl_ptr->start_win) &&
|
||||
(rx_reor_tbl_ptr->last_seq <
|
||||
end_win)) ||
|
||||
((end_win <
|
||||
rx_reor_tbl_ptr->start_win) &&
|
||||
|
@ -853,40 +824,38 @@ mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid,
|
|||
end_win)))) {
|
||||
PRINTM(MDAT_D,
|
||||
"Update start_win: last_seq=%d, start_win=%d seq_num=%d\n",
|
||||
rx_reor_tbl_ptr->
|
||||
last_seq,
|
||||
rx_reor_tbl_ptr->
|
||||
start_win, seq_num);
|
||||
rx_reor_tbl_ptr->last_seq,
|
||||
rx_reor_tbl_ptr
|
||||
->start_win,
|
||||
seq_num);
|
||||
rx_reor_tbl_ptr->start_win =
|
||||
rx_reor_tbl_ptr->
|
||||
last_seq + 1;
|
||||
rx_reor_tbl_ptr
|
||||
->last_seq +
|
||||
1;
|
||||
} else if ((seq_num <
|
||||
rx_reor_tbl_ptr->start_win)
|
||||
&& (seq_num >
|
||||
rx_reor_tbl_ptr->
|
||||
last_seq)) {
|
||||
rx_reor_tbl_ptr->start_win) &&
|
||||
(seq_num >
|
||||
rx_reor_tbl_ptr->last_seq)) {
|
||||
PRINTM(MDAT_D,
|
||||
"Update start_win: last_seq=%d, start_win=%d seq_num=%d\n",
|
||||
rx_reor_tbl_ptr->
|
||||
last_seq,
|
||||
rx_reor_tbl_ptr->
|
||||
start_win, seq_num);
|
||||
rx_reor_tbl_ptr->last_seq,
|
||||
rx_reor_tbl_ptr
|
||||
->start_win,
|
||||
seq_num);
|
||||
rx_reor_tbl_ptr->start_win =
|
||||
rx_reor_tbl_ptr->
|
||||
last_seq + 1;
|
||||
rx_reor_tbl_ptr
|
||||
->last_seq +
|
||||
1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rx_reor_tbl_ptr->force_no_drop) {
|
||||
wlan_11n_dispatch_pkt_until_start_win(priv,
|
||||
rx_reor_tbl_ptr,
|
||||
(rx_reor_tbl_ptr->
|
||||
start_win +
|
||||
rx_reor_tbl_ptr->
|
||||
win_size)
|
||||
& (MAX_TID_VALUE -
|
||||
1));
|
||||
wlan_11n_dispatch_pkt_until_start_win(
|
||||
priv, rx_reor_tbl_ptr,
|
||||
(rx_reor_tbl_ptr->start_win +
|
||||
rx_reor_tbl_ptr->win_size) &
|
||||
(MAX_TID_VALUE - 1));
|
||||
if (pkt_type != PKT_TYPE_BAR)
|
||||
rx_reor_tbl_ptr->start_win = seq_num;
|
||||
mlan_11n_rxreorder_timer_restart(pmadapter,
|
||||
|
@ -938,63 +907,58 @@ mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid,
|
|||
* WinStart = seq_num
|
||||
*/
|
||||
if (pkt_type == PKT_TYPE_BAR)
|
||||
seq_num =
|
||||
((seq_num + win_size) - 1) & (MAX_TID_VALUE -
|
||||
1);
|
||||
seq_num = ((seq_num + win_size) - 1) &
|
||||
(MAX_TID_VALUE - 1);
|
||||
|
||||
PRINTM(MDAT_D,
|
||||
"2:seq_num %d start_win %d win_size %d end_win %d\n",
|
||||
seq_num, start_win, win_size, end_win);
|
||||
|
||||
if (((end_win < start_win) &&
|
||||
(seq_num < start_win) && (seq_num > end_win))
|
||||
|| ((end_win > start_win) &&
|
||||
if (((end_win < start_win) && (seq_num < start_win) &&
|
||||
(seq_num > end_win)) ||
|
||||
((end_win > start_win) &&
|
||||
((seq_num > end_win) || (seq_num < start_win)))) {
|
||||
|
||||
end_win = seq_num;
|
||||
if (((seq_num - win_size) + 1) >= 0)
|
||||
start_win = (end_win - win_size) + 1;
|
||||
else
|
||||
start_win = (MAX_TID_VALUE -
|
||||
(win_size - seq_num)) + 1;
|
||||
ret = wlan_11n_dispatch_pkt_until_start_win(priv,
|
||||
rx_reor_tbl_ptr,
|
||||
start_win);
|
||||
start_win =
|
||||
(MAX_TID_VALUE - (win_size - seq_num)) +
|
||||
1;
|
||||
ret = wlan_11n_dispatch_pkt_until_start_win(
|
||||
priv, rx_reor_tbl_ptr, start_win);
|
||||
if (ret)
|
||||
goto done;
|
||||
}
|
||||
|
||||
PRINTM(MDAT_D, "3:seq_num %d start_win %d win_size %d"
|
||||
" end_win %d\n", seq_num, start_win, win_size, end_win);
|
||||
PRINTM(MDAT_D,
|
||||
"3:seq_num %d start_win %d win_size %d"
|
||||
" end_win %d\n",
|
||||
seq_num, start_win, win_size, end_win);
|
||||
if (pkt_type != PKT_TYPE_BAR) {
|
||||
if (seq_num >= start_win) {
|
||||
if (rx_reor_tbl_ptr->rx_reorder_ptr[seq_num
|
||||
-
|
||||
start_win])
|
||||
{
|
||||
if (rx_reor_tbl_ptr->rx_reorder_ptr[seq_num -
|
||||
start_win]) {
|
||||
PRINTM(MDAT_D, "Drop Duplicate Pkt\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
rx_reor_tbl_ptr->rx_reorder_ptr[seq_num
|
||||
- start_win] =
|
||||
rx_reor_tbl_ptr
|
||||
->rx_reorder_ptr[seq_num - start_win] =
|
||||
payload;
|
||||
} else { /* Wrap condition */
|
||||
if (rx_reor_tbl_ptr->rx_reorder_ptr[(seq_num
|
||||
+
|
||||
(MAX_TID_VALUE))
|
||||
-
|
||||
start_win])
|
||||
{
|
||||
if (rx_reor_tbl_ptr
|
||||
->rx_reorder_ptr[(seq_num +
|
||||
(MAX_TID_VALUE)) -
|
||||
start_win]) {
|
||||
PRINTM(MDAT_D, "Drop Duplicate Pkt\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
rx_reor_tbl_ptr->rx_reorder_ptr[(seq_num
|
||||
+
|
||||
(MAX_TID_VALUE))
|
||||
- start_win] =
|
||||
payload;
|
||||
rx_reor_tbl_ptr
|
||||
->rx_reorder_ptr[(seq_num +
|
||||
(MAX_TID_VALUE)) -
|
||||
start_win] = payload;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1012,7 +976,6 @@ mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid,
|
|||
done:
|
||||
if (!rx_reor_tbl_ptr->timer_context.timer_is_set ||
|
||||
(prev_start_win != rx_reor_tbl_ptr->start_win)) {
|
||||
|
||||
mlan_11n_rxreorder_timer_restart(pmadapter, rx_reor_tbl_ptr);
|
||||
}
|
||||
|
||||
|
@ -1033,10 +996,8 @@ done:
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid,
|
||||
t_u8 *peer_mac, t_u8 type, int initiator,
|
||||
t_u16 reason_code)
|
||||
void mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid, t_u8 *peer_mac,
|
||||
t_u8 type, int initiator, t_u16 reason_code)
|
||||
{
|
||||
RxReorderTbl *rx_reor_tbl_ptr;
|
||||
TxBAStreamTbl *ptxtbl;
|
||||
|
@ -1051,9 +1012,10 @@ mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid,
|
|||
else
|
||||
cleanup_rx_reorder_tbl = (initiator) ? MFALSE : MTRUE;
|
||||
|
||||
PRINTM(MEVENT, "delete_bastream_tbl: " MACSTR " tid=%d, type=%d"
|
||||
"initiator=%d reason=%d\n", MAC2STR(peer_mac), tid, type,
|
||||
initiator, reason_code);
|
||||
PRINTM(MEVENT,
|
||||
"delete_bastream_tbl: " MACSTR " tid=%d, type=%d"
|
||||
"initiator=%d reason=%d\n",
|
||||
MAC2STR(peer_mac), tid, type, initiator, reason_code);
|
||||
|
||||
if (cleanup_rx_reorder_tbl) {
|
||||
rx_reor_tbl_ptr =
|
||||
|
@ -1091,8 +1053,8 @@ mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid,
|
|||
#define MIN_BA_SETUP_PACKET_REQIRED 1024
|
||||
ra_list->ba_packet_threshold =
|
||||
MIN_BA_SETUP_PACKET_REQIRED +
|
||||
wlan_get_random_ba_threshold(priv->
|
||||
adapter);
|
||||
wlan_get_random_ba_threshold(
|
||||
priv->adapter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1109,11 +1071,11 @@ mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_ret_11n_addba_resp(mlan_private *priv, HostCmd_DS_COMMAND *resp)
|
||||
mlan_status wlan_ret_11n_addba_resp(mlan_private *priv,
|
||||
HostCmd_DS_COMMAND *resp)
|
||||
{
|
||||
HostCmd_DS_11N_ADDBA_RSP *padd_ba_rsp = (HostCmd_DS_11N_ADDBA_RSP *)
|
||||
&resp->params.add_ba_rsp;
|
||||
HostCmd_DS_11N_ADDBA_RSP *padd_ba_rsp =
|
||||
(HostCmd_DS_11N_ADDBA_RSP *)&resp->params.add_ba_rsp;
|
||||
int tid;
|
||||
RxReorderTbl *rx_reor_tbl_ptr = MNULL;
|
||||
|
||||
|
@ -1126,8 +1088,8 @@ wlan_ret_11n_addba_resp(mlan_private *priv, HostCmd_DS_COMMAND *resp)
|
|||
wlan_le16_to_cpu(padd_ba_rsp->block_ack_tmo);
|
||||
padd_ba_rsp->ssn = wlan_le16_to_cpu(padd_ba_rsp->ssn);
|
||||
|
||||
tid = (padd_ba_rsp->block_ack_param_set & BLOCKACKPARAM_TID_MASK)
|
||||
>> BLOCKACKPARAM_TID_POS;
|
||||
tid = (padd_ba_rsp->block_ack_param_set & BLOCKACKPARAM_TID_MASK) >>
|
||||
BLOCKACKPARAM_TID_POS;
|
||||
/* Check if we had rejected the ADDBA, if yes then do not create the
|
||||
* stream
|
||||
*/
|
||||
|
@ -1137,19 +1099,17 @@ wlan_ret_11n_addba_resp(mlan_private *priv, HostCmd_DS_COMMAND *resp)
|
|||
" tid=%d ssn=%d win_size=%d,amsdu=%d\n",
|
||||
MAC2STR(padd_ba_rsp->peer_mac_addr), tid,
|
||||
padd_ba_rsp->ssn,
|
||||
((padd_ba_rsp->
|
||||
block_ack_param_set & BLOCKACKPARAM_WINSIZE_MASK)
|
||||
>> BLOCKACKPARAM_WINSIZE_POS),
|
||||
padd_ba_rsp->
|
||||
block_ack_param_set & BLOCKACKPARAM_AMSDU_SUPP_MASK);
|
||||
((padd_ba_rsp->block_ack_param_set &
|
||||
BLOCKACKPARAM_WINSIZE_MASK) >>
|
||||
BLOCKACKPARAM_WINSIZE_POS),
|
||||
padd_ba_rsp->block_ack_param_set &
|
||||
BLOCKACKPARAM_AMSDU_SUPP_MASK);
|
||||
|
||||
rx_reor_tbl_ptr =
|
||||
wlan_11n_get_rxreorder_tbl(priv, tid,
|
||||
padd_ba_rsp->peer_mac_addr);
|
||||
rx_reor_tbl_ptr = wlan_11n_get_rxreorder_tbl(
|
||||
priv, tid, padd_ba_rsp->peer_mac_addr);
|
||||
if (rx_reor_tbl_ptr) {
|
||||
rx_reor_tbl_ptr->ba_status = BA_STREAM_SETUP_COMPLETE;
|
||||
if ((padd_ba_rsp->
|
||||
block_ack_param_set &
|
||||
if ((padd_ba_rsp->block_ack_param_set &
|
||||
BLOCKACKPARAM_AMSDU_SUPP_MASK) &&
|
||||
priv->add_ba_param.rx_amsdu)
|
||||
rx_reor_tbl_ptr->amsdu = MTRUE;
|
||||
|
@ -1159,9 +1119,8 @@ wlan_ret_11n_addba_resp(mlan_private *priv, HostCmd_DS_COMMAND *resp)
|
|||
} else {
|
||||
PRINTM(MCMND, "ADDBA RSP: Failed(" MACSTR " tid=%d)\n",
|
||||
MAC2STR(padd_ba_rsp->peer_mac_addr), tid);
|
||||
rx_reor_tbl_ptr = wlan_11n_get_rxreorder_tbl(priv, tid,
|
||||
padd_ba_rsp->
|
||||
peer_mac_addr);
|
||||
rx_reor_tbl_ptr = wlan_11n_get_rxreorder_tbl(
|
||||
priv, tid, padd_ba_rsp->peer_mac_addr);
|
||||
if (rx_reor_tbl_ptr)
|
||||
wlan_11n_delete_rxreorder_tbl_entry(priv,
|
||||
rx_reor_tbl_ptr);
|
||||
|
@ -1179,8 +1138,8 @@ wlan_ret_11n_addba_resp(mlan_private *priv, HostCmd_DS_COMMAND *resp)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_11n_ba_stream_timeout(mlan_private *priv, HostCmd_DS_11N_BATIMEOUT *event)
|
||||
void wlan_11n_ba_stream_timeout(mlan_private *priv,
|
||||
HostCmd_DS_11N_BATIMEOUT *event)
|
||||
{
|
||||
HostCmd_DS_11N_DELBA delba;
|
||||
|
||||
|
@ -1193,8 +1152,8 @@ wlan_11n_ba_stream_timeout(mlan_private *priv, HostCmd_DS_11N_BATIMEOUT *event)
|
|||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
|
||||
delba.del_ba_param_set |= (t_u16)event->tid << DELBA_TID_POS;
|
||||
delba.del_ba_param_set |=
|
||||
(t_u16)event->origninator << DELBA_INITIATOR_POS;
|
||||
delba.del_ba_param_set |= (t_u16)event->origninator
|
||||
<< DELBA_INITIATOR_POS;
|
||||
delba.reason_code = REASON_CODE_STA_TIMEOUT;
|
||||
wlan_prepare_cmd(priv, HostCmd_CMD_11N_DELBA, 0, 0, MNULL, &delba);
|
||||
|
||||
|
@ -1209,16 +1168,14 @@ wlan_11n_ba_stream_timeout(mlan_private *priv, HostCmd_DS_11N_BATIMEOUT *event)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_11n_cleanup_reorder_tbl(mlan_private *priv)
|
||||
void wlan_11n_cleanup_reorder_tbl(mlan_private *priv)
|
||||
{
|
||||
RxReorderTbl *del_tbl_ptr;
|
||||
|
||||
ENTER();
|
||||
|
||||
while ((del_tbl_ptr = (RxReorderTbl *)
|
||||
util_peek_list(priv->adapter->pmoal_handle,
|
||||
&priv->rx_reorder_tbl_ptr,
|
||||
while ((del_tbl_ptr = (RxReorderTbl *)util_peek_list(
|
||||
priv->adapter->pmoal_handle, &priv->rx_reorder_tbl_ptr,
|
||||
priv->adapter->callbacks.moal_spin_lock,
|
||||
priv->adapter->callbacks.moal_spin_unlock))) {
|
||||
wlan_11n_delete_rxreorder_tbl_entry(priv, del_tbl_ptr);
|
||||
|
@ -1238,8 +1195,7 @@ wlan_11n_cleanup_reorder_tbl(mlan_private *priv)
|
|||
* @param len event_buf length
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_11n_rxba_sync_event(mlan_private *priv, t_u8 *event_buf, t_u16 len)
|
||||
void wlan_11n_rxba_sync_event(mlan_private *priv, t_u8 *event_buf, t_u16 len)
|
||||
{
|
||||
MrvlIEtypes_RxBaSync_t *tlv_rxba = (MrvlIEtypes_RxBaSync_t *)event_buf;
|
||||
t_u16 tlv_type, tlv_len;
|
||||
|
@ -1262,9 +1218,8 @@ wlan_11n_rxba_sync_event(mlan_private *priv, t_u8 *event_buf, t_u16 len)
|
|||
PRINTM(MEVENT, MACSTR " tid=%d seq_num=%d bitmap_len=%d\n",
|
||||
MAC2STR(tlv_rxba->mac), tlv_rxba->tid, tlv_rxba->seq_num,
|
||||
tlv_rxba->bitmap_len);
|
||||
rx_reor_tbl_ptr =
|
||||
wlan_11n_get_rxreorder_tbl(priv, tlv_rxba->tid,
|
||||
tlv_rxba->mac);
|
||||
rx_reor_tbl_ptr = wlan_11n_get_rxreorder_tbl(
|
||||
priv, tlv_rxba->tid, tlv_rxba->mac);
|
||||
if (!rx_reor_tbl_ptr) {
|
||||
PRINTM(MEVENT, "Can not find rx_reorder_tbl\n");
|
||||
goto done;
|
||||
|
@ -1276,24 +1231,21 @@ wlan_11n_rxba_sync_event(mlan_private *priv, t_u8 *event_buf, t_u16 len)
|
|||
for (i = 0; i < tlv_rxba->bitmap_len; i++) {
|
||||
for (j = 0; j < 8; j++) {
|
||||
if (tlv_rxba->bitmap[i] & (1 << j)) {
|
||||
seq_num =
|
||||
(tlv_rxba->seq_num + i * 8 +
|
||||
j) & (MAX_TID_VALUE - 1);
|
||||
seq_num = (tlv_rxba->seq_num + i * 8 +
|
||||
j) &
|
||||
(MAX_TID_VALUE - 1);
|
||||
PRINTM(MEVENT,
|
||||
"Fw dropped packet, seq=%d start_win=%d, win_size=%d\n",
|
||||
seq_num,
|
||||
rx_reor_tbl_ptr->start_win,
|
||||
rx_reor_tbl_ptr->win_size);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
mlan_11n_rxreorder_pkt(priv,
|
||||
seq_num,
|
||||
tlv_rxba->
|
||||
tid,
|
||||
tlv_rxba->
|
||||
mac, 0,
|
||||
mlan_11n_rxreorder_pkt(
|
||||
priv, seq_num,
|
||||
tlv_rxba->tid,
|
||||
tlv_rxba->mac, 0,
|
||||
(t_void *)
|
||||
RX_PKT_DROPPED_IN_FW))
|
||||
{
|
||||
RX_PKT_DROPPED_IN_FW)) {
|
||||
PRINTM(MERROR,
|
||||
"Fail to handle dropped packet, seq=%d\n",
|
||||
seq_num);
|
||||
|
@ -1318,8 +1270,7 @@ done:
|
|||
* @param ta ta to find in reordering table
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_cleanup_reorder_tbl(mlan_private *priv, t_u8 *ta)
|
||||
void wlan_cleanup_reorder_tbl(mlan_private *priv, t_u8 *ta)
|
||||
{
|
||||
RxReorderTbl *rx_reor_tbl_ptr = MNULL;
|
||||
t_u8 i;
|
||||
|
@ -1342,20 +1293,16 @@ wlan_cleanup_reorder_tbl(mlan_private *priv, t_u8 *ta)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_set_rxreorder_tbl_no_drop_flag(mlan_private *priv, t_u8 flag)
|
||||
void wlan_set_rxreorder_tbl_no_drop_flag(mlan_private *priv, t_u8 flag)
|
||||
{
|
||||
RxReorderTbl *rx_reor_tbl_ptr;
|
||||
|
||||
ENTER();
|
||||
|
||||
rx_reor_tbl_ptr =
|
||||
(RxReorderTbl *)util_peek_list(priv->adapter->pmoal_handle,
|
||||
&priv->rx_reorder_tbl_ptr,
|
||||
priv->adapter->callbacks.
|
||||
moal_spin_lock,
|
||||
priv->adapter->callbacks.
|
||||
moal_spin_unlock);
|
||||
rx_reor_tbl_ptr = (RxReorderTbl *)util_peek_list(
|
||||
priv->adapter->pmoal_handle, &priv->rx_reorder_tbl_ptr,
|
||||
priv->adapter->callbacks.moal_spin_lock,
|
||||
priv->adapter->callbacks.moal_spin_unlock);
|
||||
if (!rx_reor_tbl_ptr) {
|
||||
LEAVE();
|
||||
return;
|
||||
|
@ -1377,8 +1324,7 @@ wlan_set_rxreorder_tbl_no_drop_flag(mlan_private *priv, t_u8 flag)
|
|||
* @param flag MTRUE/MFALSE
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_update_rxreorder_tbl(pmlan_adapter pmadapter, t_u8 flag)
|
||||
void wlan_update_rxreorder_tbl(pmlan_adapter pmadapter, t_u8 flag)
|
||||
{
|
||||
t_u8 i;
|
||||
pmlan_private priv = MNULL;
|
||||
|
@ -1399,20 +1345,16 @@ wlan_update_rxreorder_tbl(pmlan_adapter pmadapter, t_u8 flag)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_flush_priv_rxreorder_tbl(mlan_private *priv)
|
||||
void wlan_flush_priv_rxreorder_tbl(mlan_private *priv)
|
||||
{
|
||||
RxReorderTbl *rx_reor_tbl_ptr;
|
||||
|
||||
ENTER();
|
||||
|
||||
rx_reor_tbl_ptr =
|
||||
(RxReorderTbl *)util_peek_list(priv->adapter->pmoal_handle,
|
||||
&priv->rx_reorder_tbl_ptr,
|
||||
priv->adapter->callbacks.
|
||||
moal_spin_lock,
|
||||
priv->adapter->callbacks.
|
||||
moal_spin_unlock);
|
||||
rx_reor_tbl_ptr = (RxReorderTbl *)util_peek_list(
|
||||
priv->adapter->pmoal_handle, &priv->rx_reorder_tbl_ptr,
|
||||
priv->adapter->callbacks.moal_spin_lock,
|
||||
priv->adapter->callbacks.moal_spin_unlock);
|
||||
if (!rx_reor_tbl_ptr) {
|
||||
LEAVE();
|
||||
return;
|
||||
|
@ -1436,8 +1378,7 @@ wlan_flush_priv_rxreorder_tbl(mlan_private *priv)
|
|||
* @param pmadapter A pointer to mlan_adapter
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_flush_rxreorder_tbl(pmlan_adapter pmadapter)
|
||||
void wlan_flush_rxreorder_tbl(pmlan_adapter pmadapter)
|
||||
{
|
||||
t_u8 i;
|
||||
pmlan_private priv = MNULL;
|
||||
|
@ -1458,8 +1399,7 @@ wlan_flush_rxreorder_tbl(pmlan_adapter pmadapter)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_update_ampdu_rxwinsize(pmlan_adapter pmadapter, t_u8 coex_flag)
|
||||
void wlan_update_ampdu_rxwinsize(pmlan_adapter pmadapter, t_u8 coex_flag)
|
||||
{
|
||||
t_u8 i;
|
||||
t_u32 rx_win_size = 0;
|
||||
|
@ -1504,7 +1444,8 @@ wlan_update_ampdu_rxwinsize(pmlan_adapter pmadapter, t_u8 coex_flag)
|
|||
if (priv->media_connected == MTRUE) {
|
||||
for (i = 0; i < MAX_NUM_TID; i++)
|
||||
wlan_11n_delba(priv, i);
|
||||
wlan_recv_event(priv,
|
||||
wlan_recv_event(
|
||||
priv,
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||
MNULL);
|
||||
}
|
||||
|
@ -1522,8 +1463,7 @@ wlan_update_ampdu_rxwinsize(pmlan_adapter pmadapter, t_u8 coex_flag)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
wlan_coex_ampdu_rxwinsize(pmlan_adapter pmadapter)
|
||||
void wlan_coex_ampdu_rxwinsize(pmlan_adapter pmadapter)
|
||||
{
|
||||
t_u8 i;
|
||||
pmlan_private priv = MNULL;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -24,7 +24,7 @@
|
|||
#define _MLAN_DECL_H_
|
||||
|
||||
/** MLAN release version */
|
||||
#define MLAN_RELEASE_VERSION "169"
|
||||
#define MLAN_RELEASE_VERSION "175"
|
||||
|
||||
/** Re-define generic data types for MLAN/MOAL */
|
||||
/** Signed char (1-byte) */
|
||||
|
@ -116,8 +116,7 @@ typedef t_s32 t_sval;
|
|||
#endif
|
||||
|
||||
/** Macros for Data Alignment : size */
|
||||
#define ALIGN_SZ(p, a) \
|
||||
(((p) + ((a) - 1)) & ~((a) - 1))
|
||||
#define ALIGN_SZ(p, a) (((p) + ((a)-1)) & ~((a)-1))
|
||||
|
||||
/** Macros for Data Alignment : address */
|
||||
#define ALIGN_ADDR(p, a) \
|
||||
|
@ -248,7 +247,7 @@ typedef t_s32 t_sval;
|
|||
* Size of DMA buffer to collect 10ms SSU data:
|
||||
* 2500 spectral packets, plus header
|
||||
*/
|
||||
#define MLAN_SSU_BUF_SIZE_1MS MLAN_SSU_MAX_PKT_SIZE * 250
|
||||
#define MLAN_SSU_BUF_SIZE_1MS (MLAN_SSU_MAX_PKT_SIZE * 250)
|
||||
#define MLAN_SSU_BUF_SIZE (MLAN_SSU_HEADER_SIZE + MLAN_SSU_BUF_SIZE_1MS * 10)
|
||||
#define MLAN_SSU_BUF_SIZE_HOST (MLAN_SSU_BUF_SIZE)
|
||||
#endif
|
||||
|
@ -281,12 +280,14 @@ typedef t_s32 t_sval;
|
|||
|
||||
#define MLAN_USB_TX_AGGR_ALIGN (MLAN_USB_BLOCK_SIZE * 4)
|
||||
#define MLAN_USB_TX_MAX_AGGR_NUM (8)
|
||||
#define MLAN_USB_TX_MAX_AGGR_SIZE (MLAN_USB_BLOCK_SIZE * 4 * MLAN_USB_TX_MAX_AGGR_NUM)
|
||||
#define MLAN_USB_TX_MAX_AGGR_SIZE \
|
||||
(MLAN_USB_BLOCK_SIZE * 4 * MLAN_USB_TX_MAX_AGGR_NUM)
|
||||
#define MLAN_USB_TX_MIN_AGGR_TIMEOUT (1)
|
||||
#define MLAN_USB_TX_MAX_AGGR_TIMEOUT (4)
|
||||
#define MLAN_USB_TX_AGGR_TIMEOUT_MSEC MLAN_USB_TX_MIN_AGGR_TIMEOUT
|
||||
#define MLAN_USB_TX_AGGR_TIMEOUT_DYN (0xFFFF)
|
||||
#endif /*USB*/
|
||||
|
||||
/** MLAN MAC Address Length */
|
||||
#define MLAN_MAC_ADDR_LENGTH (6)
|
||||
/** MLAN 802.11 MAC Address */
|
||||
|
@ -807,35 +808,39 @@ enum mlan_channel_type {
|
|||
};
|
||||
|
||||
/** channel band */
|
||||
enum {
|
||||
BAND_2GHZ = 0,
|
||||
enum { BAND_2GHZ = 0,
|
||||
BAND_5GHZ = 1,
|
||||
BAND_4GHZ = 2,
|
||||
};
|
||||
|
||||
/** channel offset */
|
||||
enum {
|
||||
SEC_CHAN_NONE = 0,
|
||||
enum { SEC_CHAN_NONE = 0,
|
||||
SEC_CHAN_ABOVE = 1,
|
||||
SEC_CHAN_5MHZ = 2,
|
||||
SEC_CHAN_BELOW = 3
|
||||
};
|
||||
SEC_CHAN_BELOW = 3 };
|
||||
|
||||
/** channel bandwidth */
|
||||
enum {
|
||||
CHAN_BW_20MHZ = 0,
|
||||
enum { CHAN_BW_20MHZ = 0,
|
||||
CHAN_BW_10MHZ,
|
||||
CHAN_BW_40MHZ,
|
||||
CHAN_BW_80MHZ,
|
||||
};
|
||||
|
||||
/** scan mode */
|
||||
enum {
|
||||
SCAN_MODE_MANUAL = 0,
|
||||
enum { SCAN_MODE_MANUAL = 0,
|
||||
SCAN_MODE_ACS,
|
||||
SCAN_MODE_USER,
|
||||
};
|
||||
|
||||
typedef enum _dfs_w53_cfg_t {
|
||||
/** DFS W53 Default Fw Value */
|
||||
DFS_W53_DEFAULT_FW = 0,
|
||||
/** DFS W53 New W53 Rules/Standard */
|
||||
DFS_W53_NEW = 1,
|
||||
/** DFS W53 Old W53 Rules/Standard */
|
||||
DFS_W53_OLD = 2
|
||||
} dfs_w53_cfg_t;
|
||||
|
||||
/** Band_Config_t */
|
||||
typedef MLAN_PACK_START struct _Band_Config_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
|
@ -911,7 +916,8 @@ typedef struct _chan_freq_power_t {
|
|||
/** Max allowed Tx power level */
|
||||
t_u16 max_tx_power;
|
||||
/** TRUE:radar detect required for BAND A or passive scan for BAND B/G;
|
||||
* FALSE:radar detect not required for BAND A or active scan for BAND B/G*/
|
||||
* FALSE:radar detect not required for BAND A or active scan for BAND
|
||||
* B/G*/
|
||||
t_bool passive_scan_or_radar_detect;
|
||||
/** Elements associated to cfp that change at run-time */
|
||||
cfp_dyn_t dynamic;
|
||||
|
@ -1146,7 +1152,8 @@ typedef MLAN_PACK_START struct {
|
|||
/** Medium time granted for the TSID */
|
||||
t_u16 medium_time;
|
||||
} MLAN_PACK_END wlan_ioctl_wmm_ts_status_t,
|
||||
/** Type definition of mlan_ds_wmm_ts_status for MLAN_OID_WMM_CFG_TS_STATUS */
|
||||
/** Type definition of mlan_ds_wmm_ts_status for
|
||||
MLAN_OID_WMM_CFG_TS_STATUS */
|
||||
mlan_ds_wmm_ts_status, *pmlan_ds_wmm_ts_status;
|
||||
|
||||
/** Max Ie length */
|
||||
|
@ -1233,7 +1240,8 @@ typedef struct {
|
|||
t_u32 nss : 2;
|
||||
/** 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz */
|
||||
t_u32 bw : 3;
|
||||
/** OFDM/CCK rate code would be as per ieee std in the units of 0.5mbps */
|
||||
/** OFDM/CCK rate code would be as per ieee std in the units of 0.5mbps
|
||||
*/
|
||||
/** HT/VHT it would be mcs index */
|
||||
t_u32 rateMcsIdx : 8;
|
||||
/** reserved */
|
||||
|
@ -1285,7 +1293,8 @@ typedef enum {
|
|||
|
||||
/** set for QOS association */
|
||||
#define WIFI_CAPABILITY_QOS 0x00000001
|
||||
/** set for protected association (802.11 beacon frame control protected bit set) */
|
||||
/** set for protected association (802.11 beacon frame control protected bit
|
||||
* set) */
|
||||
#define WIFI_CAPABILITY_PROTECTED 0x00000002
|
||||
/** set if 802.11 Extended Capabilities element interworking bit is set */
|
||||
#define WIFI_CAPABILITY_INTERWORKING 0x00000004
|
||||
|
@ -1326,7 +1335,8 @@ typedef struct {
|
|||
wifi_channel_info channel;
|
||||
/** msecs the radio is awake (32 bits number accruing over time) */
|
||||
t_u32 on_time;
|
||||
/** msecs the CCA register is busy (32 bits number accruing over time) */
|
||||
/** msecs the CCA register is busy (32 bits number accruing over time)
|
||||
*/
|
||||
t_u32 cca_busy_time;
|
||||
} wifi_channel_stat;
|
||||
|
||||
|
@ -1338,9 +1348,14 @@ typedef struct {
|
|||
t_u32 time_usec;
|
||||
} wifi_timeval;
|
||||
|
||||
#define timeval_to_msec(timeval) (t_u64)((t_u64)(timeval.time_sec)*1000 + (t_u64)(timeval.time_usec)/1000)
|
||||
#define timeval_to_usec(timeval) (t_u64)((t_u64)(timeval.time_sec)*1000*1000 + (t_u64)(timeval.time_usec))
|
||||
#define is_zero_timeval(timeval) ((timeval.time_sec == 0) && (timeval.time_usec == 0))
|
||||
#define timeval_to_msec(timeval) \
|
||||
(t_u64)((t_u64)(timeval.time_sec) * 1000 + \
|
||||
(t_u64)(timeval.time_usec) / 1000)
|
||||
#define timeval_to_usec(timeval) \
|
||||
(t_u64)((t_u64)(timeval.time_sec) * 1000 * 1000 + \
|
||||
(t_u64)(timeval.time_usec))
|
||||
#define is_zero_timeval(timeval) \
|
||||
((timeval.time_sec == 0) && (timeval.time_usec == 0))
|
||||
|
||||
/** radio statistics */
|
||||
typedef struct {
|
||||
|
@ -1348,25 +1363,34 @@ typedef struct {
|
|||
int radio;
|
||||
/** msecs the radio is awake (32 bits number accruing over time) */
|
||||
t_u32 on_time;
|
||||
/** msecs the radio is transmitting (32 bits number accruing over time) */
|
||||
/** msecs the radio is transmitting (32 bits number accruing over time)
|
||||
*/
|
||||
t_u32 tx_time;
|
||||
/** TBD: num_tx_levels: number of radio transmit power levels */
|
||||
t_u32 reserved0;
|
||||
/** TBD: tx_time_per_levels: pointer to an array of radio transmit per power levels in msecs accured over time */
|
||||
/** TBD: tx_time_per_levels: pointer to an array of radio transmit per
|
||||
* power levels in msecs accured over time */
|
||||
/* t_u32 *reserved1;*/
|
||||
/** msecs the radio is in active receive (32 bits number accruing over time) */
|
||||
/** msecs the radio is in active receive (32 bits number accruing over
|
||||
* time) */
|
||||
t_u32 rx_time;
|
||||
/** msecs the radio is awake due to all scan (32 bits number accruing over time) */
|
||||
/** msecs the radio is awake due to all scan (32 bits number accruing
|
||||
* over time) */
|
||||
t_u32 on_time_scan;
|
||||
/** msecs the radio is awake due to NAN (32 bits number accruing over time) */
|
||||
/** msecs the radio is awake due to NAN (32 bits number accruing over
|
||||
* time) */
|
||||
t_u32 on_time_nbd;
|
||||
/** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
|
||||
/** msecs the radio is awake due to G?scan (32 bits number accruing over
|
||||
* time) */
|
||||
t_u32 on_time_gscan;
|
||||
/** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
|
||||
/** msecs the radio is awake due to roam?scan (32 bits number accruing
|
||||
* over time) */
|
||||
t_u32 on_time_roam_scan;
|
||||
/** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
|
||||
/** msecs the radio is awake due to PNO scan (32 bits number accruing
|
||||
* over time) */
|
||||
t_u32 on_time_pno_scan;
|
||||
/** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
|
||||
/** msecs the radio is awake due to HS2.0 scans and GAS exchange (32
|
||||
* bits number accruing over time) */
|
||||
t_u32 on_time_hs20;
|
||||
/** number of channels */
|
||||
t_u32 num_channels;
|
||||
|
@ -1426,7 +1450,8 @@ typedef struct {
|
|||
/** number of received unicast mpdus */
|
||||
t_u32 rx_mpdu;
|
||||
/** number of succesfully transmitted multicast data packets */
|
||||
/** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
|
||||
/** STA case: implies ACK received from AP for the unicast packet in
|
||||
* which mcast pkt was sent */
|
||||
t_u32 tx_mcast;
|
||||
/** number of received multicast data packets */
|
||||
t_u32 rx_mcast;
|
||||
|
@ -1463,19 +1488,24 @@ typedef struct {
|
|||
/** Average beacon offset encountered (beacon_TSF - TBTT)
|
||||
* the average_tsf_offset field is used so as to calculate the
|
||||
* typical beacon contention time on the channel as well may be
|
||||
* used to debug beacon synchronization and related power consumption issue
|
||||
* used to debug beacon synchronization and related power consumption
|
||||
* issue
|
||||
*/
|
||||
t_u64 average_tsf_offset;
|
||||
/** indicate that this AP typically leaks packets beyond the driver guard time */
|
||||
/** indicate that this AP typically leaks packets beyond the driver
|
||||
* guard time */
|
||||
t_u32 leaky_ap_detected;
|
||||
/** average number of frame leaked by AP after frame with PM bit set was ACK'ed by AP */
|
||||
/** average number of frame leaked by AP after frame with PM bit set was
|
||||
* ACK'ed by AP */
|
||||
t_u32 leaky_ap_avg_num_frames_leaked;
|
||||
/** Guard time currently in force (when implementing IEEE power management based on
|
||||
* frame control PM bit), How long driver waits before shutting down the radio and
|
||||
* after receiving an ACK for a data frame with PM bit set)
|
||||
/** Guard time currently in force (when implementing IEEE power
|
||||
* management based on frame control PM bit), How long driver waits
|
||||
* before shutting down the radio and after receiving an ACK for a data
|
||||
* frame with PM bit set)
|
||||
*/
|
||||
t_u32 leaky_ap_guard_time;
|
||||
/** access point mgmt frames received count from connected AP (including Beacon) */
|
||||
/** access point mgmt frames received count from connected AP (including
|
||||
* Beacon) */
|
||||
t_u32 mgmt_rx;
|
||||
/** action frames received count */
|
||||
t_u32 mgmt_action_rx;
|
||||
|
@ -1505,13 +1535,20 @@ typedef struct {
|
|||
|
||||
/** wifi statistics bitmap */
|
||||
#define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
|
||||
#define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
|
||||
#define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
|
||||
#define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
|
||||
#define WIFI_STATS_RADIO_CCA \
|
||||
0x00000002 /** cca_busy_time (within radio statistics) */
|
||||
#define WIFI_STATS_RADIO_CHANNELS \
|
||||
0x00000004 /** all channel statistics (within radio statistics) */
|
||||
#define WIFI_STATS_RADIO_SCAN \
|
||||
0x00000008 /** all scan statistics (within radio statistics) */
|
||||
#define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
|
||||
#define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
|
||||
#define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
|
||||
#define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
|
||||
#define WIFI_STATS_IFACE_TXRATE \
|
||||
0x00000020 /** all tx rate statistics (within interface statistics) */
|
||||
#define WIFI_STATS_IFACE_AC \
|
||||
0x00000040 /** all ac statistics (within interface statistics) */
|
||||
#define WIFI_STATS_IFACE_CONTENTION \
|
||||
0x00000080 /** all contention (min, max, avg) statistics (within ac \
|
||||
statisctics) */
|
||||
|
||||
/** station stats */
|
||||
typedef struct _sta_stats {
|
||||
|
@ -1526,10 +1563,10 @@ typedef struct _sta_stats {
|
|||
typedef struct _mlan_callbacks {
|
||||
/** moal_get_fw_data */
|
||||
mlan_status (*moal_get_fw_data)(IN t_void *pmoal_handle,
|
||||
IN t_u32 offset,
|
||||
IN t_u32 len, OUT t_u8 *pbuf);
|
||||
mlan_status (*moal_get_vdll_data) (IN t_void *pmoal_handle,
|
||||
IN t_u32 len, OUT t_u8 *pbuf);
|
||||
IN t_u32 offset, IN t_u32 len,
|
||||
OUT t_u8 *pbuf);
|
||||
mlan_status (*moal_get_vdll_data)(IN t_void *pmoal_handle, IN t_u32 len,
|
||||
OUT t_u8 *pbuf);
|
||||
/** moal_get_hw_spec_complete */
|
||||
mlan_status (*moal_get_hw_spec_complete)(IN t_void *pmoal_handle,
|
||||
IN mlan_status status,
|
||||
|
@ -1547,8 +1584,7 @@ typedef struct _mlan_callbacks {
|
|||
IN mlan_status status);
|
||||
/** moal_recv_complete */
|
||||
mlan_status (*moal_recv_complete)(IN t_void *pmoal_handle,
|
||||
IN pmlan_buffer pmbuf,
|
||||
IN t_u32 port,
|
||||
IN pmlan_buffer pmbuf, IN t_u32 port,
|
||||
IN mlan_status status);
|
||||
/** moal_recv_packet */
|
||||
mlan_status (*moal_recv_packet)(IN t_void *pmoal_handle,
|
||||
|
@ -1577,11 +1613,11 @@ typedef struct _mlan_callbacks {
|
|||
#endif /* USB */
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
/** moal_write_reg */
|
||||
mlan_status (*moal_write_reg) (IN t_void *pmoal_handle,
|
||||
IN t_u32 reg, IN t_u32 data);
|
||||
mlan_status (*moal_write_reg)(IN t_void *pmoal_handle, IN t_u32 reg,
|
||||
IN t_u32 data);
|
||||
/** moal_read_reg */
|
||||
mlan_status (*moal_read_reg) (IN t_void *pmoal_handle,
|
||||
IN t_u32 reg, OUT t_u32 *data);
|
||||
mlan_status (*moal_read_reg)(IN t_void *pmoal_handle, IN t_u32 reg,
|
||||
OUT t_u32 *data);
|
||||
#endif /* SDIO || PCIE */
|
||||
/** moal_write_data_sync */
|
||||
mlan_status (*moal_write_data_sync)(IN t_void *pmoal_handle,
|
||||
|
@ -1592,56 +1628,48 @@ typedef struct _mlan_callbacks {
|
|||
IN OUT pmlan_buffer pmbuf,
|
||||
IN t_u32 port, IN t_u32 timeout);
|
||||
/** moal_malloc */
|
||||
mlan_status (*moal_malloc) (IN t_void *pmoal_handle,
|
||||
IN t_u32 size,
|
||||
mlan_status (*moal_malloc)(IN t_void *pmoal_handle, IN t_u32 size,
|
||||
IN t_u32 flag, OUT t_u8 **ppbuf);
|
||||
/** moal_mfree */
|
||||
mlan_status (*moal_mfree)(IN t_void *pmoal_handle, IN t_u8 *pbuf);
|
||||
/** moal_vmalloc */
|
||||
mlan_status (*moal_vmalloc) (IN t_void *pmoal_handle,
|
||||
IN t_u32 size, OUT t_u8 **ppbuf);
|
||||
mlan_status (*moal_vmalloc)(IN t_void *pmoal_handle, IN t_u32 size,
|
||||
OUT t_u8 **ppbuf);
|
||||
/** moal_vfree */
|
||||
mlan_status (*moal_vfree)(IN t_void *pmoal_handle, IN t_u8 *pbuf);
|
||||
#ifdef PCIE
|
||||
/** moal_malloc_consistent */
|
||||
mlan_status (*moal_malloc_consistent)(IN t_void *pmoal_handle,
|
||||
IN t_u32 size,
|
||||
OUT t_u8 **ppbuf,
|
||||
IN t_u32 size, OUT t_u8 **ppbuf,
|
||||
OUT t_u64 *pbuf_pa);
|
||||
/** moal_mfree_consistent */
|
||||
mlan_status (*moal_mfree_consistent)(IN t_void *pmoal_handle,
|
||||
IN t_u32 size,
|
||||
IN t_u8 *pbuf, IN t_u64 buf_pa);
|
||||
IN t_u32 size, IN t_u8 *pbuf,
|
||||
IN t_u64 buf_pa);
|
||||
/** moal_map_memory */
|
||||
mlan_status (*moal_map_memory) (IN t_void *pmoal_handle,
|
||||
IN t_u8 *pbuf,
|
||||
OUT t_u64 *pbuf_pa,
|
||||
IN t_u32 size, IN t_u32 flag);
|
||||
mlan_status (*moal_map_memory)(IN t_void *pmoal_handle, IN t_u8 *pbuf,
|
||||
OUT t_u64 *pbuf_pa, IN t_u32 size,
|
||||
IN t_u32 flag);
|
||||
/** moal_unmap_memory */
|
||||
mlan_status (*moal_unmap_memory) (IN t_void *pmoal_handle,
|
||||
IN t_u8 *pbuf,
|
||||
IN t_u64 buf_pa,
|
||||
IN t_u32 size, IN t_u32 flag);
|
||||
mlan_status (*moal_unmap_memory)(IN t_void *pmoal_handle, IN t_u8 *pbuf,
|
||||
IN t_u64 buf_pa, IN t_u32 size,
|
||||
IN t_u32 flag);
|
||||
#endif /* PCIE */
|
||||
/** moal_memset */
|
||||
t_void *(*moal_memset) (IN t_void *pmoal_handle,
|
||||
IN t_void *pmem, IN t_u8 byte, IN t_u32 num);
|
||||
t_void *(*moal_memset)(IN t_void *pmoal_handle, IN t_void *pmem,
|
||||
IN t_u8 byte, IN t_u32 num);
|
||||
/** moal_memcpy */
|
||||
t_void *(*moal_memcpy) (IN t_void *pmoal_handle,
|
||||
IN t_void *pdest,
|
||||
t_void *(*moal_memcpy)(IN t_void *pmoal_handle, IN t_void *pdest,
|
||||
IN const t_void *psrc, IN t_u32 num);
|
||||
/** moal_memcpy_ext */
|
||||
t_void *(*moal_memcpy_ext) (IN t_void *pmoal_handle,
|
||||
IN t_void *pdest,
|
||||
IN const t_void *psrc,
|
||||
IN t_u32 num, IN t_u32 dest_size);
|
||||
t_void *(*moal_memcpy_ext)(IN t_void *pmoal_handle, IN t_void *pdest,
|
||||
IN const t_void *psrc, IN t_u32 num,
|
||||
IN t_u32 dest_size);
|
||||
/** moal_memmove */
|
||||
t_void *(*moal_memmove) (IN t_void *pmoal_handle,
|
||||
IN t_void *pdest,
|
||||
t_void *(*moal_memmove)(IN t_void *pmoal_handle, IN t_void *pdest,
|
||||
IN const t_void *psrc, IN t_u32 num);
|
||||
/** moal_memcmp */
|
||||
t_s32 (*moal_memcmp) (IN t_void *pmoal_handle,
|
||||
IN const t_void *pmem1,
|
||||
t_s32 (*moal_memcmp)(IN t_void *pmoal_handle, IN const t_void *pmem1,
|
||||
IN const t_void *pmem2, IN t_u32 num);
|
||||
/** moal_udelay */
|
||||
t_void (*moal_udelay)(IN t_void *pmoal_handle, IN t_u32 udelay);
|
||||
|
@ -1654,16 +1682,15 @@ typedef struct _mlan_callbacks {
|
|||
/** moal_init_timer*/
|
||||
mlan_status (*moal_init_timer)(IN t_void *pmoal_handle,
|
||||
OUT t_void **pptimer,
|
||||
IN t_void (*callback) (t_void
|
||||
*pcontext),
|
||||
IN t_void (*callback)(t_void *pcontext),
|
||||
IN t_void *pcontext);
|
||||
/** moal_free_timer */
|
||||
mlan_status (*moal_free_timer)(IN t_void *pmoal_handle,
|
||||
IN t_void *ptimer);
|
||||
/** moal_start_timer*/
|
||||
mlan_status (*moal_start_timer)(IN t_void *pmoal_handle,
|
||||
IN t_void *ptimer,
|
||||
IN t_u8 periodic, IN t_u32 msec);
|
||||
IN t_void *ptimer, IN t_u8 periodic,
|
||||
IN t_u32 msec);
|
||||
/** moal_stop_timer*/
|
||||
mlan_status (*moal_stop_timer)(IN t_void *pmoal_handle,
|
||||
IN t_void *ptimer);
|
||||
|
@ -1680,9 +1707,8 @@ typedef struct _mlan_callbacks {
|
|||
mlan_status (*moal_spin_unlock)(IN t_void *pmoal_handle,
|
||||
IN t_void *plock);
|
||||
/** moal_print */
|
||||
t_void (*moal_print) (IN t_void *pmoal_handle,
|
||||
IN t_u32 level, IN char *pformat, IN ...
|
||||
);
|
||||
t_void (*moal_print)(IN t_void *pmoal_handle, IN t_u32 level,
|
||||
IN char *pformat, IN...);
|
||||
/** moal_print_netintf */
|
||||
t_void (*moal_print_netintf)(IN t_void *pmoal_handle,
|
||||
IN t_u32 bss_index, IN t_u32 level);
|
||||
|
@ -1691,10 +1717,9 @@ typedef struct _mlan_callbacks {
|
|||
|
||||
/** moal_hist_data_add */
|
||||
t_void (*moal_hist_data_add)(IN t_void *pmoal_handle,
|
||||
IN t_u32 bss_index,
|
||||
IN t_u16 rx_rate,
|
||||
IN t_s8 snr,
|
||||
IN t_s8 nflr, IN t_u8 antenna);
|
||||
IN t_u32 bss_index, IN t_u16 rx_rate,
|
||||
IN t_s8 snr, IN t_s8 nflr,
|
||||
IN t_u8 antenna);
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
mlan_status (*moal_wait_hostcmd_complete)(IN t_void *pmoal_handle,
|
||||
IN t_u32 bss_index);
|
||||
|
@ -1713,7 +1738,8 @@ typedef struct _mlan_callbacks {
|
|||
#define INT_MODE_SDIO 0
|
||||
/** Interrupt Mode GPIO */
|
||||
#define INT_MODE_GPIO 1
|
||||
/** New mode: GPIO-1 as a duplicated signal of interrupt as appear of SDIO_DAT1 */
|
||||
/** New mode: GPIO-1 as a duplicated signal of interrupt as appear of SDIO_DAT1
|
||||
*/
|
||||
#define GPIO_INT_NEW_MODE 255
|
||||
#endif
|
||||
|
||||
|
@ -1837,6 +1863,8 @@ typedef struct _mlan_device {
|
|||
t_u8 uap_max_sta;
|
||||
/** drv mode */
|
||||
t_u32 drv_mode;
|
||||
/** dfs w53 cfg */
|
||||
t_u8 dfs53cfg;
|
||||
} mlan_device, *pmlan_device;
|
||||
|
||||
/** MLAN API function prototype */
|
||||
|
@ -1847,8 +1875,7 @@ MLAN_API mlan_status mlan_register(IN pmlan_device pmdevice,
|
|||
OUT t_void **ppmlan_adapter);
|
||||
|
||||
/** Un-registration */
|
||||
MLAN_API mlan_status mlan_unregister(IN t_void *pmlan_adapter
|
||||
);
|
||||
MLAN_API mlan_status mlan_unregister(IN t_void *pmlan_adapter);
|
||||
|
||||
/** Firmware Downloading */
|
||||
MLAN_API mlan_status mlan_dnld_fw(IN t_void *pmlan_adapter,
|
||||
|
@ -1859,16 +1886,13 @@ MLAN_API mlan_status mlan_set_init_param(IN t_void *pmlan_adapter,
|
|||
IN pmlan_init_param pparam);
|
||||
|
||||
/** Firmware Initialization */
|
||||
MLAN_API mlan_status mlan_init_fw(IN t_void *pmlan_adapter
|
||||
);
|
||||
MLAN_API mlan_status mlan_init_fw(IN t_void *pmlan_adapter);
|
||||
|
||||
/** Firmware Shutdown */
|
||||
MLAN_API mlan_status mlan_shutdown_fw(IN t_void *pmlan_adapter
|
||||
);
|
||||
MLAN_API mlan_status mlan_shutdown_fw(IN t_void *pmlan_adapter);
|
||||
|
||||
/** Main Process */
|
||||
MLAN_API mlan_status mlan_main_process(IN t_void *pmlan_adapter
|
||||
);
|
||||
MLAN_API mlan_status mlan_main_process(IN t_void *pmlan_adapter);
|
||||
|
||||
/** Rx process */
|
||||
mlan_status mlan_rx_process(IN t_void *pmlan_adapter, IN t_u8 *rx_pkts);
|
||||
|
@ -1885,8 +1909,8 @@ MLAN_API mlan_status mlan_write_data_async_complete(IN t_void *pmlan_adapter,
|
|||
IN mlan_status status);
|
||||
|
||||
/** Packet Reception */
|
||||
MLAN_API mlan_status mlan_recv(IN t_void *pmlan_adapter,
|
||||
IN pmlan_buffer pmbuf, IN t_u32 port);
|
||||
MLAN_API mlan_status mlan_recv(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf,
|
||||
IN t_u32 port);
|
||||
#endif /* USB */
|
||||
|
||||
/** Packet Reception complete callback */
|
||||
|
@ -1916,7 +1940,7 @@ MLAN_API t_void mlan_set_int_mode(IN t_void *adapter, IN t_u32 int_mode,
|
|||
MLAN_API mlan_status mlan_ioctl(IN t_void *pmlan_adapter,
|
||||
IN pmlan_ioctl_req pioctl_req);
|
||||
/** mlan select wmm queue */
|
||||
MLAN_API t_u8 mlan_select_wmm_queue(IN t_void *pmlan_adapter,
|
||||
IN t_u8 bss_num, IN t_u8 tid);
|
||||
MLAN_API t_u8 mlan_select_wmm_queue(IN t_void *pmlan_adapter, IN t_u8 bss_num,
|
||||
IN t_u8 tid);
|
||||
|
||||
#endif /* !_MLAN_DECL_H_ */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -320,8 +320,7 @@ typedef MLAN_PACK_START struct _TLV_Generic_t {
|
|||
} MLAN_PACK_END TLV_Generic_t, *pTLV_Generic_t;
|
||||
|
||||
/** Capability information mask */
|
||||
#define CAPINFO_MASK \
|
||||
(~(MBIT(15) | MBIT(14) | MBIT(11) | MBIT(9)))
|
||||
#define CAPINFO_MASK (~(MBIT(15) | MBIT(14) | MBIT(11) | MBIT(9)))
|
||||
|
||||
/** Capability Bit Map*/
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
|
@ -654,7 +653,6 @@ typedef MLAN_PACK_START struct _IEEEtypes_WmmAcParameters_t {
|
|||
|
||||
/** Data structure of WMM Info IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_WmmInfo_t {
|
||||
|
||||
/**
|
||||
* WMM Info IE - Vendor Specific Header:
|
||||
* element_id [221/0xdd]
|
||||
|
@ -736,7 +734,9 @@ typedef MLAN_PACK_START struct {
|
|||
t_u8 Schedule : 1;
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
||||
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior:1; /* ! Legacy/Trigg */
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /* !
|
||||
Legacy/Trigg
|
||||
*/
|
||||
t_u8 Aggregation : 1; /* ! Reserved */
|
||||
t_u8 AccessPolicy2 : 1; /* ! */
|
||||
t_u8 AccessPolicy1 : 1; /* ! */
|
||||
|
@ -750,7 +750,9 @@ typedef MLAN_PACK_START struct {
|
|||
t_u8 AccessPolicy1 : 1; /* ! */
|
||||
t_u8 AccessPolicy2 : 1; /* ! */
|
||||
t_u8 Aggregation : 1; /* ! Reserved */
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior:1; /* ! Legacy/Trigg */
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /* !
|
||||
Legacy/Trigg
|
||||
*/
|
||||
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
||||
t_u8 Schedule : 1;
|
||||
|
@ -761,11 +763,13 @@ typedef MLAN_PACK_START struct {
|
|||
/** Data structure of WMM TSPEC Nominal Size */
|
||||
typedef MLAN_PACK_START struct {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
t_u16 Fixed:1; /* ! 1: Fixed size given in Size, 0: Var, size is nominal */
|
||||
t_u16 Fixed : 1; /* ! 1: Fixed size given in Size, 0: Var, size is
|
||||
nominal */
|
||||
t_u16 Size : 15; /* ! Nominal size in octets */
|
||||
#else
|
||||
t_u16 Size : 15; /* ! Nominal size in octets */
|
||||
t_u16 Fixed:1; /* ! 1: Fixed size given in Size, 0: Var, size is nominal */
|
||||
t_u16 Fixed : 1; /* ! 1: Fixed size given in Size, 0: Var, size is
|
||||
nominal */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_NomMSDUSize_t;
|
||||
|
||||
|
@ -782,7 +786,6 @@ typedef MLAN_PACK_START struct {
|
|||
|
||||
/** Data structure of WMM TSPEC Body */
|
||||
typedef MLAN_PACK_START struct {
|
||||
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_t TSInfo;
|
||||
IEEEtypes_WMM_TSPEC_NomMSDUSize_t NomMSDUSize;
|
||||
t_u16 MaximumMSDUSize;
|
||||
|
@ -829,6 +832,7 @@ typedef MLAN_PACK_START enum _IEEEtypes_ActionCategory_e {
|
|||
IEEE_MGMT_ACTION_CATEGORY_UNPROTECT_WNM = 11,
|
||||
|
||||
IEEE_MGMT_ACTION_CATEGORY_WMM_TSPEC = 17
|
||||
|
||||
} MLAN_PACK_END IEEEtypes_ActionCategory_e;
|
||||
|
||||
/** WMM TSPEC operations */
|
||||
|
@ -842,7 +846,6 @@ typedef MLAN_PACK_START enum _IEEEtypes_WMM_Tspec_Action_e {
|
|||
|
||||
/** WMM TSPEC Category Action Base */
|
||||
typedef MLAN_PACK_START struct {
|
||||
|
||||
IEEEtypes_ActionCategory_e category;
|
||||
IEEEtypes_WMM_Tspec_Action_e action;
|
||||
t_u8 dialogToken;
|
||||
|
@ -851,7 +854,6 @@ typedef MLAN_PACK_START struct {
|
|||
|
||||
/** WMM TSPEC AddTS request structure */
|
||||
typedef MLAN_PACK_START struct {
|
||||
|
||||
IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct;
|
||||
t_u8 statusCode;
|
||||
IEEEtypes_WMM_TSPEC_t tspecIE;
|
||||
|
@ -1229,8 +1231,7 @@ typedef MLAN_PACK_START struct _IEEEtypes_HECap_t {
|
|||
typedef MLAN_PACK_START struct {
|
||||
t_u8 element_id; /**< IEEE Element ID = 32 */
|
||||
t_u8 len; /**< Element length after id and len */
|
||||
t_u8 local_constraint;
|
||||
/**< Local power constraint applied to 11d
|
||||
t_u8 local_constraint; /**< Local power constraint applied to 11d
|
||||
chan info */
|
||||
} MLAN_PACK_END IEEEtypes_PowerConstraint_t;
|
||||
|
||||
|
@ -1238,19 +1239,17 @@ typedef MLAN_PACK_START struct {
|
|||
typedef MLAN_PACK_START struct {
|
||||
t_u8 element_id; /**< IEEE Element ID = 33 */
|
||||
t_u8 len; /**< Element length after id and len */
|
||||
t_s8 min_tx_power_capability;
|
||||
/**< Minimum Transmit power (dBm) */
|
||||
t_s8 max_tx_power_capability;
|
||||
/**< Maximum Transmit power (dBm) */
|
||||
t_s8 min_tx_power_capability; /**< Minimum Transmit power (dBm) */
|
||||
t_s8 max_tx_power_capability; /**< Maximum Transmit power (dBm) */
|
||||
} MLAN_PACK_END IEEEtypes_PowerCapability_t;
|
||||
|
||||
/** IEEE TPC Report element (7.3.2.18) */
|
||||
typedef MLAN_PACK_START struct {
|
||||
t_u8 element_id; /**< IEEE Element ID = 35 */
|
||||
t_u8 len; /**< Element length after id and len */
|
||||
t_s8 tx_power; /**< Max power used to transmit the TPC Report frame (dBm) */
|
||||
t_s8 link_margin;
|
||||
/**< Link margin when TPC Request received (dB) */
|
||||
t_s8 tx_power; /**< Max power used to transmit the TPC Report frame
|
||||
(dBm) */
|
||||
t_s8 link_margin; /**< Link margin when TPC Request received (dB) */
|
||||
} MLAN_PACK_END IEEEtypes_TPCReport_t;
|
||||
|
||||
/* IEEE Supported Channel sub-band description (7.3.2.19) */
|
||||
|
@ -1350,11 +1349,13 @@ typedef MLAN_PACK_START struct {
|
|||
typedef MLAN_PACK_START struct {
|
||||
t_u8 element_id; /**< IEEE Element ID = 40 */
|
||||
t_u8 len; /**< Element length after id and len */
|
||||
t_u8 quiet_count; /**< Number of TBTTs until beacon with the quiet period */
|
||||
t_u8 quiet_period; /**< Regular quiet period, # of TBTTS between periods */
|
||||
t_u16 quiet_duration;
|
||||
/**< Duration of the quiet period in TUs */
|
||||
t_u16 quiet_offset; /**< Offset in TUs from the TBTT for the quiet period */
|
||||
t_u8 quiet_count; /**< Number of TBTTs until beacon with the quiet
|
||||
period */
|
||||
t_u8 quiet_period; /**< Regular quiet period, # of TBTTS between periods
|
||||
*/
|
||||
t_u16 quiet_duration; /**< Duration of the quiet period in TUs */
|
||||
t_u16 quiet_offset; /**< Offset in TUs from the TBTT for the quiet
|
||||
period */
|
||||
|
||||
} MLAN_PACK_END IEEEtypes_Quiet_t;
|
||||
|
||||
|
@ -1400,8 +1401,8 @@ typedef MLAN_PACK_START struct {
|
|||
*/
|
||||
typedef MLAN_PACK_START struct {
|
||||
t_u8 channel_number; /**< Channel number */
|
||||
MeasRptBasicMap_t rpt_map;
|
||||
/**< Basic measurement report for the channel */
|
||||
MeasRptBasicMap_t rpt_map; /**< Basic measurement report for the channel
|
||||
*/
|
||||
|
||||
} MLAN_PACK_END IEEEtypes_ChannelMap_t;
|
||||
|
||||
|
@ -1414,11 +1415,11 @@ typedef MLAN_PACK_START struct {
|
|||
typedef MLAN_PACK_START struct {
|
||||
t_u8 element_id; /**< IEEE Element ID = 41 */
|
||||
t_u8 len; /**< Element length after id and len */
|
||||
t_u8 dfs_owner[MLAN_MAC_ADDR_LENGTH];
|
||||
/**< DFS Owner STA Address */
|
||||
t_u8 dfs_owner[MLAN_MAC_ADDR_LENGTH]; /**< DFS Owner STA Address */
|
||||
t_u8 dfs_recovery_interval; /**< DFS Recovery time in TBTTs */
|
||||
|
||||
/** Variable length map field, one Map entry for each supported channel */
|
||||
/** Variable length map field, one Map entry for each supported channel
|
||||
*/
|
||||
IEEEtypes_ChannelMap_t channel_map[WLAN_11H_MAX_IBSS_DFS_CHANNELS];
|
||||
|
||||
} MLAN_PACK_END IEEEtypes_IBSS_DFS_t;
|
||||
|
@ -1429,15 +1430,15 @@ typedef MLAN_PACK_START struct {
|
|||
* join commands
|
||||
*/
|
||||
typedef struct {
|
||||
t_u8 sensed_11h;
|
||||
/**< Capability bit set or 11h IE found in this BSS */
|
||||
t_u8 sensed_11h; /**< Capability bit set or 11h IE found in this BSS */
|
||||
|
||||
IEEEtypes_PowerConstraint_t power_constraint;
|
||||
/**< Power Constraint IE */
|
||||
IEEEtypes_PowerCapability_t power_capability;
|
||||
/**< Power Capability IE */
|
||||
IEEEtypes_PowerConstraint_t power_constraint; /**< Power Constraint IE
|
||||
*/
|
||||
IEEEtypes_PowerCapability_t power_capability; /**< Power Capability IE
|
||||
*/
|
||||
IEEEtypes_TPCReport_t tpc_report; /**< TPC Report IE */
|
||||
IEEEtypes_ChanSwitchAnn_t chan_switch_ann;/**< Channel Switch Announcement IE */
|
||||
IEEEtypes_ChanSwitchAnn_t chan_switch_ann; /**< Channel Switch
|
||||
Announcement IE */
|
||||
IEEEtypes_Quiet_t quiet; /**< Quiet IE */
|
||||
IEEEtypes_IBSS_DFS_t ibss_dfs; /**< IBSS DFS Element IE */
|
||||
|
||||
|
@ -1557,7 +1558,8 @@ typedef MLAN_PACK_START struct {
|
|||
*/
|
||||
t_u8 ssid_filter;
|
||||
/**
|
||||
* @brief BSSID filter sent in the firmware command to limit the results
|
||||
* @brief BSSID filter sent in the firmware command to limit the
|
||||
* results
|
||||
*/
|
||||
t_u8 specific_bssid[MLAN_MAC_ADDR_LENGTH];
|
||||
/**
|
||||
|
|
|
@ -65,8 +65,7 @@ extern mlan_operations *mlan_ops[];
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_add_bsspriotbl(pmlan_private priv)
|
||||
static mlan_status wlan_add_bsspriotbl(pmlan_private priv)
|
||||
{
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
mlan_bssprio_node *pbssprio = MNULL;
|
||||
|
@ -89,12 +88,13 @@ wlan_add_bsspriotbl(pmlan_private priv)
|
|||
util_init_list((pmlan_linked_list)pbssprio);
|
||||
|
||||
if (!pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur)
|
||||
pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur
|
||||
= pbssprio;
|
||||
pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur =
|
||||
pbssprio;
|
||||
|
||||
util_enqueue_list_tail(pmadapter->pmoal_handle,
|
||||
&pmadapter->bssprio_tbl[priv->bss_priority].
|
||||
bssprio_head, (pmlan_linked_list)pbssprio,
|
||||
util_enqueue_list_tail(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->bssprio_tbl[priv->bss_priority].bssprio_head,
|
||||
(pmlan_linked_list)pbssprio,
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks.moal_spin_unlock);
|
||||
|
||||
|
@ -109,13 +109,12 @@ wlan_add_bsspriotbl(pmlan_private priv)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static t_void
|
||||
wlan_delete_bsspriotbl(pmlan_private priv)
|
||||
static t_void wlan_delete_bsspriotbl(pmlan_private priv)
|
||||
{
|
||||
int i;
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
mlan_bssprio_node *pbssprio_node = MNULL, *ptmp_node = MNULL, **ppcur =
|
||||
MNULL;
|
||||
mlan_bssprio_node *pbssprio_node = MNULL, *ptmp_node = MNULL,
|
||||
**ppcur = MNULL;
|
||||
pmlan_list_head phead;
|
||||
|
||||
ENTER();
|
||||
|
@ -127,16 +126,10 @@ wlan_delete_bsspriotbl(pmlan_private priv)
|
|||
"Delete BSS priority table, index = %d, i = %d, phead = %p, pcur = %p\n",
|
||||
priv->bss_index, i, phead, *ppcur);
|
||||
if (*ppcur) {
|
||||
pbssprio_node =
|
||||
(mlan_bssprio_node *)util_peek_list(pmadapter->
|
||||
pmoal_handle,
|
||||
phead,
|
||||
pmadapter->
|
||||
callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->
|
||||
callbacks.
|
||||
moal_spin_unlock);
|
||||
pbssprio_node = (mlan_bssprio_node *)util_peek_list(
|
||||
pmadapter->pmoal_handle, phead,
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks.moal_spin_unlock);
|
||||
while (pbssprio_node &&
|
||||
((pmlan_list_head)pbssprio_node != phead)) {
|
||||
ptmp_node = pbssprio_node->pnext;
|
||||
|
@ -144,19 +137,16 @@ wlan_delete_bsspriotbl(pmlan_private priv)
|
|||
PRINTM(MINFO,
|
||||
"Delete node, pnode = %p, pnext = %p\n",
|
||||
pbssprio_node, ptmp_node);
|
||||
util_unlink_list(pmadapter->
|
||||
pmoal_handle, phead,
|
||||
(pmlan_linked_list)
|
||||
pbssprio_node,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock);
|
||||
pmadapter->callbacks.
|
||||
moal_mfree(pmadapter->
|
||||
pmoal_handle,
|
||||
(t_u8 *)
|
||||
pbssprio_node);
|
||||
util_unlink_list(
|
||||
pmadapter->pmoal_handle, phead,
|
||||
(pmlan_linked_list)pbssprio_node,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_lock,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_unlock);
|
||||
pmadapter->callbacks.moal_mfree(
|
||||
pmadapter->pmoal_handle,
|
||||
(t_u8 *)pbssprio_node);
|
||||
}
|
||||
pbssprio_node = ptmp_node;
|
||||
}
|
||||
|
@ -175,8 +165,7 @@ wlan_delete_bsspriotbl(pmlan_private priv)
|
|||
* @return MLAN_STATUS_SUCCESS
|
||||
*
|
||||
*/
|
||||
static mlan_status
|
||||
vdll_init(pmlan_adapter pmadapter)
|
||||
static mlan_status vdll_init(pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
vdll_dnld_ctrl *ctrl = &pmadapter->vdll_ctrl;
|
||||
|
@ -199,7 +188,6 @@ vdll_init(pmlan_adapter pmadapter)
|
|||
LEAVE();
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The function handles VDLL deinit
|
||||
*
|
||||
|
@ -208,8 +196,7 @@ vdll_init(pmlan_adapter pmadapter)
|
|||
* @return MLAN_STATUS_SUCCESS
|
||||
*
|
||||
*/
|
||||
static t_void
|
||||
vdll_deinit(pmlan_adapter pmadapter)
|
||||
static t_void vdll_deinit(pmlan_adapter pmadapter)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
ENTER();
|
||||
|
@ -245,8 +232,7 @@ vdll_deinit(pmlan_adapter pmadapter)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_allocate_adapter(pmlan_adapter pmadapter)
|
||||
mlan_status wlan_allocate_adapter(pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#ifdef STA_SUPPORT
|
||||
|
@ -254,12 +240,9 @@ wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
t_u32 buf_size;
|
||||
BSSDescriptor_t *ptemp_scan_table = MNULL;
|
||||
t_u8 chan_2g[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
|
||||
t_u8 chan_5g[] = {
|
||||
12, 16, 34, 38, 42, 46, 36, 40, 44,
|
||||
48, 52, 56, 60, 64, 100, 104, 108,
|
||||
112, 116, 120, 124, 128, 132, 136,
|
||||
140, 144, 149, 153, 157, 161, 165
|
||||
};
|
||||
t_u8 chan_5g[] = {12, 16, 34, 38, 42, 46, 36, 40, 44, 48, 52,
|
||||
56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128,
|
||||
132, 136, 140, 144, 149, 153, 157, 161, 165};
|
||||
#endif
|
||||
#ifdef SDIO
|
||||
t_u32 max_mp_regs = 0;
|
||||
|
@ -282,15 +265,13 @@ wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
buf_size = sizeof(BSSDescriptor_t) * MRVDRV_MAX_BSSID_LIST;
|
||||
if (pmadapter->callbacks.moal_vmalloc &&
|
||||
pmadapter->callbacks.moal_vfree)
|
||||
ret = pmadapter->callbacks.moal_vmalloc(pmadapter->pmoal_handle,
|
||||
buf_size,
|
||||
(t_u8 **)
|
||||
&ptemp_scan_table);
|
||||
ret = pmadapter->callbacks.moal_vmalloc(
|
||||
pmadapter->pmoal_handle, buf_size,
|
||||
(t_u8 **)&ptemp_scan_table);
|
||||
else
|
||||
ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle,
|
||||
buf_size, MLAN_MEM_DEF,
|
||||
(t_u8 **)
|
||||
&ptemp_scan_table);
|
||||
ret = pmadapter->callbacks.moal_malloc(
|
||||
pmadapter->pmoal_handle, buf_size, MLAN_MEM_DEF,
|
||||
(t_u8 **)&ptemp_scan_table);
|
||||
if (ret != MLAN_STATUS_SUCCESS || !ptemp_scan_table) {
|
||||
PRINTM(MERROR, "Failed to allocate scan table\n");
|
||||
LEAVE();
|
||||
|
@ -317,15 +298,13 @@ wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
buf_size = sizeof(ChanStatistics_t) * pmadapter->num_in_chan_stats;
|
||||
if (pmadapter->callbacks.moal_vmalloc &&
|
||||
pmadapter->callbacks.moal_vfree)
|
||||
ret = pmadapter->callbacks.moal_vmalloc(pmadapter->pmoal_handle,
|
||||
buf_size,
|
||||
(t_u8 **)&pmadapter->
|
||||
pchan_stats);
|
||||
ret = pmadapter->callbacks.moal_vmalloc(
|
||||
pmadapter->pmoal_handle, buf_size,
|
||||
(t_u8 **)&pmadapter->pchan_stats);
|
||||
else
|
||||
ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle,
|
||||
buf_size, MLAN_MEM_DEF,
|
||||
(t_u8 **)&pmadapter->
|
||||
pchan_stats);
|
||||
ret = pmadapter->callbacks.moal_malloc(
|
||||
pmadapter->pmoal_handle, buf_size, MLAN_MEM_DEF,
|
||||
(t_u8 **)&pmadapter->pchan_stats);
|
||||
if (ret != MLAN_STATUS_SUCCESS || !pmadapter->pchan_stats) {
|
||||
PRINTM(MERROR, "Failed to allocate channel statistics\n");
|
||||
LEAVE();
|
||||
|
@ -340,31 +319,26 @@ wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef SDIO
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle,
|
||||
max_mp_regs +
|
||||
DMA_ALIGNMENT,
|
||||
MLAN_MEM_DEF |
|
||||
MLAN_MEM_DMA,
|
||||
(t_u8 **)&pmadapter->
|
||||
pcard_sd->mp_regs_buf);
|
||||
ret = pmadapter->callbacks.moal_malloc(
|
||||
pmadapter->pmoal_handle, max_mp_regs + DMA_ALIGNMENT,
|
||||
MLAN_MEM_DEF | MLAN_MEM_DMA,
|
||||
(t_u8 **)&pmadapter->pcard_sd->mp_regs_buf);
|
||||
if (ret != MLAN_STATUS_SUCCESS ||
|
||||
!pmadapter->pcard_sd->mp_regs_buf) {
|
||||
PRINTM(MERROR, "Failed to allocate mp_regs_buf\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
pmadapter->pcard_sd->mp_regs =
|
||||
(t_u8 *)ALIGN_ADDR(pmadapter->pcard_sd->mp_regs_buf,
|
||||
DMA_ALIGNMENT);
|
||||
pmadapter->pcard_sd->mp_regs = (t_u8 *)ALIGN_ADDR(
|
||||
pmadapter->pcard_sd->mp_regs_buf, DMA_ALIGNMENT);
|
||||
|
||||
ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle,
|
||||
MAX_SUPPORT_AMSDU_SIZE,
|
||||
MLAN_MEM_DEF |
|
||||
MLAN_MEM_DMA,
|
||||
(t_u8 **)&pmadapter->
|
||||
pcard_sd->rx_buffer);
|
||||
ret = pmadapter->callbacks.moal_malloc(
|
||||
pmadapter->pmoal_handle, MAX_SUPPORT_AMSDU_SIZE,
|
||||
MLAN_MEM_DEF | MLAN_MEM_DMA,
|
||||
(t_u8 **)&pmadapter->pcard_sd->rx_buffer);
|
||||
|
||||
if (ret != MLAN_STATUS_SUCCESS ||
|
||||
!pmadapter->pcard_sd->rx_buffer) {
|
||||
|
@ -372,15 +346,13 @@ wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
pmadapter->pcard_sd->rx_buf =
|
||||
(t_u8 *)ALIGN_ADDR(pmadapter->pcard_sd->rx_buffer,
|
||||
DMA_ALIGNMENT);
|
||||
pmadapter->pcard_sd->rx_buf = (t_u8 *)ALIGN_ADDR(
|
||||
pmadapter->pcard_sd->rx_buffer, DMA_ALIGNMENT);
|
||||
|
||||
pmadapter->pcard_sd->max_sp_tx_size = MAX_SUPPORT_AMSDU_SIZE;
|
||||
pmadapter->pcard_sd->max_sp_rx_size = MAX_SUPPORT_AMSDU_SIZE;
|
||||
ret = wlan_alloc_sdio_mpa_buffers(pmadapter,
|
||||
mp_tx_aggr_buf_size,
|
||||
mp_rx_aggr_buf_size);
|
||||
ret = wlan_alloc_sdio_mpa_buffers(
|
||||
pmadapter, mp_tx_aggr_buf_size, mp_rx_aggr_buf_size);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
"Failed to allocate sdio mp-a buffers\n");
|
||||
|
@ -394,19 +366,16 @@ wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
MLAN_SDIO_BLOCK_SIZE;
|
||||
if (pmadapter->callbacks.moal_vmalloc &&
|
||||
pmadapter->callbacks.moal_vfree)
|
||||
ret = pmadapter->callbacks.
|
||||
moal_vmalloc(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_sd->
|
||||
mpa_buf_size,
|
||||
(t_u8 **)&pmadapter->
|
||||
pcard_sd->mpa_buf);
|
||||
ret = pmadapter->callbacks.moal_vmalloc(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_sd->mpa_buf_size,
|
||||
(t_u8 **)&pmadapter->pcard_sd->mpa_buf);
|
||||
else
|
||||
ret = pmadapter->callbacks.
|
||||
moal_malloc(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_sd->
|
||||
mpa_buf_size, MLAN_MEM_DEF,
|
||||
(t_u8 **)&pmadapter->
|
||||
pcard_sd->mpa_buf);
|
||||
ret = pmadapter->callbacks.moal_malloc(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_sd->mpa_buf_size,
|
||||
MLAN_MEM_DEF,
|
||||
(t_u8 **)&pmadapter->pcard_sd->mpa_buf);
|
||||
if (ret != MLAN_STATUS_SUCCESS ||
|
||||
!pmadapter->pcard_sd->mpa_buf) {
|
||||
PRINTM(MERROR, "Failed to allocate mpa buf\n");
|
||||
|
@ -449,8 +418,7 @@ wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_init_priv(pmlan_private priv)
|
||||
mlan_status wlan_init_priv(pmlan_private priv)
|
||||
{
|
||||
t_u32 i;
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
|
@ -479,8 +447,7 @@ wlan_init_priv(pmlan_private priv)
|
|||
memset(pmadapter, &priv->wep_key[i], 0, sizeof(mrvl_wep_key_t));
|
||||
priv->wep_key_curr_index = 0;
|
||||
priv->ewpa_query = MFALSE;
|
||||
priv->curr_pkt_filter =
|
||||
HostCmd_ACT_MAC_STATIC_DYNAMIC_BW_ENABLE |
|
||||
priv->curr_pkt_filter = HostCmd_ACT_MAC_STATIC_DYNAMIC_BW_ENABLE |
|
||||
HostCmd_ACT_MAC_RTS_CTS_ENABLE |
|
||||
HostCmd_ACT_MAC_RX_ON | HostCmd_ACT_MAC_TX_ON |
|
||||
HostCmd_ACT_MAC_ETHERNETII_ENABLE;
|
||||
|
@ -604,8 +571,7 @@ wlan_init_priv(pmlan_private priv)
|
|||
if (IS_USB(pmadapter->card_type)) {
|
||||
pusb_tx_aggr =
|
||||
wlan_get_usb_tx_aggr_params(pmadapter, priv->port);
|
||||
if (pusb_tx_aggr &&
|
||||
pusb_tx_aggr->aggr_ctrl.aggr_mode ==
|
||||
if (pusb_tx_aggr && pusb_tx_aggr->aggr_ctrl.aggr_mode ==
|
||||
MLAN_USB_AGGR_MODE_LEN_V2) {
|
||||
priv->intf_hr_len = MLAN_USB_TX_AGGR_HEADER;
|
||||
}
|
||||
|
@ -629,8 +595,7 @@ wlan_init_priv(pmlan_private priv)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
wlan_init_adapter(pmlan_adapter pmadapter)
|
||||
t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
||||
{
|
||||
opt_sleep_confirm_buffer *sleep_cfm_buf = MNULL;
|
||||
#ifdef USB
|
||||
|
@ -639,11 +604,9 @@ wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
ENTER();
|
||||
|
||||
if (pmadapter->psleep_cfm) {
|
||||
sleep_cfm_buf =
|
||||
(opt_sleep_confirm_buffer *)(pmadapter->psleep_cfm->
|
||||
pbuf +
|
||||
pmadapter->psleep_cfm->
|
||||
data_offset);
|
||||
sleep_cfm_buf = (opt_sleep_confirm_buffer
|
||||
*)(pmadapter->psleep_cfm->pbuf +
|
||||
pmadapter->psleep_cfm->data_offset);
|
||||
}
|
||||
#ifdef MFG_CMD_SUPPORT
|
||||
if (pmadapter->init_para.mfg_mode == MLAN_INIT_PARA_DISABLED)
|
||||
|
@ -754,7 +717,8 @@ wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
if (!pmadapter->multiple_dtim)
|
||||
pmadapter->multiple_dtim = MRVDRV_DEFAULT_MULTIPLE_DTIM;
|
||||
|
||||
pmadapter->local_listen_interval = 0; /* default value in firmware will be used */
|
||||
pmadapter->local_listen_interval = 0; /* default value in firmware will
|
||||
be used */
|
||||
#endif /* STA_SUPPORT */
|
||||
|
||||
pmadapter->is_deep_sleep = MFALSE;
|
||||
|
@ -770,8 +734,10 @@ wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
pmadapter->delay_to_ps = DELAY_TO_PS_DEFAULT;
|
||||
pmadapter->enhanced_ps_mode = PS_MODE_AUTO;
|
||||
|
||||
pmadapter->gen_null_pkt = MFALSE; /* Disable NULL Pkt generation-default */
|
||||
pmadapter->pps_uapsd_mode = MFALSE; /* Disable pps/uapsd mode -default */
|
||||
pmadapter->gen_null_pkt = MFALSE; /* Disable NULL Pkt generation-default
|
||||
*/
|
||||
pmadapter->pps_uapsd_mode = MFALSE; /* Disable pps/uapsd mode -default
|
||||
*/
|
||||
|
||||
pmadapter->pm_wakeup_card_req = MFALSE;
|
||||
|
||||
|
@ -791,14 +757,16 @@ wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_ctrl.enable =
|
||||
MFALSE;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_ctrl.
|
||||
aggr_mode = MLAN_USB_AGGR_MODE_LEN_V2;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_ctrl.
|
||||
aggr_align = MLAN_USB_TX_AGGR_V2_ALIGN;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_ctrl.
|
||||
aggr_max = MLAN_USB_TX_AGGR_MAX_LEN;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_ctrl.
|
||||
aggr_tmo = MLAN_USB_TX_AGGR_TIMEOUT_MSEC * 1000;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_ctrl.aggr_mode =
|
||||
MLAN_USB_AGGR_MODE_LEN_V2;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_ctrl.aggr_align =
|
||||
MLAN_USB_TX_AGGR_V2_ALIGN;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_ctrl.aggr_max =
|
||||
MLAN_USB_TX_AGGR_MAX_LEN;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_ctrl.aggr_tmo =
|
||||
MLAN_USB_TX_AGGR_TIMEOUT_MSEC * 1000;
|
||||
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].pmbuf_aggr = MNULL;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_len = 0;
|
||||
|
@ -908,8 +876,8 @@ wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
if (!pmadapter->pcard_pcie->reg->use_adma) {
|
||||
pmadapter->pcard_pcie->rxbd_wrptr =
|
||||
pmadapter->pcard_pcie->reg->
|
||||
txrx_rw_ptr_rollover_ind;
|
||||
pmadapter->pcard_pcie->reg
|
||||
->txrx_rw_ptr_rollover_ind;
|
||||
pmadapter->pcard_pcie->evtbd_wrptr =
|
||||
EVT_RW_PTR_ROLLOVER_IND;
|
||||
}
|
||||
|
@ -937,8 +905,8 @@ wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
* otherwise MLAN_STATUS_FAILURE
|
||||
*
|
||||
*/
|
||||
mlan_status
|
||||
wlan_init_priv_lock_list(IN pmlan_adapter pmadapter, t_u8 start_index)
|
||||
mlan_status wlan_init_priv_lock_list(IN pmlan_adapter pmadapter,
|
||||
t_u8 start_index)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_private priv = MNULL;
|
||||
|
@ -948,25 +916,22 @@ wlan_init_priv_lock_list(IN pmlan_adapter pmadapter, t_u8 start_index)
|
|||
for (i = start_index; i < pmadapter->priv_num; i++) {
|
||||
if (pmadapter->priv[i]) {
|
||||
priv = pmadapter->priv[i];
|
||||
if (pcb->
|
||||
moal_init_lock(pmadapter->pmoal_handle,
|
||||
&priv->rx_pkt_lock)
|
||||
!= MLAN_STATUS_SUCCESS) {
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&priv->rx_pkt_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
if (pcb->
|
||||
moal_init_lock(pmadapter->pmoal_handle,
|
||||
&priv->wmm.ra_list_spinlock)
|
||||
!= MLAN_STATUS_SUCCESS) {
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&priv->wmm.ra_list_spinlock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
#ifdef STA_SUPPORT
|
||||
if (pcb->
|
||||
moal_init_lock(pmadapter->pmoal_handle,
|
||||
&priv->curr_bcn_buf_lock)
|
||||
!= MLAN_STATUS_SUCCESS) {
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&priv->curr_bcn_buf_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
|
@ -984,21 +949,20 @@ wlan_init_priv_lock_list(IN pmlan_adapter pmadapter, t_u8 start_index)
|
|||
if (pmadapter->priv[i]) {
|
||||
priv = pmadapter->priv[i];
|
||||
for (j = 0; j < MAX_NUM_TID; ++j) {
|
||||
util_init_list_head((t_void *)pmadapter->
|
||||
pmoal_handle,
|
||||
&priv->wmm.tid_tbl_ptr[j].
|
||||
ra_list, MTRUE,
|
||||
priv->adapter->callbacks.
|
||||
moal_init_lock);
|
||||
util_init_list_head(
|
||||
(t_void *)pmadapter->pmoal_handle,
|
||||
&priv->wmm.tid_tbl_ptr[j].ra_list,
|
||||
MTRUE,
|
||||
priv->adapter->callbacks.moal_init_lock);
|
||||
}
|
||||
util_init_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
util_init_list_head(
|
||||
(t_void *)pmadapter->pmoal_handle,
|
||||
&priv->tx_ba_stream_tbl_ptr, MTRUE,
|
||||
pmadapter->callbacks.
|
||||
moal_init_lock);
|
||||
util_init_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
util_init_list_head(
|
||||
(t_void *)pmadapter->pmoal_handle,
|
||||
&priv->rx_reorder_tbl_ptr, MTRUE,
|
||||
pmadapter->callbacks.
|
||||
moal_init_lock);
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
util_scalar_init((t_void *)pmadapter->pmoal_handle,
|
||||
&priv->wmm.tx_pkts_queued, 0,
|
||||
priv->wmm.ra_list_spinlock,
|
||||
|
@ -1008,15 +972,15 @@ wlan_init_priv_lock_list(IN pmlan_adapter pmadapter, t_u8 start_index)
|
|||
HIGH_PRIO_TID,
|
||||
priv->wmm.ra_list_spinlock,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
util_init_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
util_init_list_head(
|
||||
(t_void *)pmadapter->pmoal_handle,
|
||||
&priv->sta_list, MTRUE,
|
||||
pmadapter->callbacks.
|
||||
moal_init_lock);
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
/* Initialize bypass_txq */
|
||||
util_init_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
util_init_list_head(
|
||||
(t_void *)pmadapter->pmoal_handle,
|
||||
&priv->bypass_txq, MTRUE,
|
||||
pmadapter->callbacks.
|
||||
moal_init_lock);
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
}
|
||||
}
|
||||
error:
|
||||
|
@ -1034,8 +998,7 @@ error:
|
|||
* otherwise MLAN_STATUS_FAILURE
|
||||
*
|
||||
*/
|
||||
mlan_status
|
||||
wlan_init_lock_list(IN pmlan_adapter pmadapter)
|
||||
mlan_status wlan_init_lock_list(IN pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
@ -1044,48 +1007,48 @@ wlan_init_lock_list(IN pmlan_adapter pmadapter)
|
|||
#endif
|
||||
ENTER();
|
||||
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle, &pmadapter->pmlan_lock)
|
||||
!= MLAN_STATUS_SUCCESS) {
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmlan_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
if (!IS_USB(pmadapter->card_type)) {
|
||||
if (pcb->
|
||||
moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pint_lock)
|
||||
!= MLAN_STATUS_SUCCESS) {
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pint_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (pcb->
|
||||
moal_init_lock(pmadapter->pmoal_handle, &pmadapter->pmain_proc_lock)
|
||||
!= MLAN_STATUS_SUCCESS) {
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmain_proc_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
if (pcb->
|
||||
moal_init_lock(pmadapter->pmoal_handle, &pmadapter->prx_proc_lock)
|
||||
!= MLAN_STATUS_SUCCESS) {
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->prx_proc_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
if (pcb->
|
||||
moal_init_lock(pmadapter->pmoal_handle, &pmadapter->pmlan_cmd_lock)
|
||||
!= MLAN_STATUS_SUCCESS) {
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmlan_cmd_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
if (pcb->
|
||||
moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pcard_usb->
|
||||
usb_tx_aggr[i].paggr_lock)
|
||||
!= MLAN_STATUS_SUCCESS) {
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pcard_usb
|
||||
->usb_tx_aggr[i]
|
||||
.paggr_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
|
@ -1097,8 +1060,8 @@ wlan_init_lock_list(IN pmlan_adapter pmadapter)
|
|||
&pmadapter->rx_data_queue, MTRUE,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
util_scalar_init((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts, 0,
|
||||
MNULL, pmadapter->callbacks.moal_init_lock);
|
||||
&pmadapter->pending_bridge_pkts, 0, MNULL,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
/* Initialize cmd_free_q */
|
||||
util_init_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->cmd_free_q, MTRUE,
|
||||
|
@ -1130,8 +1093,7 @@ error:
|
|||
* @return None
|
||||
*
|
||||
*/
|
||||
t_void
|
||||
wlan_free_lock_list(IN pmlan_adapter pmadapter)
|
||||
t_void wlan_free_lock_list(IN pmlan_adapter pmadapter)
|
||||
{
|
||||
pmlan_private priv = MNULL;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
@ -1162,8 +1124,9 @@ wlan_free_lock_list(IN pmlan_adapter pmadapter)
|
|||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i].paggr_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_usb->
|
||||
usb_tx_aggr[i].paggr_lock);
|
||||
pmadapter->pcard_usb
|
||||
->usb_tx_aggr[i]
|
||||
.paggr_lock);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1215,39 +1178,35 @@ wlan_free_lock_list(IN pmlan_adapter pmadapter)
|
|||
for (i = 0; i < pmadapter->priv_num; i++) {
|
||||
if (pmadapter->priv[i]) {
|
||||
priv = pmadapter->priv[i];
|
||||
util_free_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
util_free_list_head(
|
||||
(t_void *)pmadapter->pmoal_handle,
|
||||
&priv->sta_list,
|
||||
priv->adapter->callbacks.
|
||||
moal_free_lock);
|
||||
util_free_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
priv->adapter->callbacks.moal_free_lock);
|
||||
util_free_list_head(
|
||||
(t_void *)pmadapter->pmoal_handle,
|
||||
&priv->bypass_txq,
|
||||
pmadapter->callbacks.
|
||||
moal_free_lock);
|
||||
pmadapter->callbacks.moal_free_lock);
|
||||
for (j = 0; j < MAX_NUM_TID; ++j)
|
||||
util_free_list_head((t_void *)priv->adapter->
|
||||
pmoal_handle,
|
||||
&priv->wmm.tid_tbl_ptr[j].
|
||||
ra_list,
|
||||
priv->adapter->callbacks.
|
||||
moal_free_lock);
|
||||
util_free_list_head((t_void *)priv->adapter->
|
||||
pmoal_handle,
|
||||
util_free_list_head(
|
||||
(t_void *)priv->adapter->pmoal_handle,
|
||||
&priv->wmm.tid_tbl_ptr[j].ra_list,
|
||||
priv->adapter->callbacks.moal_free_lock);
|
||||
util_free_list_head(
|
||||
(t_void *)priv->adapter->pmoal_handle,
|
||||
&priv->tx_ba_stream_tbl_ptr,
|
||||
priv->adapter->callbacks.
|
||||
moal_free_lock);
|
||||
util_free_list_head((t_void *)priv->adapter->
|
||||
pmoal_handle,
|
||||
priv->adapter->callbacks.moal_free_lock);
|
||||
util_free_list_head(
|
||||
(t_void *)priv->adapter->pmoal_handle,
|
||||
&priv->rx_reorder_tbl_ptr,
|
||||
priv->adapter->callbacks.
|
||||
moal_free_lock);
|
||||
util_scalar_free((t_void *)priv->adapter->pmoal_handle,
|
||||
priv->adapter->callbacks.moal_free_lock);
|
||||
util_scalar_free(
|
||||
(t_void *)priv->adapter->pmoal_handle,
|
||||
&priv->wmm.tx_pkts_queued,
|
||||
priv->adapter->callbacks.
|
||||
moal_free_lock);
|
||||
util_scalar_free((t_void *)priv->adapter->pmoal_handle,
|
||||
priv->adapter->callbacks.moal_free_lock);
|
||||
util_scalar_free(
|
||||
(t_void *)priv->adapter->pmoal_handle,
|
||||
&priv->wmm.highest_queued_prio,
|
||||
priv->adapter->callbacks.
|
||||
moal_free_lock);
|
||||
priv->adapter->callbacks.moal_free_lock);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1264,8 +1223,7 @@ wlan_free_lock_list(IN pmlan_adapter pmadapter)
|
|||
* otherwise MLAN_STATUS_FAILURE
|
||||
*
|
||||
*/
|
||||
mlan_status
|
||||
wlan_init_timer(IN pmlan_adapter pmadapter)
|
||||
mlan_status wlan_init_timer(IN pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
@ -1274,36 +1232,32 @@ wlan_init_timer(IN pmlan_adapter pmadapter)
|
|||
#endif
|
||||
ENTER();
|
||||
|
||||
if (pcb->
|
||||
moal_init_timer(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmlan_cmd_timer, wlan_cmd_timeout_func,
|
||||
pmadapter)
|
||||
!= MLAN_STATUS_SUCCESS) {
|
||||
if (pcb->moal_init_timer(
|
||||
pmadapter->pmoal_handle, &pmadapter->pmlan_cmd_timer,
|
||||
wlan_cmd_timeout_func, pmadapter) != MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
if (pcb->
|
||||
moal_init_timer(pmadapter->pmoal_handle,
|
||||
&pmadapter->pcard_usb->
|
||||
usb_tx_aggr[i].paggr_hold_timer,
|
||||
if (pcb->moal_init_timer(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.paggr_hold_timer,
|
||||
wlan_usb_tx_aggr_timeout_func,
|
||||
&pmadapter->pcard_usb->
|
||||
usb_tx_aggr[i])
|
||||
!= MLAN_STATUS_SUCCESS) {
|
||||
&pmadapter->pcard_usb->usb_tx_aggr[i]) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (pcb->
|
||||
moal_init_timer(pmadapter->pmoal_handle,
|
||||
if (pcb->moal_init_timer(pmadapter->pmoal_handle,
|
||||
&pmadapter->pwakeup_fw_timer,
|
||||
wlan_wakeup_card_timeout_func, pmadapter)
|
||||
!= MLAN_STATUS_SUCCESS) {
|
||||
wlan_wakeup_card_timeout_func,
|
||||
pmadapter) != MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
|
@ -1321,8 +1275,7 @@ error:
|
|||
* @return None
|
||||
*
|
||||
*/
|
||||
t_void
|
||||
wlan_free_timer(IN pmlan_adapter pmadapter)
|
||||
t_void wlan_free_timer(IN pmlan_adapter pmadapter)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
#if defined(USB)
|
||||
|
@ -1336,12 +1289,12 @@ wlan_free_timer(IN pmlan_adapter pmadapter)
|
|||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i].
|
||||
paggr_hold_timer)
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.paggr_hold_timer)
|
||||
pcb->moal_free_timer(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_usb->
|
||||
usb_tx_aggr[i].
|
||||
paggr_hold_timer);
|
||||
pmadapter->pcard_usb
|
||||
->usb_tx_aggr[i]
|
||||
.paggr_hold_timer);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1359,10 +1312,10 @@ wlan_free_timer(IN pmlan_adapter pmadapter)
|
|||
*
|
||||
* @param pmadapter A pointer to mlan_adapter
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE
|
||||
* @return MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING or
|
||||
* MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_init_fw(IN pmlan_adapter pmadapter)
|
||||
mlan_status wlan_init_fw(IN pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#ifdef PCIE
|
||||
|
@ -1416,10 +1369,10 @@ done:
|
|||
*
|
||||
* @param pmadapter A pointer to mlan_adapter
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE
|
||||
* @return MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING or
|
||||
* MLAN_STATUS_FAILURE
|
||||
*/
|
||||
void
|
||||
wlan_update_hw_spec(IN pmlan_adapter pmadapter)
|
||||
void wlan_update_hw_spec(IN pmlan_adapter pmadapter)
|
||||
{
|
||||
t_u32 i;
|
||||
|
||||
|
@ -1497,8 +1450,8 @@ wlan_update_hw_spec(IN pmlan_adapter pmadapter)
|
|||
for (i = 0; i < pmadapter->priv_num; i++) {
|
||||
if (pmadapter->priv[i])
|
||||
pmadapter->priv[i]->tx_bf_cap =
|
||||
pmadapter->pcard_info->
|
||||
default_11n_tx_bf_cap;
|
||||
pmadapter->pcard_info
|
||||
->default_11n_tx_bf_cap;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < pmadapter->priv_num; i++) {
|
||||
|
@ -1524,16 +1477,16 @@ wlan_update_hw_spec(IN pmlan_adapter pmadapter)
|
|||
pmadapter->priv[i]->user_2g_he_cap,
|
||||
pmadapter->hw_2g_he_cap,
|
||||
pmadapter->hw_2g_hecap_len,
|
||||
sizeof(pmadapter->priv[i]->
|
||||
user_2g_he_cap));
|
||||
sizeof(pmadapter->priv[i]
|
||||
->user_2g_he_cap));
|
||||
pmadapter->priv[i]->user_hecap_len =
|
||||
pmadapter->hw_hecap_len;
|
||||
memcpy_ext(pmadapter,
|
||||
memcpy_ext(
|
||||
pmadapter,
|
||||
pmadapter->priv[i]->user_he_cap,
|
||||
pmadapter->hw_he_cap,
|
||||
pmadapter->hw_hecap_len,
|
||||
sizeof(pmadapter->priv[i]->
|
||||
user_he_cap));
|
||||
sizeof(pmadapter->priv[i]->user_he_cap));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1546,10 +1499,10 @@ wlan_update_hw_spec(IN pmlan_adapter pmadapter)
|
|||
*
|
||||
* @param pmadapter A pointer to mlan_adapter
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE
|
||||
* @return MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING or
|
||||
* MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_init_priv_fw(IN pmlan_adapter pmadapter)
|
||||
mlan_status wlan_init_priv_fw(IN pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_private priv = MNULL;
|
||||
|
@ -1618,8 +1571,7 @@ done:
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
wlan_free_adapter(pmlan_adapter pmadapter)
|
||||
t_void wlan_free_adapter(pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks;
|
||||
#if defined(USB)
|
||||
|
@ -1647,15 +1599,15 @@ wlan_free_adapter(pmlan_adapter pmadapter)
|
|||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i].
|
||||
aggr_hold_timer_is_set) {
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_hold_timer_is_set) {
|
||||
/* Cancel usb_tx_aggregation timeout timer */
|
||||
pcb->moal_stop_timer(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_usb->
|
||||
usb_tx_aggr[i].
|
||||
paggr_hold_timer);
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].
|
||||
aggr_hold_timer_is_set = MFALSE;
|
||||
pmadapter->pcard_usb
|
||||
->usb_tx_aggr[i]
|
||||
.paggr_hold_timer);
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_hold_timer_is_set = MFALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1699,9 +1651,9 @@ wlan_free_adapter(pmlan_adapter pmadapter)
|
|||
#ifdef SDIO
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
if (pmadapter->pcard_sd->mp_regs_buf) {
|
||||
pcb->moal_mfree(pmadapter->pmoal_handle,
|
||||
(t_u8 *)pmadapter->pcard_sd->
|
||||
mp_regs_buf);
|
||||
pcb->moal_mfree(
|
||||
pmadapter->pmoal_handle,
|
||||
(t_u8 *)pmadapter->pcard_sd->mp_regs_buf);
|
||||
pmadapter->pcard_sd->mp_regs_buf = MNULL;
|
||||
pmadapter->pcard_sd->mp_regs = MNULL;
|
||||
}
|
||||
|
@ -1715,13 +1667,13 @@ wlan_free_adapter(pmlan_adapter pmadapter)
|
|||
#ifdef DEBUG_LEVEL1
|
||||
if (pmadapter->pcard_sd->mpa_buf) {
|
||||
if (pcb->moal_vmalloc && pcb->moal_vfree)
|
||||
pcb->moal_vfree(pmadapter->pmoal_handle,
|
||||
(t_u8 *)pmadapter->pcard_sd->
|
||||
mpa_buf);
|
||||
pcb->moal_vfree(
|
||||
pmadapter->pmoal_handle,
|
||||
(t_u8 *)pmadapter->pcard_sd->mpa_buf);
|
||||
else
|
||||
pcb->moal_mfree(pmadapter->pmoal_handle,
|
||||
(t_u8 *)pmadapter->pcard_sd->
|
||||
mpa_buf);
|
||||
pcb->moal_mfree(
|
||||
pmadapter->pmoal_handle,
|
||||
(t_u8 *)pmadapter->pcard_sd->mpa_buf);
|
||||
pmadapter->pcard_sd->mpa_buf = MNULL;
|
||||
pmadapter->pcard_sd->mpa_buf_size = 0;
|
||||
}
|
||||
|
@ -1781,8 +1733,7 @@ wlan_free_adapter(pmlan_adapter pmadapter)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
wlan_free_priv(mlan_private *pmpriv)
|
||||
t_void wlan_free_priv(mlan_private *pmpriv)
|
||||
{
|
||||
ENTER();
|
||||
wlan_clean_txrx(pmpriv);
|
||||
|
@ -1807,8 +1758,7 @@ wlan_free_priv(mlan_private *pmpriv)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
mlan_status
|
||||
wlan_init_interface(IN pmlan_adapter pmadapter)
|
||||
mlan_status wlan_init_interface(IN pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb = MNULL;
|
||||
|
@ -1821,24 +1771,19 @@ wlan_init_interface(IN pmlan_adapter pmadapter)
|
|||
for (i = 0; i < MLAN_MAX_BSS_NUM; i++) {
|
||||
if (pmadapter->bss_attr[i].active == MTRUE) {
|
||||
if (!pmadapter->priv[i]) {
|
||||
/* For valid bss_attr, allocate memory for private structure */
|
||||
/* For valid bss_attr, allocate memory for
|
||||
* private structure */
|
||||
if (pcb->moal_vmalloc && pcb->moal_vfree)
|
||||
ret = pcb->moal_vmalloc(pmadapter->
|
||||
pmoal_handle,
|
||||
sizeof
|
||||
(mlan_private),
|
||||
(t_u8 **)
|
||||
&pmadapter->
|
||||
priv[i]);
|
||||
ret = pcb->moal_vmalloc(
|
||||
pmadapter->pmoal_handle,
|
||||
sizeof(mlan_private),
|
||||
(t_u8 **)&pmadapter->priv[i]);
|
||||
else
|
||||
ret = pcb->moal_malloc(pmadapter->
|
||||
pmoal_handle,
|
||||
sizeof
|
||||
(mlan_private),
|
||||
ret = pcb->moal_malloc(
|
||||
pmadapter->pmoal_handle,
|
||||
sizeof(mlan_private),
|
||||
MLAN_MEM_DEF,
|
||||
(t_u8 **)
|
||||
&pmadapter->
|
||||
priv[i]);
|
||||
(t_u8 **)&pmadapter->priv[i]);
|
||||
if (ret != MLAN_STATUS_SUCCESS ||
|
||||
!pmadapter->priv[i]) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
|
@ -1912,8 +1857,7 @@ error:
|
|||
* @return MLAN_STATUS_SUCCESS
|
||||
* The firmware initialization callback succeeded.
|
||||
*/
|
||||
mlan_status
|
||||
wlan_get_hw_spec_complete(IN pmlan_adapter pmadapter)
|
||||
mlan_status wlan_get_hw_spec_complete(IN pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -1964,8 +1908,7 @@ wlan_get_hw_spec_complete(IN pmlan_adapter pmadapter)
|
|||
* @return MLAN_STATUS_SUCCESS
|
||||
* The firmware initialization callback succeeded.
|
||||
*/
|
||||
mlan_status
|
||||
wlan_init_fw_complete(IN pmlan_adapter pmadapter)
|
||||
mlan_status wlan_init_fw_complete(IN pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -1979,10 +1922,10 @@ wlan_init_fw_complete(IN pmlan_adapter pmadapter)
|
|||
|
||||
/* Reconfigure wmm parameter*/
|
||||
if (status == MLAN_STATUS_SUCCESS) {
|
||||
wlan_prepare_cmd(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_STA),
|
||||
HostCmd_CMD_WMM_PARAM_CONFIG,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL,
|
||||
&pmadapter->ac_params);
|
||||
status = wlan_prepare_cmd(
|
||||
wlan_get_priv(pmadapter, MLAN_BSS_ROLE_STA),
|
||||
HostCmd_CMD_WMM_PARAM_CONFIG, HostCmd_ACT_GEN_SET, 0,
|
||||
MNULL, &pmadapter->ac_params);
|
||||
}
|
||||
/* Invoke callback */
|
||||
ret = pcb->moal_init_fw_complete(pmadapter->pmoal_handle, status);
|
||||
|
@ -1999,8 +1942,7 @@ wlan_init_fw_complete(IN pmlan_adapter pmadapter)
|
|||
* @return MLAN_STATUS_SUCCESS
|
||||
* The firmware shutdown callback succeeded.
|
||||
*/
|
||||
mlan_status
|
||||
wlan_shutdown_fw_complete(IN pmlan_adapter pmadapter)
|
||||
mlan_status wlan_shutdown_fw_complete(IN pmlan_adapter pmadapter)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
|
|
@ -108,7 +108,8 @@ typedef MLAN_PACK_START struct _FWSyncPkt {
|
|||
/** Convert sequence number and command fields
|
||||
* of fwheader to correct endian format
|
||||
*/
|
||||
#define endian_convert_syncfwheader(x) { \
|
||||
#define endian_convert_syncfwheader(x) \
|
||||
{ \
|
||||
(x)->cmd = wlan_le32_to_cpu((x)->cmd); \
|
||||
(x)->seq_num = wlan_le32_to_cpu((x)->seq_num); \
|
||||
(x)->status = wlan_le32_to_cpu((x)->status); \
|
||||
|
|
|
@ -228,6 +228,7 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_11H_CHAN_REPORT_REQUEST = 0x00110004,
|
||||
MLAN_OID_11H_CHAN_SWITCH_COUNT = 0x00110005,
|
||||
MLAN_OID_11H_CHAN_NOP_INFO = 0x00110006,
|
||||
MLAN_OID_11H_DFS_W53_CFG = 0x00110008,
|
||||
|
||||
/* 802.11n Configuration Group RANDYTODO for value assign */
|
||||
MLAN_IOCTL_11AC_CFG = 0x00120000,
|
||||
|
@ -239,6 +240,7 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_IOCTL_11AX_CFG = 0x00170000,
|
||||
MLAN_OID_11AX_HE_CFG = 0x00170001,
|
||||
MLAN_OID_11AX_CMD_CFG = 0x00170002,
|
||||
MLAN_OID_11AX_TWT_CFG = 0x00170003,
|
||||
|
||||
/* Miscellaneous Configuration Group */
|
||||
MLAN_IOCTL_MISC_CFG = 0x00200000,
|
||||
|
@ -337,10 +339,7 @@ enum _mlan_act_ioctl {
|
|||
};
|
||||
|
||||
/** Enumeration for generic enable/disable */
|
||||
enum _mlan_act_generic {
|
||||
MLAN_ACT_DISABLE = 0,
|
||||
MLAN_ACT_ENABLE = 1
|
||||
};
|
||||
enum _mlan_act_generic { MLAN_ACT_DISABLE = 0, MLAN_ACT_ENABLE = 1 };
|
||||
|
||||
/** Enumeration for scan mode */
|
||||
enum _mlan_scan_mode {
|
||||
|
@ -434,8 +433,8 @@ typedef struct {
|
|||
*/
|
||||
t_u32 scan_number;
|
||||
/**
|
||||
* Buffer marker for multiple wlan_ioctl_get_scan_table_entry structures.
|
||||
* Each struct is padded to the nearest 32 bit boundary.
|
||||
* Buffer marker for multiple wlan_ioctl_get_scan_table_entry
|
||||
* structures. Each struct is padded to the nearest 32 bit boundary.
|
||||
*/
|
||||
t_u8 scan_table_entry_buf[1];
|
||||
} wlan_ioctl_get_scan_table_info;
|
||||
|
@ -450,7 +449,8 @@ typedef struct _wlan_ioctl_get_scan_table_entry {
|
|||
*
|
||||
* Length value is included so future fixed fields can be added to the
|
||||
* response without breaking backwards compatibility. Use the length
|
||||
* to find the offset for the bssInfoLength field, not a sizeof() calc.
|
||||
* to find the offset for the bssInfoLength field, not a sizeof()
|
||||
* calc.
|
||||
*/
|
||||
t_u32 fixed_field_length;
|
||||
|
||||
|
@ -626,7 +626,8 @@ typedef struct _mlan_chan_list {
|
|||
|
||||
/* This channel is disabled.*/
|
||||
#define CHAN_FLAGS_DISABLED MBIT(0)
|
||||
/* do not initiate radiation, this includes sending probe requests or beaconing */
|
||||
/* do not initiate radiation, this includes sending probe requests or beaconing
|
||||
*/
|
||||
#define CHAN_FLAGS_NO_IR MBIT(1)
|
||||
/* Radar detection is required on this channel */
|
||||
#define CHAN_FLAGS_RADAR MBIT(3)
|
||||
|
@ -1077,6 +1078,8 @@ typedef struct _mlan_uap_bss_param {
|
|||
/** Wmm parameters */
|
||||
wmm_parameter_t wmm_para;
|
||||
|
||||
/** uap host based config */
|
||||
t_u32 uap_host_based_config;
|
||||
} mlan_uap_bss_param;
|
||||
|
||||
/** mlan_uap_scan_channels */
|
||||
|
@ -1192,7 +1195,8 @@ typedef struct _mlan_ds_bss {
|
|||
t_u32 bcn_interval;
|
||||
/** ATIM window for MLAN_OID_IBSS_ATIM_WINDOW */
|
||||
t_u32 atim_window;
|
||||
/** deauth param for MLAN_OID_BSS_STOP & MLAN_OID_UAP_DEAUTH_STA */
|
||||
/** deauth param for MLAN_OID_BSS_STOP & MLAN_OID_UAP_DEAUTH_STA
|
||||
*/
|
||||
mlan_deauth_param deauth_param;
|
||||
#ifdef UAP_SUPPORT
|
||||
/** host based flag for MLAN_OID_BSS_START */
|
||||
|
@ -1422,7 +1426,8 @@ enum _mlan_adhoc_status {
|
|||
ADHOC_IDLE,
|
||||
ADHOC_STARTED,
|
||||
ADHOC_JOINED,
|
||||
ADHOC_COALESCED, ADHOC_STARTING
|
||||
ADHOC_COALESCED,
|
||||
ADHOC_STARTING
|
||||
};
|
||||
|
||||
typedef struct _mlan_ds_get_stats_org {
|
||||
|
@ -2520,7 +2525,8 @@ typedef struct _mlan_pmk_t {
|
|||
/** Embedded supplicant RSN type: WPA2 */
|
||||
#define RSN_TYPE_WPA2 MBIT(5)
|
||||
/** Embedded supplicant RSN type: RFU */
|
||||
#define RSN_TYPE_VALID_BITS (RSN_TYPE_NO_RSN | RSN_TYPE_WPA | RSN_TYPE_WPANONE | RSN_TYPE_WPA2)
|
||||
#define RSN_TYPE_VALID_BITS \
|
||||
(RSN_TYPE_NO_RSN | RSN_TYPE_WPA | RSN_TYPE_WPANONE | RSN_TYPE_WPA2)
|
||||
|
||||
/** Embedded supplicant cipher type: TKIP */
|
||||
#define EMBED_CIPHER_TKIP MBIT(2)
|
||||
|
@ -2639,11 +2645,7 @@ typedef struct _mlan_ds_sup_cfg {
|
|||
/** Rate Configuration Group */
|
||||
/*-----------------------------------------------------------------*/
|
||||
/** Enumeration for rate type */
|
||||
enum _mlan_rate_type {
|
||||
MLAN_RATE_INDEX,
|
||||
MLAN_RATE_VALUE,
|
||||
MLAN_RATE_BITMAP
|
||||
};
|
||||
enum _mlan_rate_type { MLAN_RATE_INDEX, MLAN_RATE_VALUE, MLAN_RATE_BITMAP };
|
||||
|
||||
/** Enumeration for rate format */
|
||||
enum _mlan_rate_format {
|
||||
|
@ -2769,7 +2771,6 @@ typedef struct _mlan_power_cfg_t {
|
|||
#define MAX_POWER_GROUP 64
|
||||
/** Type definition of mlan_power group info */
|
||||
typedef struct mlan_power_group {
|
||||
|
||||
/** rate format (LG: 0, HT: 1, VHT: 2, no auto ctrl: 0xFF) */
|
||||
t_u32 rate_format;
|
||||
/** bandwidth (LG: 20 MHz, HT: 20/40 MHz, VHT: 80/160/80+80 MHz) */
|
||||
|
@ -2817,9 +2818,11 @@ typedef struct _mlan_ds_band_steer_cfg {
|
|||
t_u8 action;
|
||||
/** enable/disable band steering*/
|
||||
t_u8 state;
|
||||
/** Probe Response will be blocked to 2G channel for first block_2g_prb_req probe requests*/
|
||||
/** Probe Response will be blocked to 2G channel for first
|
||||
* block_2g_prb_req probe requests*/
|
||||
t_u8 block_2g_prb_req;
|
||||
/** When band steering is enabled, limit the btm request sent to STA at <max_btm_req_allowed>*/
|
||||
/** When band steering is enabled, limit the btm request sent to STA at
|
||||
* <max_btm_req_allowed>*/
|
||||
t_u8 max_btm_req_allowed;
|
||||
} mlan_ds_band_steer_cfg, *pmlan_ds_band_steer_cfg;
|
||||
|
||||
|
@ -2841,7 +2844,9 @@ typedef struct _mlan_ds_band_steer_cfg {
|
|||
#define HOST_SLEEP_COND_IPV6_PACKET MBIT(31)
|
||||
|
||||
/** Host sleep config conditions: Default */
|
||||
#define HOST_SLEEP_DEF_COND (HOST_SLEEP_COND_BROADCAST_DATA | HOST_SLEEP_COND_UNICAST_DATA | HOST_SLEEP_COND_MAC_EVENT)
|
||||
#define HOST_SLEEP_DEF_COND \
|
||||
(HOST_SLEEP_COND_BROADCAST_DATA | HOST_SLEEP_COND_UNICAST_DATA | \
|
||||
HOST_SLEEP_COND_MAC_EVENT)
|
||||
|
||||
/** Host sleep config GPIO : Default */
|
||||
#define HOST_SLEEP_DEF_GPIO 0xff
|
||||
|
@ -2901,7 +2906,8 @@ typedef struct _mlan_mgmt_frame_wakeup {
|
|||
** Action[1:0]=00 Discard and Not Wake host
|
||||
** Action[1:0]=01 Discard and Wake host
|
||||
** Action[1:0]=10 Invalid
|
||||
** Note that default action on non-match is "Discard and Not Wake host".
|
||||
** Note that default action on non-match is "Discard and Not Wake
|
||||
*host".
|
||||
**/
|
||||
t_u32 action;
|
||||
/** Frame type(p2p, tdls...)
|
||||
|
@ -3138,7 +3144,8 @@ typedef struct _mlan_ds_pm_cfg {
|
|||
t_u32 sleep_period;
|
||||
/** PS configuration parameters for MLAN_OID_PM_CFG_PS_CFG */
|
||||
mlan_ds_ps_cfg ps_cfg;
|
||||
/** PS configuration parameters for MLAN_OID_PM_CFG_SLEEP_PARAMS */
|
||||
/** PS configuration parameters for MLAN_OID_PM_CFG_SLEEP_PARAMS
|
||||
*/
|
||||
mlan_ds_sleep_params sleep_params;
|
||||
/** PS configuration parameters for MLAN_OID_PM_CFG_PS_MODE */
|
||||
mlan_ds_ps_mgmt ps_mgmt;
|
||||
|
@ -3157,10 +3164,8 @@ typedef struct _mlan_ds_pm_cfg {
|
|||
typedef struct {
|
||||
mlan_cmd_result_e cmd_result; /**< Firmware execution result */
|
||||
|
||||
t_u32 pkt_threshold;
|
||||
/** Packet threshold */
|
||||
t_u16 delay;
|
||||
/** Timeout value in milliseconds */
|
||||
t_u32 pkt_threshold; /** Packet threshold */
|
||||
t_u16 delay; /** Timeout value in milliseconds */
|
||||
} wlan_ioctl_rx_pkt_coalesce_config_t;
|
||||
#endif
|
||||
|
||||
|
@ -3193,10 +3198,8 @@ typedef struct {
|
|||
t_u8 ieee_status_code; /**< IEEE status code */
|
||||
|
||||
t_u32 ie_data_len; /**< Length of ie block in ie_data */
|
||||
t_u8 ie_data[MLAN_WMM_TSPEC_SIZE
|
||||
/**< TSPEC to send in the ADDTS */
|
||||
+ MLAN_WMM_ADDTS_EXTRA_IE_BYTES];
|
||||
/**< Extra IE buf*/
|
||||
t_u8 ie_data[MLAN_WMM_TSPEC_SIZE /**< TSPEC to send in the ADDTS */
|
||||
+ MLAN_WMM_ADDTS_EXTRA_IE_BYTES]; /**< Extra IE buf*/
|
||||
} wlan_ioctl_wmm_addts_req_t;
|
||||
|
||||
/**
|
||||
|
@ -3208,12 +3211,10 @@ typedef struct {
|
|||
* @sa woal_wmm_delts_req_ioctl
|
||||
*/
|
||||
typedef struct {
|
||||
mlan_cmd_result_e cmd_result;
|
||||
/**< Firmware execution result */
|
||||
mlan_cmd_result_e cmd_result; /**< Firmware execution result */
|
||||
t_u8 ieee_reason_code; /**< IEEE reason code sent, unused for WMM */
|
||||
t_u32 ie_data_len; /**< Length of ie block in ie_data */
|
||||
t_u8 ie_data[MLAN_WMM_TSPEC_SIZE];
|
||||
/**< TSPEC to send in the DELTS */
|
||||
t_u8 ie_data[MLAN_WMM_TSPEC_SIZE]; /**< TSPEC to send in the DELTS */
|
||||
} wlan_ioctl_wmm_delts_req_t;
|
||||
|
||||
/**
|
||||
|
@ -3366,7 +3367,8 @@ typedef struct _mlan_ds_wmm_cfg {
|
|||
mlan_ds_wmm_delts delts;
|
||||
/** WMM queue configuration for MLAN_OID_WMM_CFG_QUEUE_CONFIG */
|
||||
mlan_ds_wmm_queue_config q_cfg;
|
||||
/** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */
|
||||
/** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI,
|
||||
* WMM_AC_VO */
|
||||
wmm_ac_parameters_t ac_params[MAX_AC_QUEUES];
|
||||
/** WMM queue status for MLAN_OID_WMM_CFG_QUEUE_STATS */
|
||||
mlan_ds_wmm_queue_stats q_stats;
|
||||
|
@ -3632,7 +3634,8 @@ typedef struct _mlan_ds_11n_cfg {
|
|||
t_u32 coex_rx_winsize;
|
||||
/** aggrprirotity table for MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM */
|
||||
mlan_ds_ibss_ampdu_param ibss_ampdu;
|
||||
/** Minimum BA Threshold for MLAN_OID_11N_CFG_MIN_BA_THRESHOLD */
|
||||
/** Minimum BA Threshold for MLAN_OID_11N_CFG_MIN_BA_THRESHOLD
|
||||
*/
|
||||
t_u8 min_ba_threshold;
|
||||
} param;
|
||||
} mlan_ds_11n_cfg, *pmlan_ds_11n_cfg;
|
||||
|
@ -3754,15 +3757,25 @@ typedef struct _mlan_ds_11ax_cfg {
|
|||
#define MLAN_11AXCMD_CFG_ID_SR_ENABLE 2
|
||||
#define MLAN_11AXCMD_CFG_ID_BEAM_CHANGE 3
|
||||
#define MLAN_11AXCMD_CFG_ID_HTC_ENABLE 4
|
||||
#define MLAN_11AXCMD_CFG_ID_TXOP_RTS 5
|
||||
#define MLAN_11AXCMD_CFG_ID_TX_OMI 6
|
||||
#define MLAN_11AXCMD_CFG_ID_OBSSNBRU_TOLTIME 7
|
||||
|
||||
#define MLAN_11AXCMD_SR_SUBID 0x102
|
||||
#define MLAN_11AXCMD_BEAM_SUBID 0x103
|
||||
#define MLAN_11AXCMD_HTC_SUBID 0x104
|
||||
#define MLAN_11AXCMD_TXOMI_SUBID 0x105
|
||||
#define MLAN_11AXCMD_OBSS_TOLTIME_SUBID 0x106
|
||||
#define MLAN_11AXCMD_TXOPRTS_SUBID 0x108
|
||||
|
||||
#define MLAN_11AX_TWT_SETUP_SUBID 0x114
|
||||
#define MLAN_11AX_TWT_TEARDOWN_SUBID 0x115
|
||||
|
||||
#define MRVL_DOT11AX_ENABLE_SR_TLV_ID (PROPRIETARY_TLV_BASE_ID + 322)
|
||||
#define MRVL_DOT11AX_OBSS_PD_OFFSET_TLV_ID (PROPRIETARY_TLV_BASE_ID + 323)
|
||||
|
||||
/** Type definition of mlan_11axcmdcfg_obss_pd_offset for MLAN_OID_11AX_CMD_CFG */
|
||||
/** Type definition of mlan_11axcmdcfg_obss_pd_offset for MLAN_OID_11AX_CMD_CFG
|
||||
*/
|
||||
typedef struct MLAN_PACK_START _mlan_11axcmdcfg_obss_pd_offset {
|
||||
/** <NON_SRG_OffSET, SRG_OFFSET> */
|
||||
t_u8 offset[2];
|
||||
|
@ -3799,6 +3812,25 @@ typedef struct _mlan_ds_11ax_htc_cmd {
|
|||
t_u8 value;
|
||||
} mlan_ds_11ax_htc_cmd, *pmlan_ds_11ax_htc_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_htc_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_txop_cmd {
|
||||
/** Two byte rts threshold value of which only 10 bits, bit 0 to bit 9
|
||||
* are valid */
|
||||
t_u16 rts_thres;
|
||||
} mlan_ds_11ax_txop_cmd, *pmlan_ds_11ax_txop_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_htc_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_txomi_cmd {
|
||||
/* 11ax spec 9.2.4.6a.2 OM Control 12 bits. Bit 0 to bit 11 */
|
||||
t_u16 omi;
|
||||
} mlan_ds_11ax_txomi_cmd, *pmlan_ds_11ax_txomi_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_toltime_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_toltime_cmd {
|
||||
/* OBSS Narrow Bandwidth RU Tolerance Time */
|
||||
t_u32 tol_time;
|
||||
} mlan_ds_11ax_toltime_cmd, *pmlan_ds_11ax_toltime_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_cmd_cfg for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_cmd_cfg {
|
||||
/** Sub-command */
|
||||
|
@ -3813,9 +3845,72 @@ typedef struct _mlan_ds_11ax_cmd_cfg {
|
|||
mlan_ds_11ax_beam_cmd beam_cfg;
|
||||
/** HTC configuration for MLAN_11AXCMD_HTC_SUBID */
|
||||
mlan_ds_11ax_htc_cmd htc_cfg;
|
||||
/** txop RTS configuration for MLAN_11AXCMD_TXOPRTS_SUBID */
|
||||
mlan_ds_11ax_txop_cmd txop_cfg;
|
||||
/** tx omi configuration for MLAN_11AXCMD_TXOMI_SUBID */
|
||||
mlan_ds_11ax_txomi_cmd txomi_cfg;
|
||||
/** OBSS tolerance time configuration for
|
||||
* MLAN_11AXCMD_TOLTIME_SUBID */
|
||||
mlan_ds_11ax_toltime_cmd toltime_cfg;
|
||||
} param;
|
||||
} mlan_ds_11ax_cmd_cfg, *pmlan_ds_11ax_cmd_cfg;
|
||||
|
||||
/** Type definition of mlan_ds_twt_setup for MLAN_OID_11AX_TWT_CFG */
|
||||
typedef struct MLAN_PACK_START _mlan_ds_twt_setup {
|
||||
/** Implicit, 0: TWT session is explicit, 1: Session is implicit */
|
||||
t_u8 implicit;
|
||||
/** Announced, 0: Unannounced, 1: Announced TWT */
|
||||
t_u8 announced;
|
||||
/** Trigger Enabled, 0: Non-Trigger enabled, 1: Trigger enabled TWT */
|
||||
t_u8 trigger_enabled;
|
||||
/** TWT Information Disabled, 0: TWT info enabled, 1: TWT info disabled
|
||||
*/
|
||||
t_u8 twt_info_disabled;
|
||||
/** Negotiation Type, 0: Future Individual TWT SP start time, 1: Next
|
||||
* Wake TBTT time */
|
||||
t_u8 negotiation_type;
|
||||
/** TWT Wakeup Duration, time after which the TWT requesting STA can
|
||||
* transition to doze state */
|
||||
t_u8 twt_wakeup_duration;
|
||||
/** Flow Identifier. Range: [0-7]*/
|
||||
t_u8 flow_identifier;
|
||||
/** Hard Constraint, 0: FW can tweak the TWT setup parameters if it is
|
||||
*rejected by AP.
|
||||
** 1: Firmware should not tweak any parameters. */
|
||||
t_u8 hard_constraint;
|
||||
/** TWT Exponent, Range: [0-63] */
|
||||
t_u8 twt_exponent;
|
||||
/** TWT Mantissa Range: [0-sizeof(UINT16)] */
|
||||
t_u16 twt_mantissa;
|
||||
} MLAN_PACK_END mlan_ds_twt_setup, *pmlan_ds_twt_setup;
|
||||
|
||||
/** Type definition of mlan_ds_twt_teardown for MLAN_OID_11AX_TWT_CFG */
|
||||
typedef struct MLAN_PACK_START _mlan_ds_twt_teardown {
|
||||
/** TWT Flow Identifier. Range: [0-7] */
|
||||
t_u8 flow_identifier;
|
||||
/** Negotiation Type. 0: Future Individual TWT SP start time, 1: Next
|
||||
* Wake TBTT time */
|
||||
t_u8 negotiation_type;
|
||||
/** Tear down all TWT. 1: To teardown all TWT, 0 otherwise */
|
||||
t_u8 teardown_all_twt;
|
||||
} MLAN_PACK_END mlan_ds_twt_teardown, *pmlan_ds_twt_teardown;
|
||||
|
||||
/** Type definition of mlan_ds_twtcfg for MLAN_OID_11AX_TWT_CFG */
|
||||
typedef struct MLAN_PACK_START _mlan_ds_twtcfg {
|
||||
/** Sub-command */
|
||||
t_u32 sub_command;
|
||||
/** Sub-id */
|
||||
t_u32 sub_id;
|
||||
/** TWT Setup/Teardown configuration parameter */
|
||||
union {
|
||||
/** TWT Setup config for Sub ID: MLAN_11AX_TWT_SETUP_SUBID */
|
||||
mlan_ds_twt_setup twt_setup;
|
||||
/** TWT Teardown config for Sub ID: MLAN_11AX_TWT_TEARDOWN_SUBID
|
||||
*/
|
||||
mlan_ds_twt_teardown twt_teardown;
|
||||
} param;
|
||||
} MLAN_PACK_END mlan_ds_twtcfg, *pmlan_ds_twtcfg;
|
||||
|
||||
/** Country code length */
|
||||
#define COUNTRY_CODE_LEN 3
|
||||
|
||||
|
@ -3882,7 +3977,8 @@ enum _mlan_reg_type {
|
|||
MLAN_REG_RF,
|
||||
MLAN_REG_CAU = 5,
|
||||
MLAN_REG_PSU = 6,
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(USB9097) || defined(SD9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SD9097)
|
||||
MLAN_REG_MAC2 = 0x81,
|
||||
MLAN_REG_BBP2 = 0x82,
|
||||
MLAN_REG_RF2 = 0x83
|
||||
|
@ -3949,7 +4045,8 @@ typedef struct _mlan_ds_11h_dfs_testing {
|
|||
t_u16 usr_nop_period_sec;
|
||||
/** User-configured skip channel change, 0 to disable */
|
||||
t_u8 usr_no_chan_change;
|
||||
/** User-configured fixed channel to change to, 0 to use random channel */
|
||||
/** User-configured fixed channel to change to, 0 to use random channel
|
||||
*/
|
||||
t_u8 usr_fixed_new_chan;
|
||||
} mlan_ds_11h_dfs_testing, *pmlan_ds_11h_dfs_testing;
|
||||
|
||||
|
@ -3969,17 +4066,22 @@ typedef struct _mlan_ds_11h_chan_rep_req {
|
|||
t_u16 startFreq;
|
||||
Band_Config_t bandcfg;
|
||||
t_u8 chanNum;
|
||||
t_u32 millisec_dwell_time;
|
||||
/**< Channel dwell time in milliseconds */
|
||||
t_u32 millisec_dwell_time; /**< Channel dwell time in milliseconds */
|
||||
t_u8 host_based;
|
||||
} mlan_ds_11h_chan_rep_req;
|
||||
|
||||
typedef struct _mlan_ds_11h_dfs_w53_cfg {
|
||||
/** dfs w53 cfg */
|
||||
t_u8 dfs53cfg;
|
||||
} mlan_ds_11h_dfs_w53_cfg;
|
||||
|
||||
/** Type definition of mlan_ds_11h_cfg for MLAN_IOCTL_11H_CFG */
|
||||
typedef struct _mlan_ds_11h_cfg {
|
||||
/** Sub-command */
|
||||
t_u32 sub_command;
|
||||
union {
|
||||
/** Local power constraint for MLAN_OID_11H_LOCAL_POWER_CONSTRAINT */
|
||||
/** Local power constraint for
|
||||
* MLAN_OID_11H_LOCAL_POWER_CONSTRAINT */
|
||||
t_s8 usr_local_power_constraint;
|
||||
/** User-configuation for MLAN_OID_11H_DFS_TESTING */
|
||||
mlan_ds_11h_dfs_testing dfs_testing;
|
||||
|
@ -3989,6 +4091,7 @@ typedef struct _mlan_ds_11h_cfg {
|
|||
mlan_ds_11h_chan_rep_req chan_rpt_req;
|
||||
/** channel switch count for MLAN_OID_11H_CHAN_SWITCH_COUNT*/
|
||||
t_s8 cs_count;
|
||||
mlan_ds_11h_dfs_w53_cfg dfs_w53_cfg;
|
||||
} param;
|
||||
} mlan_ds_11h_cfg, *pmlan_ds_11h_cfg;
|
||||
|
||||
|
@ -4617,7 +4720,8 @@ typedef MLAN_PACK_START struct _mlan_ds_misc_tx_rx_histogram {
|
|||
} MLAN_PACK_END mlan_ds_misc_tx_rx_histogram;
|
||||
|
||||
typedef MLAN_PACK_START struct _mlan_ds_cw_mode_ctrl {
|
||||
/** Mode of Operation 0: Disable 1: Tx Continuous Packet 2: Tx Continuous Wave */
|
||||
/** Mode of Operation 0: Disable 1: Tx Continuous Packet 2: Tx
|
||||
* Continuous Wave */
|
||||
t_u8 mode;
|
||||
/*channel*/
|
||||
t_u8 channel;
|
||||
|
@ -4707,7 +4811,8 @@ typedef struct _mlan_ds_misc_dmcs_status {
|
|||
dmcsStatus_t radio_status[MAX_NUM_MAC];
|
||||
} mlan_ds_misc_dmcs_status, *pmlan_ds_misc_dmcs_status;
|
||||
|
||||
/** Type definition of mlan_ds_misc_chan_trpc_cfg for MLAN_OID_MISC_GET_CHAN_TRPC_CFG */
|
||||
/** Type definition of mlan_ds_misc_chan_trpc_cfg for
|
||||
* MLAN_OID_MISC_GET_CHAN_TRPC_CFG */
|
||||
typedef struct _mlan_ds_misc_chan_trpc_cfg {
|
||||
/** sub_band */
|
||||
t_u16 sub_band;
|
||||
|
@ -4780,7 +4885,8 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
#endif
|
||||
mlan_ds_misc_otp_user_data otp_user_data;
|
||||
#ifdef USB
|
||||
/** USB aggregation parameters for MLAN_OID_MISC_USB_AGGR_CTRL */
|
||||
/** USB aggregation parameters for MLAN_OID_MISC_USB_AGGR_CTRL
|
||||
*/
|
||||
mlan_ds_misc_usb_aggr_ctrl usb_aggr_params;
|
||||
#endif
|
||||
mlan_ds_misc_aggr_ctrl aggr_params;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -31,9 +31,8 @@ Change log:
|
|||
#define _MLAN_MAIN_H_
|
||||
|
||||
#ifdef DEBUG_LEVEL1
|
||||
extern t_void (*print_callback) (IN t_void *pmoal_handle,
|
||||
IN t_u32 level, IN char *pformat, IN ...
|
||||
);
|
||||
extern t_void (*print_callback)(IN t_void *pmoal_handle, IN t_u32 level,
|
||||
IN char *pformat, IN...);
|
||||
|
||||
extern mlan_status (*get_sys_time_callback)(IN t_void *pmoal_handle,
|
||||
OUT t_u32 *psec, OUT t_u32 *pusec);
|
||||
|
@ -41,15 +40,18 @@ extern mlan_status (*get_sys_time_callback) (IN t_void *pmoal_handle,
|
|||
extern t_u32 mlan_drvdbg;
|
||||
|
||||
#ifdef DEBUG_LEVEL2
|
||||
#define PRINTM_MINFO(msg...) do { \
|
||||
#define PRINTM_MINFO(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MINFO) && (print_callback)) \
|
||||
print_callback(MNULL, MINFO, msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MWARN(msg...) do { \
|
||||
#define PRINTM_MWARN(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MWARN) && (print_callback)) \
|
||||
print_callback(MNULL, MWARN, msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MENTRY(msg...) do { \
|
||||
#define PRINTM_MENTRY(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MENTRY) && (print_callback)) \
|
||||
print_callback(MNULL, MENTRY, msg); \
|
||||
} while (0)
|
||||
|
@ -68,68 +70,88 @@ do { \
|
|||
|
||||
#else
|
||||
|
||||
#define PRINTM_MINFO(msg...) do {} while (0)
|
||||
#define PRINTM_MWARN(msg...) do {} while (0)
|
||||
#define PRINTM_MENTRY(msg...) do {} while (0)
|
||||
#define PRINTM_MINFO(msg...) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define PRINTM_MWARN(msg...) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define PRINTM_MENTRY(msg...) \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
#define PRINTM_GET_SYS_TIME(level, psec, pusec) \
|
||||
do { \
|
||||
if ((level & mlan_drvdbg) && (get_sys_time_callback) \
|
||||
&& (level != MINFO) && (level != MWARN)) \
|
||||
if ((level & mlan_drvdbg) && (get_sys_time_callback) && \
|
||||
(level != MINFO) && (level != MWARN)) \
|
||||
get_sys_time_callback(MNULL, psec, pusec); \
|
||||
} while (0)
|
||||
|
||||
/** Hexdump for debugging */
|
||||
#define HEXDUMP(x, y, z) do {} while (0)
|
||||
#define HEXDUMP(x, y, z) \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
#endif /* DEBUG_LEVEL2 */
|
||||
|
||||
#define PRINTM_MFW_D(msg...) do { \
|
||||
#define PRINTM_MFW_D(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MFW_D) && (print_callback)) \
|
||||
print_callback(MNULL, MFW_D, msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MCMD_D(msg...) do { \
|
||||
#define PRINTM_MCMD_D(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MCMD_D) && (print_callback)) \
|
||||
print_callback(MNULL, MCMD_D, msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MDAT_D(msg...) do { \
|
||||
#define PRINTM_MDAT_D(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MDAT_D) && (print_callback)) \
|
||||
print_callback(MNULL, MDAT_D, msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MIF_D(msg...) do { \
|
||||
#define PRINTM_MIF_D(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MIF_D) && (print_callback)) \
|
||||
print_callback(MNULL, MIF_D, msg); \
|
||||
} while (0)
|
||||
|
||||
#define PRINTM_MIOCTL(msg...) do { \
|
||||
#define PRINTM_MIOCTL(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MIOCTL) && (print_callback)) \
|
||||
print_callback(MNULL, MIOCTL, msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MINTR(msg...) do { \
|
||||
#define PRINTM_MINTR(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MINTR) && (print_callback)) \
|
||||
print_callback(MNULL, MINTR, msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MEVENT(msg...) do { \
|
||||
#define PRINTM_MEVENT(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MEVENT) && (print_callback)) \
|
||||
print_callback(MNULL, MEVENT, msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MCMND(msg...) do { \
|
||||
#define PRINTM_MCMND(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MCMND) && (print_callback)) \
|
||||
print_callback(MNULL, MCMND, msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MDATA(msg...) do { \
|
||||
#define PRINTM_MDATA(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MDATA) && (print_callback)) \
|
||||
print_callback(MNULL, MDATA, msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MERROR(msg...) do { \
|
||||
#define PRINTM_MERROR(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MERROR) && (print_callback)) \
|
||||
print_callback(MNULL, MERROR, msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MFATAL(msg...) do { \
|
||||
#define PRINTM_MFATAL(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MFATAL) && (print_callback)) \
|
||||
print_callback(MNULL, MFATAL, msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MMSG(msg...) do { \
|
||||
#define PRINTM_MMSG(msg...) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & MMSG) && (print_callback)) \
|
||||
print_callback(MNULL, MMSG, msg); \
|
||||
} while (0)
|
||||
|
@ -140,8 +162,8 @@ do { \
|
|||
#ifdef __GNUC__
|
||||
#define PRINTM_NETINTF(level, pmpriv) \
|
||||
do { \
|
||||
if ((mlan_drvdbg & level) && pmpriv \
|
||||
&& pmpriv->adapter->callbacks.moal_print_netintf) \
|
||||
if ((mlan_drvdbg & level) && pmpriv && \
|
||||
pmpriv->adapter->callbacks.moal_print_netintf) \
|
||||
pmpriv->adapter->callbacks.moal_print_netintf( \
|
||||
pmpriv->adapter->pmoal_handle, \
|
||||
pmpriv->bss_index, level); \
|
||||
|
@ -160,17 +182,27 @@ do { \
|
|||
|
||||
#else /* DEBUG_LEVEL1 */
|
||||
|
||||
#define PRINTM(level, msg...) do {} while (0)
|
||||
#define PRINTM(level, msg...) \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
#define PRINTM_NETINTF(level, pmpriv) do {} while (0)
|
||||
#define PRINTM_NETINTF(level, pmpriv) \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
/** Debug hexdump for level-1 debugging */
|
||||
#define DBG_HEXDUMP(level, x, y, z) do {} while (0)
|
||||
#define DBG_HEXDUMP(level, x, y, z) \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
/** Hexdump for debugging */
|
||||
#define HEXDUMP(x, y, z) do {} while (0)
|
||||
#define HEXDUMP(x, y, z) \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
#define PRINTM_GET_SYS_TIME(level, psec, pusec) do { } while (0)
|
||||
#define PRINTM_GET_SYS_TIME(level, psec, pusec) \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
#endif /* DEBUG_LEVEL1 */
|
||||
|
||||
|
@ -221,7 +253,8 @@ do { \
|
|||
(adapter->callbacks.moal_memcpy(adapter->pmoal_handle, to, from, len))
|
||||
/* memcpy_ext rountine */
|
||||
#define memcpy_ext(adapter, to, from, len, size) \
|
||||
(adapter->callbacks.moal_memcpy_ext(adapter->pmoal_handle, to, from, len,size))
|
||||
(adapter->callbacks.moal_memcpy_ext(adapter->pmoal_handle, to, from, \
|
||||
len, size))
|
||||
|
||||
#ifdef memcmp
|
||||
#undef memcmp
|
||||
|
@ -236,18 +269,29 @@ do { \
|
|||
#endif
|
||||
|
||||
/** SWAP: swap t_u8 */
|
||||
#define SWAP_U8(a, b) {t_u8 t; t = a; a = b; b = t; }
|
||||
#define SWAP_U8(a, b) \
|
||||
{ \
|
||||
t_u8 t; \
|
||||
t = a; \
|
||||
a = b; \
|
||||
b = t; \
|
||||
}
|
||||
|
||||
/** SWAP: swap t_u8 */
|
||||
#define SWAP_U16(a, b) {t_u16 t; t = a; a = b; b = t; }
|
||||
#define SWAP_U16(a, b) \
|
||||
{ \
|
||||
t_u16 t; \
|
||||
t = a; \
|
||||
a = b; \
|
||||
b = t; \
|
||||
}
|
||||
|
||||
/** MLAN MNULL pointer */
|
||||
#define MNULL (0)
|
||||
|
||||
/** 16 bits byte swap */
|
||||
#define swap_byte_16(x) \
|
||||
((t_u16)((((t_u16)(x) & 0x00ffU) << 8) | \
|
||||
(((t_u16)(x) & 0xff00U) >> 8)))
|
||||
((t_u16)((((t_u16)(x)&0x00ffU) << 8) | (((t_u16)(x)&0xff00U) >> 8)))
|
||||
|
||||
/** 32 bits byte swap */
|
||||
#define swap_byte_32(x) \
|
||||
|
@ -331,9 +375,13 @@ do { \
|
|||
#define wlan_cpu_to_le64(x) x
|
||||
|
||||
/** Convert TxPD to little endian format from CPU format */
|
||||
#define endian_convert_TxPD(x) do {} while (0)
|
||||
#define endian_convert_TxPD(x) \
|
||||
do { \
|
||||
} while (0)
|
||||
/** Convert RxPD from little endian format to CPU format */
|
||||
#define endian_convert_RxPD(x) do {} while (0)
|
||||
#define endian_convert_RxPD(x) \
|
||||
do { \
|
||||
} while (0)
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
|
||||
/** Global moal_assert_callback */
|
||||
|
@ -343,11 +391,13 @@ extern t_void (*assert_callback) (IN t_void *pmoal_handle, IN t_u32 cond);
|
|||
#define MASSERT(cond) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
PRINTM(MFATAL, "ASSERT: %s: %i\n", __func__, __LINE__); \
|
||||
PRINTM(MFATAL, "ASSERT: %s: %i\n", __func__, \
|
||||
__LINE__); \
|
||||
if (assert_callback) { \
|
||||
assert_callback(MNULL, (t_ptr)(cond)); \
|
||||
} else { \
|
||||
do {} while (1); \
|
||||
do { \
|
||||
} while (1); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
@ -470,8 +520,8 @@ do { \
|
|||
#define MLAN_OUI_PRESENT 1
|
||||
|
||||
/** Is cmd_resp, event or data packet received? */
|
||||
#define IS_CARD_RX_RCVD(adapter) (adapter->cmd_resp_received || \
|
||||
adapter->event_received || \
|
||||
#define IS_CARD_RX_RCVD(adapter) \
|
||||
(adapter->cmd_resp_received || adapter->event_received || \
|
||||
adapter->data_received)
|
||||
#ifdef USB
|
||||
/** Type length */
|
||||
|
@ -504,7 +554,9 @@ do { \
|
|||
#define SDIO_CMD53_MAX_SIZE 65280
|
||||
#define MAX_SUPPORT_AMSDU_SIZE 4096
|
||||
/** Maximum numbfer of registers to read for multiple port */
|
||||
#if defined(SD8887) || defined(SD8997) || defined(SD8977) || defined(SD8987) || defined(SD9098) || defined(SD9097) || defined(SD8978)
|
||||
#if defined(SD8887) || defined(SD8997) || defined(SD8977) || \
|
||||
defined(SD8987) || defined(SD9098) || defined(SD9097) || \
|
||||
defined(SD8978)
|
||||
#define MAX_MP_REGS 196
|
||||
#else
|
||||
/* upto 0xB7 */
|
||||
|
@ -923,15 +975,12 @@ typedef struct _mlan_operations {
|
|||
/** ioctl handler */
|
||||
mlan_status (*ioctl)(t_void *adapter, pmlan_ioctl_req pioctl_req);
|
||||
/** cmd handler */
|
||||
mlan_status (*prepare_cmd) (IN t_void *priv,
|
||||
IN t_u16 cmd_no,
|
||||
IN t_u16 cmd_action,
|
||||
IN t_u32 cmd_oid,
|
||||
IN t_void *pioctl_buf,
|
||||
IN t_void *pdata_buf, IN t_void *pcmd_buf);
|
||||
mlan_status (*prepare_cmd)(IN t_void *priv, IN t_u16 cmd_no,
|
||||
IN t_u16 cmd_action, IN t_u32 cmd_oid,
|
||||
IN t_void *pioctl_buf, IN t_void *pdata_buf,
|
||||
IN t_void *pcmd_buf);
|
||||
/** cmdresp handler */
|
||||
mlan_status (*process_cmdresp) (IN t_void *priv,
|
||||
IN t_u16 cmdresp_no,
|
||||
mlan_status (*process_cmdresp)(IN t_void *priv, IN t_u16 cmdresp_no,
|
||||
IN t_void *pcmd_buf, IN t_void *pioctl);
|
||||
/** rx handler */
|
||||
mlan_status (*process_rx_packet)(IN t_void *adapter,
|
||||
|
@ -1186,7 +1235,8 @@ typedef struct _mlan_private {
|
|||
t_void *rx_pkt_lock;
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
/** Buffer to store the association response for application retrieval */
|
||||
/** Buffer to store the association response for application retrieval
|
||||
*/
|
||||
t_u8 assoc_rsp_buf[MRVDRV_ASSOC_RSP_BUF_SIZE];
|
||||
/** Length of the data stored in assoc_rsp_buf */
|
||||
t_u32 assoc_rsp_size;
|
||||
|
@ -1423,11 +1473,14 @@ struct _sta_node {
|
|||
|
||||
/** 802.11h State information kept in the 'mlan_adapter' driver structure */
|
||||
typedef struct {
|
||||
/** Min TX Power capability sent to FW for 11h use and fw power control */
|
||||
/** Min TX Power capability sent to FW for 11h use and fw power control
|
||||
*/
|
||||
t_s8 min_tx_power_capability;
|
||||
/** Max TX Power capability sent to FW for 11h use and fw power control */
|
||||
/** Max TX Power capability sent to FW for 11h use and fw power control
|
||||
*/
|
||||
t_s8 max_tx_power_capability;
|
||||
/** User provisioned local power constraint sent in association requests */
|
||||
/** User provisioned local power constraint sent in association requests
|
||||
*/
|
||||
t_s8 usr_def_power_constraint;
|
||||
/** Received CHANNEL_SWITCH_ANN event */
|
||||
t_bool recvd_chanswann_event;
|
||||
|
@ -1568,8 +1621,8 @@ typedef struct {
|
|||
* @param pmbuf_aggr Pointer to aggregation buffer
|
||||
* @param pmbuf Pointer to buffer to copy
|
||||
*/
|
||||
static inline t_void
|
||||
wlan_link_buf_to_aggr(pmlan_buffer pmbuf_aggr, pmlan_buffer pmbuf)
|
||||
static inline t_void wlan_link_buf_to_aggr(pmlan_buffer pmbuf_aggr,
|
||||
pmlan_buffer pmbuf)
|
||||
{
|
||||
/* link new buf at end of list */
|
||||
pmbuf->pnext = pmbuf_aggr;
|
||||
|
@ -1749,6 +1802,8 @@ typedef struct _mlan_init_para {
|
|||
t_u8 passive_to_active_scan;
|
||||
/** uap max sta */
|
||||
t_u8 uap_max_sta;
|
||||
/** dfs w53 cfg */
|
||||
t_u8 dfs53cfg;
|
||||
} mlan_init_para, *pmlan_init_para;
|
||||
|
||||
#ifdef SDIO
|
||||
|
@ -2187,8 +2242,10 @@ typedef struct _mlan_adapter {
|
|||
t_u32 fw_cap_info;
|
||||
/** Extended firmware capability information */
|
||||
t_u32 fw_cap_ext;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
/** High byte for 5G, low byte for 2G, like 0x2211 0x22 for 5G, 0x11 for 2G */
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
/** High byte for 5G, low byte for 2G, like 0x2211 0x22 for 5G, 0x11 for
|
||||
* 2G */
|
||||
t_u16 user_htstream;
|
||||
#endif
|
||||
/** vdll ctrl */
|
||||
|
@ -2332,6 +2389,8 @@ typedef struct _mlan_adapter {
|
|||
t_s8 dfs_cs_count;
|
||||
/** User configured settings for DFS testing */
|
||||
wlan_dfs_testing_settings_t dfs_test_params;
|
||||
/** dfs w53 cfg */
|
||||
t_u8 dfs53cfg;
|
||||
/** FSM variable for MEAS support */
|
||||
wlan_meas_state_t state_meas;
|
||||
/** Scan table */
|
||||
|
@ -2628,8 +2687,8 @@ mlan_status wlan_init_fw_complete(IN pmlan_adapter pmadapter);
|
|||
mlan_status wlan_shutdown_fw_complete(IN pmlan_adapter pmadapter);
|
||||
|
||||
/** Receive event */
|
||||
mlan_status wlan_recv_event(pmlan_private priv,
|
||||
mlan_event_id event_id, t_void *pmevent);
|
||||
mlan_status wlan_recv_event(pmlan_private priv, mlan_event_id event_id,
|
||||
t_void *pmevent);
|
||||
|
||||
/** Initialize mlan_adapter structure */
|
||||
t_void wlan_init_adapter(IN pmlan_adapter pmadapter);
|
||||
|
@ -2637,18 +2696,16 @@ t_void wlan_init_adapter(IN pmlan_adapter pmadapter);
|
|||
/** Initialize mlan_private structure */
|
||||
mlan_status wlan_init_priv(IN pmlan_private priv);
|
||||
|
||||
mlan_status wlan_download_vdll_block(mlan_adapter *pmadapter,
|
||||
t_u8 *block, t_u16 block_len);
|
||||
mlan_status wlan_download_vdll_block(mlan_adapter *pmadapter, t_u8 *block,
|
||||
t_u16 block_len);
|
||||
mlan_status wlan_process_vdll_event(IN pmlan_private pmpriv,
|
||||
pmlan_buffer pevent);
|
||||
/** Process event */
|
||||
mlan_status wlan_process_event(pmlan_adapter pmadapter);
|
||||
|
||||
/** Prepare command */
|
||||
mlan_status wlan_prepare_cmd(IN pmlan_private priv,
|
||||
IN t_u16 cmd_no,
|
||||
IN t_u16 cmd_action,
|
||||
IN t_u32 cmd_oid,
|
||||
mlan_status wlan_prepare_cmd(IN pmlan_private priv, IN t_u16 cmd_no,
|
||||
IN t_u16 cmd_action, IN t_u32 cmd_oid,
|
||||
IN t_void *pioctl_buf, IN t_void *pdata_buf);
|
||||
|
||||
/** cmd timeout handler */
|
||||
|
@ -2660,8 +2717,7 @@ t_void wlan_cmd_timeout_func(t_void *function_context);
|
|||
* @param pmadapter Pointer to mlan_adapter
|
||||
* @return MTRUE/MFALSE;
|
||||
*/
|
||||
static inline t_u8
|
||||
wlan_is_tx_pending(mlan_adapter *pmadapter)
|
||||
static inline t_u8 wlan_is_tx_pending(mlan_adapter *pmadapter)
|
||||
{
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type) &&
|
||||
|
@ -2773,32 +2829,35 @@ mlan_status wlan_usb_deaggr_rx_pkt(IN pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
wlan_reset_usb_tx_aggr(IN pmlan_adapter pmadapter)
|
||||
static INLINE t_void wlan_reset_usb_tx_aggr(IN pmlan_adapter pmadapter)
|
||||
{
|
||||
t_s32 i = 0;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
ENTER();
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].
|
||||
paggr_lock);
|
||||
pcb->moal_spin_lock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].paggr_lock);
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i].aggr_hold_timer_is_set) {
|
||||
pcb->moal_stop_timer(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_usb->
|
||||
usb_tx_aggr[i].paggr_hold_timer);
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].
|
||||
aggr_hold_timer_is_set = MFALSE;
|
||||
pmadapter->pcard_usb
|
||||
->usb_tx_aggr[i]
|
||||
.paggr_hold_timer);
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_hold_timer_is_set = MFALSE;
|
||||
}
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i].aggr_ctrl.enable &&
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].pmbuf_aggr != MNULL) {
|
||||
wlan_write_data_complete(pmadapter, pmadapter->pcard_usb->usb_tx_aggr[i].pmbuf_aggr, MLAN_STATUS_FAILURE); /* did not get sent */
|
||||
wlan_write_data_complete(
|
||||
pmadapter,
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].pmbuf_aggr,
|
||||
MLAN_STATUS_FAILURE); /* did not get sent */
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].pmbuf_aggr = MNULL;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_len = 0;
|
||||
}
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].
|
||||
paggr_lock);
|
||||
pcb->moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].paggr_lock);
|
||||
}
|
||||
LEAVE();
|
||||
}
|
||||
|
@ -2877,8 +2936,8 @@ t_void wlan_check_ps_cond(mlan_adapter *pmadapter);
|
|||
/** handle command for enhanced power save mode */
|
||||
mlan_status wlan_cmd_enh_power_mode(pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action,
|
||||
IN t_u16 ps_bitmap, IN t_void *pdata_buf);
|
||||
IN t_u16 cmd_action, IN t_u16 ps_bitmap,
|
||||
IN t_void *pdata_buf);
|
||||
/** handle command resp for enhanced power save mode */
|
||||
mlan_status wlan_ret_enh_power_mode(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
|
@ -2886,8 +2945,7 @@ mlan_status wlan_ret_enh_power_mode(IN pmlan_private pmpriv,
|
|||
|
||||
/** handle commnand for cfg data */
|
||||
mlan_status wlan_cmd_cfg_data(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *pcmd,
|
||||
IN t_u16 cmd_action,
|
||||
IN HostCmd_DS_COMMAND *pcmd, IN t_u16 cmd_action,
|
||||
IN t_u32 cmd_oid, IN t_void *pdata_buf);
|
||||
/** handle command resp for cfg data */
|
||||
mlan_status wlan_ret_cfg_data(IN pmlan_private pmpriv,
|
||||
|
@ -2992,8 +3050,7 @@ mlan_status wlan_radio_ioctl_ant_cfg(IN pmlan_adapter pmadapter,
|
|||
|
||||
mlan_status wlan_cmd_tx_rate_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf,
|
||||
IN t_u16 cmd_action, IN t_void *pdata_buf,
|
||||
IN mlan_ioctl_req *pioctl_buf);
|
||||
mlan_status wlan_ret_tx_rate_cfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
|
@ -3018,8 +3075,8 @@ t_void wlan_host_sleep_wakeup_event(pmlan_private priv);
|
|||
|
||||
/** Prepares command of robustcoex */
|
||||
mlan_status wlan_cmd_robustcoex(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_u16 *pdata_buf);
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_u16 *pdata_buf);
|
||||
/** Set Robustcoex gpiocfg */
|
||||
mlan_status wlan_misc_robustcoex(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_ioctl_req pioctl_req);
|
||||
|
@ -3037,8 +3094,7 @@ mlan_status wlan_ret_dmcs_config(IN pmlan_private pmpriv,
|
|||
IN mlan_ioctl_req *pioctl_buf);
|
||||
|
||||
#if defined(PCIE)
|
||||
mlan_status wlan_cmd_ssu(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
mlan_status wlan_cmd_ssu(IN pmlan_private pmpriv, IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_u16 *pdata_buf);
|
||||
#endif
|
||||
|
||||
|
@ -3070,16 +3126,13 @@ mlan_status wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf);
|
|||
mlan_status wlan_ops_sta_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req);
|
||||
|
||||
/** cmd handler for station mode */
|
||||
mlan_status wlan_ops_sta_prepare_cmd(IN t_void *priv,
|
||||
IN t_u16 cmd_no,
|
||||
IN t_u16 cmd_action,
|
||||
IN t_u32 cmd_oid,
|
||||
mlan_status wlan_ops_sta_prepare_cmd(IN t_void *priv, IN t_u16 cmd_no,
|
||||
IN t_u16 cmd_action, IN t_u32 cmd_oid,
|
||||
IN t_void *pioctl_buf,
|
||||
IN t_void *pdata_buf, IN t_void *pcmd_buf);
|
||||
|
||||
/** cmdresp handler for station mode */
|
||||
mlan_status wlan_ops_sta_process_cmdresp(IN t_void *priv,
|
||||
IN t_u16 cmdresp_no,
|
||||
mlan_status wlan_ops_sta_process_cmdresp(IN t_void *priv, IN t_u16 cmdresp_no,
|
||||
IN t_void *pcmd_buf,
|
||||
IN t_void *pioctl);
|
||||
|
||||
|
@ -3100,8 +3153,7 @@ mlan_status wlan_ops_sta_init_cmd(IN t_void *priv, IN t_u8 first_bss);
|
|||
mlan_status wlan_flush_scan_table(IN pmlan_adapter pmadapter);
|
||||
|
||||
/** Scan for networks */
|
||||
mlan_status wlan_scan_networks(IN mlan_private *pmpriv,
|
||||
IN t_void *pioctl_buf,
|
||||
mlan_status wlan_scan_networks(IN mlan_private *pmpriv, IN t_void *pioctl_buf,
|
||||
IN wlan_user_scan_cfg *puser_scan_in);
|
||||
|
||||
/** Scan for specific SSID */
|
||||
|
@ -3134,29 +3186,28 @@ mlan_status wlan_handle_event_ext_scan_status(IN mlan_private *pmpriv,
|
|||
IN mlan_buffer *pmbuf);
|
||||
|
||||
/** check network compatibility */
|
||||
t_s32 wlan_is_network_compatible(IN mlan_private *pmpriv,
|
||||
IN t_u32 index, IN t_u32 mode);
|
||||
t_s32 wlan_is_network_compatible(IN mlan_private *pmpriv, IN t_u32 index,
|
||||
IN t_u32 mode);
|
||||
|
||||
/** Find an SSID in a list */
|
||||
t_s32 wlan_find_ssid_in_list(IN pmlan_private pmpriv,
|
||||
IN mlan_802_11_ssid *ssid,
|
||||
t_s32 wlan_find_ssid_in_list(IN pmlan_private pmpriv, IN mlan_802_11_ssid *ssid,
|
||||
IN t_u8 *bssid, IN t_u32 mode);
|
||||
|
||||
/** Find a BSSID in a list */
|
||||
t_s32 wlan_find_bssid_in_list(IN mlan_private *pmpriv,
|
||||
IN t_u8 *bssid, IN t_u32 mode);
|
||||
t_s32 wlan_find_bssid_in_list(IN mlan_private *pmpriv, IN t_u8 *bssid,
|
||||
IN t_u32 mode);
|
||||
|
||||
/** Find best network */
|
||||
mlan_status wlan_find_best_network(IN mlan_private *pmpriv,
|
||||
OUT mlan_ssid_bssid *preq_ssid_bssid);
|
||||
|
||||
/** Compare two SSIDs */
|
||||
t_s32 wlan_ssid_cmp(IN pmlan_adapter pmadapter,
|
||||
IN mlan_802_11_ssid *ssid1, IN mlan_802_11_ssid *ssid2);
|
||||
t_s32 wlan_ssid_cmp(IN pmlan_adapter pmadapter, IN mlan_802_11_ssid *ssid1,
|
||||
IN mlan_802_11_ssid *ssid2);
|
||||
|
||||
/** Associate */
|
||||
mlan_status wlan_associate(IN mlan_private *pmpriv,
|
||||
IN t_void *pioctl_buf, IN BSSDescriptor_t *pBSSDesc);
|
||||
mlan_status wlan_associate(IN mlan_private *pmpriv, IN t_void *pioctl_buf,
|
||||
IN BSSDescriptor_t *pBSSDesc);
|
||||
|
||||
/** Associate command handler */
|
||||
mlan_status wlan_cmd_802_11_associate(IN mlan_private *pmpriv,
|
||||
|
@ -3184,13 +3235,11 @@ mlan_status wlan_disconnect(IN mlan_private *pmpriv,
|
|||
IN mlan_deauth_param *deauth_param);
|
||||
|
||||
/** Ad-Hoc start */
|
||||
mlan_status wlan_adhoc_start(IN mlan_private *pmpriv,
|
||||
IN t_void *pioctl_buf,
|
||||
mlan_status wlan_adhoc_start(IN mlan_private *pmpriv, IN t_void *pioctl_buf,
|
||||
IN mlan_802_11_ssid *padhoc_ssid);
|
||||
|
||||
/** Ad-Hoc join */
|
||||
mlan_status wlan_adhoc_join(IN mlan_private *pmpriv,
|
||||
IN t_void *pioctl_buf,
|
||||
mlan_status wlan_adhoc_join(IN mlan_private *pmpriv, IN t_void *pioctl_buf,
|
||||
IN BSSDescriptor_t *pBSSDesc);
|
||||
|
||||
/** Ad-Hoc start command handler */
|
||||
|
@ -3225,10 +3274,9 @@ mlan_status wlan_ret_802_11_bgscan_query(IN mlan_private *pmpriv,
|
|||
IN mlan_ioctl_req *pioctl_buf);
|
||||
|
||||
/** Get Channel-Frequency-Power by band and channel */
|
||||
chan_freq_power_t *wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter,
|
||||
t_u8 band, t_u16 channel,
|
||||
region_chan_t
|
||||
*region_channel);
|
||||
chan_freq_power_t *
|
||||
wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter, t_u8 band,
|
||||
t_u16 channel, region_chan_t *region_channel);
|
||||
/** Find Channel-Frequency-Power by band and channel */
|
||||
chan_freq_power_t *wlan_find_cfp_by_band_and_channel(mlan_adapter *pmadapter,
|
||||
t_u8 band, t_u16 channel);
|
||||
|
@ -3264,8 +3312,8 @@ t_u8 wlan_is_rate_auto(mlan_private *pmpriv);
|
|||
/** Get rate index */
|
||||
int wlan_get_rate_index(pmlan_adapter pmadapter, t_u16 *rateBitmap, int size);
|
||||
mlan_status wlan_cmd_rxabortcfg(pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_void *pdata_buf);
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf);
|
||||
mlan_status wlan_ret_rxabortcfg(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
IN mlan_ioctl_req *pioctl_buf);
|
||||
|
@ -3369,16 +3417,13 @@ mlan_status wlan_11d_parse_dnld_countryinfo(mlan_private *pmpriv,
|
|||
/** Prepare 11D domain information for download */
|
||||
mlan_status wlan_11d_prepare_dnld_domain_info_cmd(mlan_private *pmpriv);
|
||||
/** Parse 11D country information into domain info */
|
||||
mlan_status wlan_11d_parse_domain_info(pmlan_adapter pmadapter,
|
||||
IEEEtypes_CountryInfoFullSet_t
|
||||
*country_info, t_u8 band,
|
||||
parsed_region_chan_11d_t
|
||||
*parsed_region_chan);
|
||||
mlan_status wlan_11d_parse_domain_info(
|
||||
pmlan_adapter pmadapter, IEEEtypes_CountryInfoFullSet_t *country_info,
|
||||
t_u8 band, parsed_region_chan_11d_t *parsed_region_chan);
|
||||
#endif /* STA_SUPPORT */
|
||||
#ifdef UAP_SUPPORT
|
||||
/** Handle 11D domain information from UAP */
|
||||
mlan_status wlan_11d_handle_uap_domain_info(mlan_private *pmpriv,
|
||||
t_u8 band,
|
||||
mlan_status wlan_11d_handle_uap_domain_info(mlan_private *pmpriv, t_u8 band,
|
||||
t_u8 *domain_tlv,
|
||||
t_void *pioctl_buf);
|
||||
#endif
|
||||
|
@ -3422,8 +3467,7 @@ t_u8 wlan_is_wmm_ie_present(pmlan_adapter pmadapter, t_u8 *pbuf, t_u16 buf_len);
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static INLINE int
|
||||
wlan_is_tx_pause(mlan_private *priv, t_u8 *ra)
|
||||
static INLINE int wlan_is_tx_pause(mlan_private *priv, t_u8 *ra)
|
||||
{
|
||||
sta_node *sta_ptr = MNULL;
|
||||
sta_ptr = wlan_get_station_entry(priv, ra);
|
||||
|
@ -3431,7 +3475,6 @@ wlan_is_tx_pause(mlan_private *priv, t_u8 *ra)
|
|||
return sta_ptr->tx_pause;
|
||||
return MFALSE;
|
||||
}
|
||||
|
||||
t_u16 wlan_update_ralist_tx_pause(pmlan_private priv, t_u8 *mac, t_u8 tx_pause);
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
|
@ -3494,8 +3537,7 @@ mlan_status wlan_ret_802_11_rf_antenna(IN pmlan_private pmpriv,
|
|||
IN HostCmd_DS_COMMAND *resp,
|
||||
IN mlan_ioctl_req *pioctl_buf);
|
||||
|
||||
mlan_status wlan_ret_reg_access(mlan_adapter *pmadapter,
|
||||
t_u16 type,
|
||||
mlan_status wlan_ret_reg_access(mlan_adapter *pmadapter, t_u16 type,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
IN mlan_ioctl_req *pioctl_buf);
|
||||
mlan_status wlan_ret_mem_access(IN pmlan_private pmpriv,
|
||||
|
@ -3509,10 +3551,10 @@ mlan_status wlan_reg_mem_ioctl_read_eeprom(IN pmlan_adapter pmadapter,
|
|||
mlan_status wlan_reg_mem_ioctl_mem_rw(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_cmd_reg_access(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_void *pdata_buf);
|
||||
mlan_status wlan_cmd_mem_access(IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_void *pdata_buf);
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf);
|
||||
mlan_status wlan_cmd_mem_access(IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf);
|
||||
mlan_status wlan_cmd_802_11_mac_address(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action);
|
||||
|
@ -3559,16 +3601,15 @@ void wlan_add_ext_capa_info_ie(IN mlan_private *pmpriv,
|
|||
#endif
|
||||
|
||||
mlan_status wlan_cmd_boot_sleep(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_void *pdata_buf);
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action,
|
||||
IN t_void *pdata_buf);
|
||||
|
||||
mlan_status wlan_ret_boot_sleep(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
IN mlan_ioctl_req *pioctl_buf);
|
||||
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
mlan_status wlan_cmd_crypto(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
mlan_status wlan_cmd_crypto(IN pmlan_private pmpriv, IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action, IN t_u16 *pdata_buf);
|
||||
|
||||
mlan_status wlan_ret_crypto(IN pmlan_private pmpriv,
|
||||
|
@ -3603,9 +3644,7 @@ mlan_status wlan_misc_ioctl_usb_aggr_ctrl(IN pmlan_adapter pmadapter,
|
|||
IN pmlan_ioctl_req pioctl_req);
|
||||
#endif
|
||||
|
||||
mlan_status
|
||||
|
||||
wlan_misc_ioctl_aggr_ctrl(IN pmlan_adapter pmadapter,
|
||||
mlan_status wlan_misc_ioctl_aggr_ctrl(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_cmd_packet_aggr_ctrl(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd,
|
||||
|
@ -3622,7 +3661,6 @@ mlan_status wlan_misc_ioctl_region(IN pmlan_adapter pmadapter,
|
|||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
mlan_status
|
||||
|
||||
wlan_misc_ioctl_rx_pkt_coalesce_config(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_ioctl_req pioctl_req);
|
||||
#endif
|
||||
|
@ -3686,8 +3724,8 @@ mlan_status wlan_misc_chan_reg_cfg(IN pmlan_adapter pmadapter,
|
|||
mlan_status wlan_get_cfpinfo(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_ioctl_req pioctl_req);
|
||||
|
||||
mlan_status wlan_cmd_get_tsf(pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action);
|
||||
mlan_status wlan_cmd_get_tsf(pmlan_private pmpriv, IN HostCmd_DS_COMMAND *cmd,
|
||||
IN t_u16 cmd_action);
|
||||
mlan_status wlan_ret_get_tsf(IN pmlan_private pmpriv,
|
||||
IN HostCmd_DS_COMMAND *resp,
|
||||
IN mlan_ioctl_req *pioctl_buf);
|
||||
|
@ -3715,8 +3753,7 @@ t_u8 wlan_ieee_rateid_to_mrvl_rateid(IN mlan_private *priv,
|
|||
IN t_u16 IeeeMacRate, IN t_u8 *dst_mac);
|
||||
t_u8 wlan_mrvl_rateid_to_ieee_rateid(IN t_u8 rate);
|
||||
|
||||
t_u8 wlan_get_center_freq_idx(IN mlan_private *pmpriv,
|
||||
IN t_u16 band,
|
||||
t_u8 wlan_get_center_freq_idx(IN mlan_private *pmpriv, IN t_u16 band,
|
||||
IN t_u32 pri_chan, IN t_u8 chan_bw);
|
||||
|
||||
mlan_status wlan_ret_chan_region_cfg(IN pmlan_private pmpriv,
|
||||
|
@ -3758,8 +3795,7 @@ mlan_status wlan_ret_set_get_low_power_mode_cfg(IN pmlan_private pmpriv,
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static INLINE t_u8
|
||||
queuing_ra_based(pmlan_private priv)
|
||||
static INLINE t_u8 queuing_ra_based(pmlan_private priv)
|
||||
{
|
||||
/*
|
||||
* Currently we assume if we are in Infra, then DA=RA. This might not be
|
||||
|
@ -3782,8 +3818,7 @@ queuing_ra_based(pmlan_private priv)
|
|||
*
|
||||
* @return Number of Rates copied
|
||||
*/
|
||||
static INLINE t_u32
|
||||
wlan_copy_rates(t_u8 *dest, t_u32 pos, t_u8 *src, int len)
|
||||
static INLINE t_u32 wlan_copy_rates(t_u8 *dest, t_u32 pos, t_u8 *src, int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -3803,12 +3838,12 @@ wlan_copy_rates(t_u8 *dest, t_u32 pos, t_u8 *src, int len)
|
|||
*
|
||||
* @return Length of string
|
||||
*/
|
||||
static INLINE t_u32
|
||||
wlan_strlen(const char *str)
|
||||
static INLINE t_u32 wlan_strlen(const char *str)
|
||||
{
|
||||
t_u32 i;
|
||||
|
||||
for (i = 0; str[i] != 0; i++) ;
|
||||
for (i = 0; str[i] != 0; i++)
|
||||
;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
@ -3820,8 +3855,7 @@ wlan_strlen(const char *str)
|
|||
*
|
||||
* @return Non zero if chr is a hex, else 0
|
||||
*/
|
||||
static INLINE t_u32
|
||||
wlan_isxdigit(t_u8 chr)
|
||||
static INLINE t_u32 wlan_isxdigit(t_u8 chr)
|
||||
{
|
||||
return (chr <= 'f' && chr >= 'a') || (chr <= 'F' && chr >= 'A') ||
|
||||
(chr <= '9' && chr >= '0');
|
||||
|
@ -3834,8 +3868,7 @@ wlan_isxdigit(t_u8 chr)
|
|||
*
|
||||
* @return Non zero if chr is space etc, else 0
|
||||
*/
|
||||
static INLINE t_u32
|
||||
wlan_isspace(t_u8 chr)
|
||||
static INLINE t_u32 wlan_isspace(t_u8 chr)
|
||||
{
|
||||
return chr <= ' ' && (chr == ' ' || (chr <= 13 && chr >= 9));
|
||||
}
|
||||
|
@ -3866,14 +3899,12 @@ t_void wlan_delay_func(mlan_adapter *pmadapter, t_u32 delay, t_delay_unit u);
|
|||
* @return MTRUE -- cmd pending
|
||||
* MFALSE -- no pending cmd
|
||||
*/
|
||||
static INLINE int
|
||||
wlan_is_cmd_pending(mlan_adapter *pmadapter)
|
||||
static INLINE int wlan_is_cmd_pending(mlan_adapter *pmadapter)
|
||||
{
|
||||
int ret;
|
||||
cmd_ctrl_node *pcmd_node = MNULL;
|
||||
wlan_request_cmd_lock(pmadapter);
|
||||
pcmd_node =
|
||||
(cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle,
|
||||
pcmd_node = (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle,
|
||||
&pmadapter->cmd_pending_q,
|
||||
MNULL, MNULL);
|
||||
if (pcmd_node)
|
||||
|
@ -3896,8 +3927,8 @@ wlan_is_cmd_pending(mlan_adapter *pmadapter)
|
|||
*
|
||||
* @return Pointer to mlan_private
|
||||
*/
|
||||
static INLINE mlan_private *
|
||||
wlan_get_priv_by_id(mlan_adapter *pmadapter, t_u32 bss_num, t_u32 bss_type)
|
||||
static INLINE mlan_private *wlan_get_priv_by_id(mlan_adapter *pmadapter,
|
||||
t_u32 bss_num, t_u32 bss_type)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -3920,8 +3951,8 @@ wlan_get_priv_by_id(mlan_adapter *pmadapter, t_u32 bss_num, t_u32 bss_type)
|
|||
*
|
||||
* @return Pointer to mlan_private
|
||||
*/
|
||||
static INLINE mlan_private *
|
||||
wlan_get_priv(mlan_adapter *pmadapter, mlan_bss_role bss_role)
|
||||
static INLINE mlan_private *wlan_get_priv(mlan_adapter *pmadapter,
|
||||
mlan_bss_role bss_role)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -4061,9 +4092,9 @@ wlan_get_privs_by_cond(mlan_adapter *pmadapter,
|
|||
* @param check_cond_2 Function pointer to second condition to check.
|
||||
* @param and_conditions If MTRUE, both conditions must be met (AND),
|
||||
* else either condition can be met (OR).
|
||||
* @param ppriv_list Output param. Externally supplied array of mlan_private*
|
||||
* to hold priv's that test positive with check_cond.
|
||||
* Array size should be at least pmadapter->priv_num.
|
||||
* @param ppriv_list Output param. Externally supplied array of
|
||||
* mlan_private* to hold priv's that test positive with check_cond. Array size
|
||||
* should be at least pmadapter->priv_num.
|
||||
*
|
||||
* @return Number of privs in ppriv_list
|
||||
*
|
||||
|
|
|
@ -63,8 +63,7 @@ static const char *meas_type_str[WLAN_MEAS_NUM_TYPES] = {
|
|||
*
|
||||
* @return Constant string representing measurement type
|
||||
*/
|
||||
static const char *
|
||||
wlan_meas_get_meas_type_str(MeasType_t meas_type)
|
||||
static const char *wlan_meas_get_meas_type_str(MeasType_t meas_type)
|
||||
{
|
||||
if (meas_type <= WLAN_MEAS_11H_MAX_TYPE)
|
||||
return meas_type_str[meas_type];
|
||||
|
@ -80,8 +79,7 @@ wlan_meas_get_meas_type_str(MeasType_t meas_type)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static
|
||||
void
|
||||
static void
|
||||
wlan_meas_dump_meas_req(const HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req)
|
||||
{
|
||||
ENTER();
|
||||
|
@ -106,7 +104,8 @@ wlan_meas_dump_meas_req(const HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req)
|
|||
|
||||
switch (pmeas_req->meas_type) {
|
||||
case WLAN_MEAS_BASIC:
|
||||
/* Lazy cheat, fields of bas, cca, rpi union match on the request */
|
||||
/* Lazy cheat, fields of bas, cca, rpi union match on the
|
||||
* request */
|
||||
PRINTM(MINFO, "Meas: Req: chan: %u\n",
|
||||
pmeas_req->req.basic.channel);
|
||||
PRINTM(MINFO, "Meas: Req: strt: %llu\n",
|
||||
|
@ -130,8 +129,7 @@ wlan_meas_dump_meas_req(const HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static
|
||||
void
|
||||
static void
|
||||
wlan_meas_dump_meas_rpt(const HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt)
|
||||
{
|
||||
MeasType_t type;
|
||||
|
@ -197,8 +195,7 @@ wlan_meas_dump_meas_rpt(const HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static int
|
||||
wlan_meas_cmdresp_get_report(mlan_private *pmpriv,
|
||||
static int wlan_meas_cmdresp_get_report(mlan_private *pmpriv,
|
||||
const HostCmd_DS_COMMAND *resp)
|
||||
{
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
|
@ -206,8 +203,8 @@ wlan_meas_cmdresp_get_report(mlan_private *pmpriv,
|
|||
|
||||
ENTER();
|
||||
|
||||
PRINTM(MINFO, "Meas: Rpt: %#x-%u, Seq=%u, Ret=%u\n",
|
||||
resp->command, resp->size, resp->seq_num, resp->result);
|
||||
PRINTM(MINFO, "Meas: Rpt: %#x-%u, Seq=%u, Ret=%u\n", resp->command,
|
||||
resp->size, resp->seq_num, resp->result);
|
||||
|
||||
/* Debug displays the measurement report */
|
||||
wlan_meas_dump_meas_rpt(pmeas_rpt);
|
||||
|
@ -216,16 +213,16 @@ wlan_meas_cmdresp_get_report(mlan_private *pmpriv,
|
|||
* Check if we are pending on a measurement report and it matches
|
||||
* the dialog token of the received report:
|
||||
*/
|
||||
if (pmadapter->state_meas.meas_rpt_pend_on
|
||||
&& pmadapter->state_meas.meas_rpt_pend_on ==
|
||||
pmeas_rpt->dialog_token) {
|
||||
if (pmadapter->state_meas.meas_rpt_pend_on &&
|
||||
pmadapter->state_meas.meas_rpt_pend_on == pmeas_rpt->dialog_token) {
|
||||
PRINTM(MINFO, "Meas: Rpt: RCV'd Pend on meas #%d\n",
|
||||
pmadapter->state_meas.meas_rpt_pend_on);
|
||||
|
||||
/* Clear the pending report indicator */
|
||||
pmadapter->state_meas.meas_rpt_pend_on = 0;
|
||||
|
||||
/* Copy the received report into the measurement state for retrieval */
|
||||
/* Copy the received report into the measurement state for
|
||||
* retrieval */
|
||||
memcpy_ext(pmadapter, &pmadapter->state_meas.meas_rpt_returned,
|
||||
pmeas_rpt,
|
||||
sizeof(pmadapter->state_meas.meas_rpt_returned),
|
||||
|
@ -252,9 +249,9 @@ wlan_meas_cmdresp_get_report(mlan_private *pmpriv,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static int
|
||||
wlan_meas_cmd_request(mlan_private *pmpriv,
|
||||
HostCmd_DS_COMMAND *pcmd_ptr, const void *pinfo_buf)
|
||||
static int wlan_meas_cmd_request(mlan_private *pmpriv,
|
||||
HostCmd_DS_COMMAND *pcmd_ptr,
|
||||
const void *pinfo_buf)
|
||||
{
|
||||
const HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req =
|
||||
(HostCmd_DS_MEASUREMENT_REQUEST *)pinfo_buf;
|
||||
|
@ -268,9 +265,8 @@ wlan_meas_cmd_request(mlan_private *pmpriv,
|
|||
sizeof(pcmd_ptr->params.meas_req),
|
||||
sizeof(pcmd_ptr->params.meas_req));
|
||||
|
||||
PRINTM(MINFO, "Meas: Req: %#x-%u, Seq=%u, Ret=%u\n",
|
||||
pcmd_ptr->command, pcmd_ptr->size, pcmd_ptr->seq_num,
|
||||
pcmd_ptr->result);
|
||||
PRINTM(MINFO, "Meas: Req: %#x-%u, Seq=%u, Ret=%u\n", pcmd_ptr->command,
|
||||
pcmd_ptr->size, pcmd_ptr->seq_num, pcmd_ptr->result);
|
||||
|
||||
wlan_meas_dump_meas_req(pmeas_req);
|
||||
|
||||
|
@ -293,8 +289,8 @@ wlan_meas_cmd_request(mlan_private *pmpriv,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static int
|
||||
wlan_meas_cmd_get_report(mlan_private *pmpriv, HostCmd_DS_COMMAND *pcmd_ptr)
|
||||
static int wlan_meas_cmd_get_report(mlan_private *pmpriv,
|
||||
HostCmd_DS_COMMAND *pcmd_ptr)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -348,10 +344,10 @@ wlan_meas_cmd_get_report(mlan_private *pmpriv, HostCmd_DS_COMMAND *pcmd_ptr)
|
|||
* the timeout expires
|
||||
* - Error return from wlan_prepare_cmd routine otherwise
|
||||
*/
|
||||
int
|
||||
wlan_meas_util_send_req(mlan_private *pmpriv,
|
||||
int wlan_meas_util_send_req(mlan_private *pmpriv,
|
||||
HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req,
|
||||
t_u32 wait_for_resp_timeout, pmlan_ioctl_req pioctl_req,
|
||||
t_u32 wait_for_resp_timeout,
|
||||
pmlan_ioctl_req pioctl_req,
|
||||
HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt)
|
||||
{
|
||||
static t_u8 auto_dialog_tok;
|
||||
|
@ -361,18 +357,19 @@ wlan_meas_util_send_req(mlan_private *pmpriv,
|
|||
ENTER();
|
||||
|
||||
/* If dialogTok was set to 0 or not provided, autoset */
|
||||
pmeas_req->dialog_token = (pmeas_req->dialog_token ?
|
||||
pmeas_req->dialog_token : ++auto_dialog_tok);
|
||||
pmeas_req->dialog_token =
|
||||
(pmeas_req->dialog_token ? pmeas_req->dialog_token :
|
||||
++auto_dialog_tok);
|
||||
|
||||
/* Check for rollover of the dialog token. Avoid using 0 as a token */
|
||||
pmeas_req->dialog_token = (pmeas_req->dialog_token ?
|
||||
pmeas_req->dialog_token : 1);
|
||||
pmeas_req->dialog_token =
|
||||
(pmeas_req->dialog_token ? pmeas_req->dialog_token : 1);
|
||||
|
||||
/*
|
||||
* If the request is to pend waiting for the result, set the dialog token
|
||||
* of this measurement request in the state structure. The measurement
|
||||
* report handling routines can then check the incoming measurement
|
||||
* reports for a match with this dialog token.
|
||||
* If the request is to pend waiting for the result, set the dialog
|
||||
* token of this measurement request in the state structure. The
|
||||
* measurement report handling routines can then check the incoming
|
||||
* measurement reports for a match with this dialog token.
|
||||
*/
|
||||
if (wait_for_resp_timeout) {
|
||||
pmeas_state->meas_rpt_pend_on = pmeas_req->dialog_token;
|
||||
|
@ -382,8 +379,8 @@ wlan_meas_util_send_req(mlan_private *pmpriv,
|
|||
|
||||
/* Send the measurement request to the firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_MEASUREMENT_REQUEST,
|
||||
HostCmd_ACT_GEN_SET,
|
||||
0, (t_void *)pioctl_req, (void *)pmeas_req);
|
||||
HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req,
|
||||
(void *)pmeas_req);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -407,9 +404,8 @@ wlan_meas_util_send_req(mlan_private *pmpriv,
|
|||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*
|
||||
*/
|
||||
int
|
||||
wlan_meas_cmd_process(mlan_private *pmpriv,
|
||||
HostCmd_DS_COMMAND *pcmd_ptr, const void *pinfo_buf)
|
||||
int wlan_meas_cmd_process(mlan_private *pmpriv, HostCmd_DS_COMMAND *pcmd_ptr,
|
||||
const void *pinfo_buf)
|
||||
{
|
||||
int ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
|
@ -446,8 +442,8 @@ wlan_meas_cmd_process(mlan_private *pmpriv,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
int
|
||||
wlan_meas_cmdresp_process(mlan_private *pmpriv, const HostCmd_DS_COMMAND *resp)
|
||||
int wlan_meas_cmdresp_process(mlan_private *pmpriv,
|
||||
const HostCmd_DS_COMMAND *resp)
|
||||
{
|
||||
int ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
|
|
|
@ -37,11 +37,10 @@ Change Log:
|
|||
#include "mlan_fw.h"
|
||||
|
||||
/* Send a given measurement request to the firmware, report back the result */
|
||||
extern int
|
||||
|
||||
wlan_meas_util_send_req(mlan_private *pmpriv,
|
||||
extern int wlan_meas_util_send_req(mlan_private *pmpriv,
|
||||
HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req,
|
||||
t_u32 wait_for_resp_timeout, pmlan_ioctl_req pioctl_req,
|
||||
t_u32 wait_for_resp_timeout,
|
||||
pmlan_ioctl_req pioctl_req,
|
||||
HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt);
|
||||
|
||||
/* Setup a measurement command before it is sent to the firmware */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -84,7 +84,8 @@ Change log:
|
|||
#define ADMA_SRC_RW_PTR 0x0014
|
||||
/** destination rd/wr pointer */
|
||||
#define ADMA_DST_RW_PTR 0x0018
|
||||
/** interrupt direction mapping reg, for each virtual Q, used for dual-descriptor only, only valid for Q0 */
|
||||
/** interrupt direction mapping reg, for each virtual Q, used for
|
||||
* dual-descriptor only, only valid for Q0 */
|
||||
#define ADMA_INT_MAPPING 0x001C
|
||||
/** destination interrupt to device */
|
||||
#define DEST_INT_TO_DEVICE MBIT(0)
|
||||
|
@ -112,7 +113,8 @@ Change log:
|
|||
#define ADMA_MSI_LEGACY_DST_DMA_DONE_INT_BYPASS_EN MBIT(22)
|
||||
/** ADMA_MSI_LEGACY_SRC_DMA_DONE_INT_BYPASS_EN */
|
||||
#define ADMA_MSI_LEGACY_SRC_DMA_DONE_INT_BYPASS_EN MBIT(21)
|
||||
/* If this bit is set, MSIX trigger event will be from DST, other wise MSIX trigger event will be from SRC */
|
||||
/* If this bit is set, MSIX trigger event will be from DST, other wise MSIX
|
||||
* trigger event will be from SRC */
|
||||
#define ADMA_MSIX_INT_SRC_DST_SEL MBIT(20)
|
||||
/** Enable MSI/Legacy for this Queue */
|
||||
#define ADMA_MSI_LEGACY_ENABLE MBIT(19)
|
||||
|
@ -306,17 +308,15 @@ Change log:
|
|||
#define PCIE9098_HOST_INTR_CMD_DNLD MBIT(7)
|
||||
|
||||
/** Interrupt mask for host */
|
||||
#define PCIE9098_HOST_INTR_MASK (PCIE9098_HOST_INTR_DNLD_DONE | \
|
||||
PCIE9098_HOST_INTR_UPLD_RDY | \
|
||||
PCIE9098_HOST_INTR_CMD_DONE | \
|
||||
PCIE9098_HOST_INTR_CMD_DNLD | \
|
||||
#define PCIE9098_HOST_INTR_MASK \
|
||||
(PCIE9098_HOST_INTR_DNLD_DONE | PCIE9098_HOST_INTR_UPLD_RDY | \
|
||||
PCIE9098_HOST_INTR_CMD_DONE | PCIE9098_HOST_INTR_CMD_DNLD | \
|
||||
PCIE9098_HOST_INTR_EVENT_RDY)
|
||||
|
||||
/** Interrupt select mask for host */
|
||||
#define PCIE9098_HOST_INTR_SEL_MASK (PCIE9098_HOST_INTR_DNLD_DONE | \
|
||||
PCIE9098_HOST_INTR_UPLD_RDY | \
|
||||
PCIE9098_HOST_INTR_CMD_DONE | \
|
||||
PCIE9098_HOST_INTR_EVENT_RDY)
|
||||
#define PCIE9098_HOST_INTR_SEL_MASK \
|
||||
(PCIE9098_HOST_INTR_DNLD_DONE | PCIE9098_HOST_INTR_UPLD_RDY | \
|
||||
PCIE9098_HOST_INTR_CMD_DONE | PCIE9098_HOST_INTR_EVENT_RDY)
|
||||
#endif
|
||||
|
||||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
|
@ -408,9 +408,8 @@ Change log:
|
|||
/** Event ready interrupt for host */
|
||||
#define HOST_INTR_EVENT_RDY MBIT(3)
|
||||
/** Interrupt mask for host */
|
||||
#define HOST_INTR_MASK (HOST_INTR_DNLD_DONE | \
|
||||
HOST_INTR_UPLD_RDY | \
|
||||
HOST_INTR_CMD_DONE | \
|
||||
#define HOST_INTR_MASK \
|
||||
(HOST_INTR_DNLD_DONE | HOST_INTR_UPLD_RDY | HOST_INTR_CMD_DONE | \
|
||||
HOST_INTR_EVENT_RDY)
|
||||
|
||||
/** Lower 32bits command address holding register */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -67,9 +67,8 @@ Change log:
|
|||
/** Host Control Registers : Cmd port download interrupt mask */
|
||||
#define CMD_PORT_DNLD_INT_MASK (0x1U << 7)
|
||||
/** Enable Host interrupt mask */
|
||||
#define HIM_ENABLE (UP_LD_HOST_INT_MASK | \
|
||||
DN_LD_HOST_INT_MASK | \
|
||||
CMD_PORT_UPLD_INT_MASK | \
|
||||
#define HIM_ENABLE \
|
||||
(UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK | CMD_PORT_UPLD_INT_MASK | \
|
||||
CMD_PORT_DNLD_INT_MASK)
|
||||
/** Disable Host interrupt mask */
|
||||
#define HIM_DISABLE 0xff
|
||||
|
@ -172,11 +171,14 @@ Change log:
|
|||
|
||||
/** SDIO Tx aggregation buffer room for next packet ? */
|
||||
#define MP_TX_AGGR_BUF_HAS_ROOM(a, mbuf, len) \
|
||||
(((a->pcard_sd->mpa_tx.buf_len) + len) <= (a->pcard_sd->mpa_tx.buf_size))
|
||||
(((a->pcard_sd->mpa_tx.buf_len) + len) <= \
|
||||
(a->pcard_sd->mpa_tx.buf_size))
|
||||
|
||||
/** Copy current packet (SDIO Tx aggregation buffer) to SDIO buffer */
|
||||
#define MP_TX_AGGR_BUF_PUT(a, mbuf, port) do { \
|
||||
pmadapter->callbacks.moal_memmove(a->pmoal_handle, \
|
||||
#define MP_TX_AGGR_BUF_PUT(a, mbuf, port) \
|
||||
do { \
|
||||
pmadapter->callbacks.moal_memmove( \
|
||||
a->pmoal_handle, \
|
||||
&a->pcard_sd->mpa_tx.buf[a->pcard_sd->mpa_tx.buf_len], \
|
||||
mbuf->pbuf + mbuf->data_offset, mbuf->data_len); \
|
||||
a->pcard_sd->mpa_tx.buf_len += mbuf->data_len; \
|
||||
|
@ -189,11 +191,13 @@ Change log:
|
|||
a->pcard_sd->mpa_tx.pkt_cnt++; \
|
||||
} while (0)
|
||||
|
||||
#define MP_TX_AGGR_BUF_PUT_SG(a, mbuf, port) do { \
|
||||
#define MP_TX_AGGR_BUF_PUT_SG(a, mbuf, port) \
|
||||
do { \
|
||||
a->pcard_sd->mpa_tx.buf_len += mbuf->data_len; \
|
||||
a->pcard_sd->mpa_tx.mp_wr_info[a->pcard_sd->mpa_tx.pkt_cnt] = \
|
||||
*(t_u16 *)(mbuf->pbuf + mbuf->data_offset); \
|
||||
a->pcard_sd->mpa_tx.mbuf_arr[a->pcard_sd->mpa_tx.pkt_cnt] = mbuf; \
|
||||
a->pcard_sd->mpa_tx.mbuf_arr[a->pcard_sd->mpa_tx.pkt_cnt] = \
|
||||
mbuf; \
|
||||
if (!a->pcard_sd->mpa_tx.pkt_cnt) { \
|
||||
a->pcard_sd->mpa_tx.start_port = port; \
|
||||
} \
|
||||
|
@ -201,12 +205,14 @@ Change log:
|
|||
a->pcard_sd->mpa_tx.pkt_cnt++; \
|
||||
} while (0)
|
||||
/** SDIO Tx aggregation limit ? */
|
||||
#define MP_TX_AGGR_PKT_LIMIT_REACHED(a) ((a->pcard_sd->mpa_tx.pkt_cnt) \
|
||||
== (a->pcard_sd->mpa_tx.pkt_aggr_limit))
|
||||
#define MP_TX_AGGR_PKT_LIMIT_REACHED(a) \
|
||||
((a->pcard_sd->mpa_tx.pkt_cnt) == (a->pcard_sd->mpa_tx.pkt_aggr_limit))
|
||||
|
||||
/** Reset SDIO Tx aggregation buffer parameters */
|
||||
#define MP_TX_AGGR_BUF_RESET(a) do { \
|
||||
memset(a, a->pcard_sd->mpa_tx.mp_wr_info, 0, sizeof(a->pcard_sd->mpa_tx.mp_wr_info)); \
|
||||
#define MP_TX_AGGR_BUF_RESET(a) \
|
||||
do { \
|
||||
memset(a, a->pcard_sd->mpa_tx.mp_wr_info, 0, \
|
||||
sizeof(a->pcard_sd->mpa_tx.mp_wr_info)); \
|
||||
a->pcard_sd->mpa_tx.pkt_cnt = 0; \
|
||||
a->pcard_sd->mpa_tx.buf_len = 0; \
|
||||
a->pcard_sd->mpa_tx.ports = 0; \
|
||||
|
@ -214,8 +220,8 @@ Change log:
|
|||
} while (0)
|
||||
|
||||
/** SDIO Rx aggregation limit ? */
|
||||
#define MP_RX_AGGR_PKT_LIMIT_REACHED(a) (a->pcard_sd->mpa_rx.pkt_cnt \
|
||||
== a->pcard_sd->mpa_rx.pkt_aggr_limit)
|
||||
#define MP_RX_AGGR_PKT_LIMIT_REACHED(a) \
|
||||
(a->pcard_sd->mpa_rx.pkt_cnt == a->pcard_sd->mpa_rx.pkt_aggr_limit)
|
||||
|
||||
/** SDIO Rx aggregation port limit ? */
|
||||
/** this is for test only, because port 0 is reserved for control port */
|
||||
|
@ -225,8 +231,8 @@ Change log:
|
|||
/* note: hw rx wraps round only after port (MAX_PORT-1) */
|
||||
#define MP_RX_AGGR_PORT_LIMIT_REACHED(a) \
|
||||
(((a->pcard_sd->curr_rd_port < a->pcard_sd->mpa_rx.start_port) && \
|
||||
(((MAX_PORT - a->pcard_sd->mpa_rx.start_port) + a->pcard_sd->curr_rd_port) \
|
||||
>= (a->pcard_sd->mp_end_port >> 1))) || \
|
||||
(((MAX_PORT - a->pcard_sd->mpa_rx.start_port) + \
|
||||
a->pcard_sd->curr_rd_port) >= (a->pcard_sd->mp_end_port >> 1))) || \
|
||||
((a->pcard_sd->curr_rd_port - a->pcard_sd->mpa_rx.start_port) >= \
|
||||
(a->pcard_sd->mp_end_port >> 1)))
|
||||
|
||||
|
@ -238,19 +244,23 @@ Change log:
|
|||
((a->pcard_sd->mpa_rx.buf_len + rx_len) <= a->pcard_sd->mpa_rx.buf_size)
|
||||
|
||||
/** Prepare to copy current packet from card to SDIO Rx aggregation buffer */
|
||||
#define MP_RX_AGGR_SETUP(a, mbuf, port, rx_len) do { \
|
||||
#define MP_RX_AGGR_SETUP(a, mbuf, port, rx_len) \
|
||||
do { \
|
||||
a->pcard_sd->mpa_rx.buf_len += rx_len; \
|
||||
if (!a->pcard_sd->mpa_rx.pkt_cnt) { \
|
||||
a->pcard_sd->mpa_rx.start_port = port; \
|
||||
} \
|
||||
a->pcard_sd->mpa_rx.ports |= (1 << port); \
|
||||
a->pcard_sd->mpa_rx.mbuf_arr[a->pcard_sd->mpa_rx.pkt_cnt] = mbuf; \
|
||||
a->pcard_sd->mpa_rx.len_arr[a->pcard_sd->mpa_rx.pkt_cnt] = rx_len; \
|
||||
a->pcard_sd->mpa_rx.mbuf_arr[a->pcard_sd->mpa_rx.pkt_cnt] = \
|
||||
mbuf; \
|
||||
a->pcard_sd->mpa_rx.len_arr[a->pcard_sd->mpa_rx.pkt_cnt] = \
|
||||
rx_len; \
|
||||
a->pcard_sd->mpa_rx.pkt_cnt++; \
|
||||
} while (0)
|
||||
|
||||
/** Reset SDIO Rx aggregation buffer parameters */
|
||||
#define MP_RX_AGGR_BUF_RESET(a) do { \
|
||||
#define MP_RX_AGGR_BUF_RESET(a) \
|
||||
do { \
|
||||
a->pcard_sd->mpa_rx.pkt_cnt = 0; \
|
||||
a->pcard_sd->mpa_rx.buf_len = 0; \
|
||||
a->pcard_sd->mpa_rx.ports = 0; \
|
||||
|
@ -272,7 +282,8 @@ static const struct _mlan_sdio_card_reg mlan_reg_sd8887 = {
|
|||
.host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK |
|
||||
CMD_PORT_UPLD_INT_MASK | CMD_PORT_DNLD_INT_MASK,
|
||||
.host_int_status = DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS |
|
||||
DN_LD_CMD_PORT_HOST_INT_STATUS | UP_LD_CMD_PORT_HOST_INT_STATUS,
|
||||
DN_LD_CMD_PORT_HOST_INT_STATUS |
|
||||
UP_LD_CMD_PORT_HOST_INT_STATUS,
|
||||
.status_reg_0 = 0x90,
|
||||
.status_reg_1 = 0x91,
|
||||
.sdio_int_mask = 0xff,
|
||||
|
@ -341,7 +352,8 @@ static const struct _mlan_sdio_card_reg mlan_reg_sd8897 = {
|
|||
.host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK |
|
||||
CMD_PORT_UPLD_INT_MASK | CMD_PORT_DNLD_INT_MASK,
|
||||
.host_int_status = DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS |
|
||||
DN_LD_CMD_PORT_HOST_INT_STATUS | UP_LD_CMD_PORT_HOST_INT_STATUS,
|
||||
DN_LD_CMD_PORT_HOST_INT_STATUS |
|
||||
UP_LD_CMD_PORT_HOST_INT_STATUS,
|
||||
.status_reg_0 = 0xC0,
|
||||
.status_reg_1 = 0xC1,
|
||||
.sdio_int_mask = 0xff,
|
||||
|
@ -400,7 +412,8 @@ static const struct _mlan_card_info mlan_card_info_sd8897 = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(SD8977) || defined(SD8997) || defined(SD8987) || defined(SD9098) || defined(SD9097) || defined(SD8978)
|
||||
#if defined(SD8977) || defined(SD8997) || defined(SD8987) || \
|
||||
defined(SD9098) || defined(SD9097) || defined(SD8978)
|
||||
static const struct _mlan_sdio_card_reg mlan_reg_sd8977_sd8997 = {
|
||||
.start_rd_port = 0,
|
||||
.start_wr_port = 0,
|
||||
|
@ -410,7 +423,8 @@ static const struct _mlan_sdio_card_reg mlan_reg_sd8977_sd8997 = {
|
|||
.host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK |
|
||||
CMD_PORT_UPLD_INT_MASK | CMD_PORT_DNLD_INT_MASK,
|
||||
.host_int_status = DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS |
|
||||
DN_LD_CMD_PORT_HOST_INT_STATUS | UP_LD_CMD_PORT_HOST_INT_STATUS,
|
||||
DN_LD_CMD_PORT_HOST_INT_STATUS |
|
||||
UP_LD_CMD_PORT_HOST_INT_STATUS,
|
||||
.status_reg_0 = 0xe8,
|
||||
.status_reg_1 = 0xe9,
|
||||
.sdio_int_mask = 0xff,
|
||||
|
|
|
@ -117,13 +117,11 @@ t_void (*assert_callback) (IN t_void *pmoal_handle, IN t_u32 cond) = MNULL;
|
|||
#endif
|
||||
|
||||
/** Global moal_print callback */
|
||||
t_void (*print_callback) (IN t_void *pmoal_handle,
|
||||
IN t_u32 level, IN char *pformat, IN ...
|
||||
) = MNULL;
|
||||
t_void (*print_callback)(IN t_void *pmoal_handle, IN t_u32 level,
|
||||
IN char *pformat, IN...) = MNULL;
|
||||
|
||||
/** Global moal_get_system_time callback */
|
||||
mlan_status (*get_sys_time_callback) (IN t_void *pmoal_handle,
|
||||
OUT t_u32 *psec,
|
||||
mlan_status (*get_sys_time_callback)(IN t_void *pmoal_handle, OUT t_u32 *psec,
|
||||
OUT t_u32 *pusec) = MNULL;
|
||||
|
||||
/** Global driver debug mit masks */
|
||||
|
@ -142,8 +140,7 @@ extern mlan_status wlan_get_usb_device(pmlan_adapter pmadapter);
|
|||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
*
|
||||
*/
|
||||
void
|
||||
wlan_process_pending_ioctl(mlan_adapter *pmadapter)
|
||||
void wlan_process_pending_ioctl(mlan_adapter *pmadapter)
|
||||
{
|
||||
pmlan_ioctl_req pioctl_buf;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
@ -158,11 +155,9 @@ wlan_process_pending_ioctl(mlan_adapter *pmadapter)
|
|||
|
||||
pcb = &pmadapter->callbacks;
|
||||
|
||||
while ((pioctl_buf =
|
||||
(pmlan_ioctl_req)util_dequeue_list(pmadapter->pmoal_handle,
|
||||
&pmadapter->ioctl_pending_q,
|
||||
pcb->moal_spin_lock,
|
||||
pcb->moal_spin_unlock))) {
|
||||
while ((pioctl_buf = (pmlan_ioctl_req)util_dequeue_list(
|
||||
pmadapter->pmoal_handle, &pmadapter->ioctl_pending_q,
|
||||
pcb->moal_spin_lock, pcb->moal_spin_unlock))) {
|
||||
switch (pioctl_buf->req_id) {
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
case MLAN_IOCTL_BSS:
|
||||
|
@ -194,7 +189,6 @@ wlan_process_pending_ioctl(mlan_adapter *pmadapter)
|
|||
}
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Global Functions
|
||||
********************************************************/
|
||||
|
@ -235,8 +229,7 @@ extern mlan_adapter_operations mlan_sdio_ops;
|
|||
* See Also
|
||||
* mlan_unregister
|
||||
*/
|
||||
mlan_status
|
||||
mlan_register(IN pmlan_device pmdevice, OUT t_void **ppmlan_adapter)
|
||||
mlan_status mlan_register(IN pmlan_device pmdevice, OUT t_void **ppmlan_adapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_adapter pmadapter = MNULL;
|
||||
|
@ -285,8 +278,8 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void **ppmlan_adapter)
|
|||
goto exit_register;
|
||||
}
|
||||
|
||||
pmdevice->callbacks.moal_memset(pmdevice->pmoal_handle, pmadapter,
|
||||
0, sizeof(mlan_adapter));
|
||||
pmdevice->callbacks.moal_memset(pmdevice->pmoal_handle, pmadapter, 0,
|
||||
sizeof(mlan_adapter));
|
||||
|
||||
pcb = &pmadapter->callbacks;
|
||||
|
||||
|
@ -467,6 +460,7 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void **ppmlan_adapter)
|
|||
pmadapter->rx_data_ep = pmdevice->rx_data_ep;
|
||||
}
|
||||
#endif
|
||||
pmadapter->init_para.dfs53cfg = pmdevice->dfs53cfg;
|
||||
pmadapter->priv_num = 0;
|
||||
pmadapter->priv[0] = MNULL;
|
||||
|
||||
|
@ -581,9 +575,7 @@ exit_register:
|
|||
* @return MLAN_STATUS_SUCCESS
|
||||
* The deregistration succeeded.
|
||||
*/
|
||||
mlan_status
|
||||
mlan_unregister(IN t_void *pmlan_adapter
|
||||
)
|
||||
mlan_status mlan_unregister(IN t_void *pmlan_adapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
||||
|
@ -633,8 +625,7 @@ mlan_unregister(IN t_void *pmlan_adapter
|
|||
* MLAN_STATUS_FAILURE
|
||||
* The firmware download failed.
|
||||
*/
|
||||
mlan_status
|
||||
mlan_dnld_fw(IN t_void *pmlan_adapter, IN pmlan_fw_image pmfw)
|
||||
mlan_status mlan_dnld_fw(IN t_void *pmlan_adapter, IN pmlan_fw_image pmfw)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
||||
|
@ -666,8 +657,8 @@ mlan_dnld_fw(IN t_void *pmlan_adapter, IN pmlan_fw_image pmfw)
|
|||
* @return MLAN_STATUS_SUCCESS
|
||||
*
|
||||
*/
|
||||
mlan_status
|
||||
mlan_set_init_param(IN t_void *pmlan_adapter, IN pmlan_init_param pparam)
|
||||
mlan_status mlan_set_init_param(IN t_void *pmlan_adapter,
|
||||
IN pmlan_init_param pparam)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
||||
|
@ -707,9 +698,7 @@ mlan_set_init_param(IN t_void *pmlan_adapter, IN pmlan_init_param pparam)
|
|||
* MLAN_STATUS_FAILURE
|
||||
* The firmware initialization failed.
|
||||
*/
|
||||
mlan_status
|
||||
mlan_init_fw(IN t_void *pmlan_adapter
|
||||
)
|
||||
mlan_status mlan_init_fw(IN t_void *pmlan_adapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
||||
|
@ -739,9 +728,7 @@ mlan_init_fw(IN t_void *pmlan_adapter
|
|||
* MLAN_STATUS_FAILURE
|
||||
* The firmware shutdown call failed.
|
||||
*/
|
||||
mlan_status
|
||||
mlan_shutdown_fw(IN t_void *pmlan_adapter
|
||||
)
|
||||
mlan_status mlan_shutdown_fw(IN t_void *pmlan_adapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_PENDING;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
||||
|
@ -781,22 +768,17 @@ mlan_shutdown_fw(IN t_void *pmlan_adapter
|
|||
|
||||
pcb = &pmadapter->callbacks;
|
||||
/** cancel pending ioctl */
|
||||
while ((pioctl_buf =
|
||||
(pmlan_ioctl_req)util_dequeue_list(pmadapter->pmoal_handle,
|
||||
&pmadapter->ioctl_pending_q,
|
||||
pcb->moal_spin_lock,
|
||||
pcb->moal_spin_unlock))) {
|
||||
while ((pioctl_buf = (pmlan_ioctl_req)util_dequeue_list(
|
||||
pmadapter->pmoal_handle, &pmadapter->ioctl_pending_q,
|
||||
pcb->moal_spin_lock, pcb->moal_spin_unlock))) {
|
||||
pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL;
|
||||
pcb->moal_ioctl_complete(pmadapter->pmoal_handle, pioctl_buf,
|
||||
MLAN_STATUS_FAILURE);
|
||||
}
|
||||
|
||||
while ((pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle,
|
||||
&pmadapter->
|
||||
rx_data_queue,
|
||||
pcb->moal_spin_lock,
|
||||
pcb->
|
||||
moal_spin_unlock))) {
|
||||
while ((pmbuf = (pmlan_buffer)util_dequeue_list(
|
||||
pmadapter->pmoal_handle, &pmadapter->rx_data_queue,
|
||||
pcb->moal_spin_lock, pcb->moal_spin_unlock))) {
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type))
|
||||
pcb->moal_recv_complete(pmadapter->pmoal_handle, pmbuf,
|
||||
|
@ -830,8 +812,7 @@ mlan_shutdown_fw(IN t_void *pmlan_adapter
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static t_void
|
||||
mlan_queue_main_work(mlan_adapter *pmadapter)
|
||||
static t_void mlan_queue_main_work(mlan_adapter *pmadapter)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
ENTER();
|
||||
|
@ -860,8 +841,7 @@ mlan_queue_main_work(mlan_adapter *pmadapter)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static t_void
|
||||
mlan_queue_rx_work(mlan_adapter *pmadapter)
|
||||
static t_void mlan_queue_rx_work(mlan_adapter *pmadapter)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
ENTER();
|
||||
|
@ -891,8 +871,7 @@ mlan_queue_rx_work(mlan_adapter *pmadapter)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
mlan_block_main_process(mlan_adapter *pmadapter, t_u8 block)
|
||||
void mlan_block_main_process(mlan_adapter *pmadapter, t_u8 block)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
|
@ -907,10 +886,9 @@ mlan_block_main_process(mlan_adapter *pmadapter, t_u8 block)
|
|||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmain_proc_lock);
|
||||
PRINTM(MEVENT, "wlan: wait main work done...\n");
|
||||
wlan_recv_event(wlan_get_priv
|
||||
(pmadapter, MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_FLUSH_MAIN_WORK,
|
||||
MNULL);
|
||||
wlan_recv_event(
|
||||
wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_FLUSH_MAIN_WORK, MNULL);
|
||||
} else {
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmain_proc_lock);
|
||||
|
@ -926,8 +904,7 @@ mlan_block_main_process(mlan_adapter *pmadapter, t_u8 block)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
mlan_block_rx_process(mlan_adapter *pmadapter, t_u8 block)
|
||||
void mlan_block_rx_process(mlan_adapter *pmadapter, t_u8 block)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->prx_proc_lock);
|
||||
|
@ -941,8 +918,8 @@ mlan_block_rx_process(mlan_adapter *pmadapter, t_u8 block)
|
|||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->prx_proc_lock);
|
||||
PRINTM(MEVENT, "wlan: wait rx work done...\n");
|
||||
wlan_recv_event(wlan_get_priv
|
||||
(pmadapter, MLAN_BSS_ROLE_ANY),
|
||||
wlan_recv_event(wlan_get_priv(pmadapter,
|
||||
MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_FLUSH_RX_WORK, MNULL);
|
||||
} else {
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
|
@ -959,8 +936,7 @@ mlan_block_rx_process(mlan_adapter *pmadapter, t_u8 block)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
mlan_rx_process(IN t_void *pmlan_adapter, IN t_u8 *rx_pkts)
|
||||
mlan_status mlan_rx_process(IN t_void *pmlan_adapter, IN t_u8 *rx_pkts)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
||||
|
@ -992,14 +968,12 @@ rx_process_start:
|
|||
while (MTRUE) {
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if (pmadapter->authenticator_priv) {
|
||||
if (IsAuthenticatorEnabled
|
||||
(pmadapter->authenticator_priv->psapriv)) {
|
||||
AuthenticatorKeyMgmtInit(pmadapter->
|
||||
authenticator_priv->
|
||||
psapriv,
|
||||
pmadapter->
|
||||
authenticator_priv->
|
||||
curr_addr);
|
||||
if (IsAuthenticatorEnabled(
|
||||
pmadapter->authenticator_priv->psapriv)) {
|
||||
AuthenticatorKeyMgmtInit(
|
||||
pmadapter->authenticator_priv->psapriv,
|
||||
pmadapter->authenticator_priv
|
||||
->curr_addr);
|
||||
pmadapter->authenticator_priv = MNULL;
|
||||
}
|
||||
}
|
||||
|
@ -1008,26 +982,23 @@ rx_process_start:
|
|||
pmadapter->flush_data = MFALSE;
|
||||
wlan_flush_rxreorder_tbl(pmadapter);
|
||||
}
|
||||
pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.
|
||||
plock);
|
||||
pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle,
|
||||
&pmadapter->
|
||||
rx_data_queue, MNULL,
|
||||
MNULL);
|
||||
pmadapter->callbacks.moal_spin_lock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
pmbuf = (pmlan_buffer)util_dequeue_list(
|
||||
pmadapter->pmoal_handle, &pmadapter->rx_data_queue,
|
||||
MNULL, MNULL);
|
||||
if (!pmbuf) {
|
||||
pmadapter->callbacks.moal_spin_unlock(pmadapter->
|
||||
pmoal_handle,
|
||||
pmadapter->
|
||||
rx_data_queue.
|
||||
plock);
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
break;
|
||||
}
|
||||
pmadapter->rx_pkts_queued--;
|
||||
rx_num++;
|
||||
pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.
|
||||
plock);
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
if (pmadapter->delay_task_flag &&
|
||||
(pmadapter->rx_pkts_queued < LOW_RX_PENDING)) {
|
||||
PRINTM(MEVENT, "Run\n");
|
||||
|
@ -1062,9 +1033,7 @@ exit_rx_proc:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
mlan_main_process(IN t_void *pmlan_adapter
|
||||
)
|
||||
mlan_status mlan_main_process(IN t_void *pmlan_adapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
||||
|
@ -1103,9 +1072,8 @@ process_start:
|
|||
}
|
||||
if (pmadapter->pending_disconnect_priv) {
|
||||
PRINTM(MEVENT, "Reset connect state\n");
|
||||
wlan_reset_connect_state(pmadapter->
|
||||
pending_disconnect_priv,
|
||||
MTRUE);
|
||||
wlan_reset_connect_state(
|
||||
pmadapter->pending_disconnect_priv, MTRUE);
|
||||
pmadapter->pending_disconnect_priv = MNULL;
|
||||
}
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
|
@ -1132,22 +1100,20 @@ process_start:
|
|||
(pmadapter->pm_wakeup_card_req &&
|
||||
!pmadapter->pm_wakeup_fw_try) &&
|
||||
(wlan_is_cmd_pending(pmadapter) ||
|
||||
!wlan_bypass_tx_list_empty(pmadapter)
|
||||
|| !wlan_wmm_lists_empty(pmadapter)
|
||||
)) {
|
||||
!wlan_bypass_tx_list_empty(pmadapter) ||
|
||||
!wlan_wmm_lists_empty(pmadapter))) {
|
||||
pmadapter->ops.wakeup_card(pmadapter, MTRUE);
|
||||
pmadapter->pm_wakeup_fw_try = MTRUE;
|
||||
continue;
|
||||
}
|
||||
if (IS_CARD_RX_RCVD(pmadapter)
|
||||
|| (!pmadapter->cmd_sent &&
|
||||
pmadapter->vdll_ctrl.pending_block)
|
||||
) {
|
||||
if (IS_CARD_RX_RCVD(pmadapter) ||
|
||||
(!pmadapter->cmd_sent &&
|
||||
pmadapter->vdll_ctrl.pending_block)) {
|
||||
pmadapter->data_received = MFALSE;
|
||||
if (pmadapter->hs_activated == MTRUE) {
|
||||
pmadapter->is_hs_configured = MFALSE;
|
||||
wlan_host_sleep_activated_event(wlan_get_priv
|
||||
(pmadapter,
|
||||
wlan_host_sleep_activated_event(
|
||||
wlan_get_priv(pmadapter,
|
||||
MLAN_BSS_ROLE_ANY),
|
||||
MFALSE);
|
||||
}
|
||||
|
@ -1155,31 +1121,33 @@ process_start:
|
|||
if (pmadapter->ps_state == PS_STATE_SLEEP)
|
||||
pmadapter->ps_state = PS_STATE_AWAKE;
|
||||
if (pmadapter->wakeup_fw_timer_is_set) {
|
||||
pcb->moal_stop_timer(pmadapter->pmoal_handle,
|
||||
pmadapter->
|
||||
pwakeup_fw_timer);
|
||||
pcb->moal_stop_timer(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->pwakeup_fw_timer);
|
||||
pmadapter->wakeup_fw_timer_is_set = MFALSE;
|
||||
}
|
||||
} else {
|
||||
/* We have tried to wakeup the card already */
|
||||
if (pmadapter->pm_wakeup_fw_try)
|
||||
break;
|
||||
/* Check if we need to confirm Sleep Request received previously */
|
||||
/* Check if we need to confirm Sleep Request received
|
||||
* previously */
|
||||
if (pmadapter->ps_state == PS_STATE_PRE_SLEEP)
|
||||
if (!pmadapter->cmd_sent && !pmadapter->curr_cmd
|
||||
&& !pmadapter->vdll_ctrl.pending_block)
|
||||
if (!pmadapter->cmd_sent &&
|
||||
!pmadapter->curr_cmd &&
|
||||
!pmadapter->vdll_ctrl.pending_block)
|
||||
wlan_check_ps_cond(pmadapter);
|
||||
if (pmadapter->ps_state != PS_STATE_AWAKE ||
|
||||
(pmadapter->tx_lock_flag == MTRUE))
|
||||
break;
|
||||
|
||||
if (pmadapter->data_sent
|
||||
|| (wlan_bypass_tx_list_empty(pmadapter) &&
|
||||
wlan_wmm_lists_empty(pmadapter))
|
||||
|| wlan_11h_radar_detected_tx_blocked(pmadapter)
|
||||
) {
|
||||
if (pmadapter->cmd_sent || pmadapter->curr_cmd
|
||||
|| !wlan_is_cmd_pending(pmadapter)) {
|
||||
if (pmadapter->data_sent ||
|
||||
(wlan_bypass_tx_list_empty(pmadapter) &&
|
||||
wlan_wmm_lists_empty(pmadapter)) ||
|
||||
wlan_11h_radar_detected_tx_blocked(pmadapter)) {
|
||||
if (pmadapter->cmd_sent ||
|
||||
pmadapter->curr_cmd ||
|
||||
!wlan_is_cmd_pending(pmadapter)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1191,7 +1159,8 @@ process_start:
|
|||
wlan_process_cmdresp(pmadapter);
|
||||
|
||||
/* call moal back when init_fw is done */
|
||||
if (pmadapter->hw_status == WlanHardwareStatusInitdone) {
|
||||
if (pmadapter->hw_status ==
|
||||
WlanHardwareStatusInitdone) {
|
||||
pmadapter->hw_status = WlanHardwareStatusReady;
|
||||
wlan_init_fw_complete(pmadapter);
|
||||
} else if (pmadapter->hw_status ==
|
||||
|
@ -1208,31 +1177,30 @@ process_start:
|
|||
wlan_process_event(pmadapter);
|
||||
}
|
||||
|
||||
/* Check if we need to confirm Sleep Request received previously */
|
||||
/* Check if we need to confirm Sleep Request received previously
|
||||
*/
|
||||
if (pmadapter->ps_state == PS_STATE_PRE_SLEEP)
|
||||
if (!pmadapter->cmd_sent && !pmadapter->curr_cmd
|
||||
&& !pmadapter->vdll_ctrl.pending_block)
|
||||
if (!pmadapter->cmd_sent && !pmadapter->curr_cmd &&
|
||||
!pmadapter->vdll_ctrl.pending_block)
|
||||
wlan_check_ps_cond(pmadapter);
|
||||
|
||||
/*
|
||||
* The ps_state may have been changed during processing of
|
||||
* Sleep Request event.
|
||||
*/
|
||||
if ((pmadapter->ps_state == PS_STATE_SLEEP)
|
||||
|| (pmadapter->ps_state == PS_STATE_PRE_SLEEP)
|
||||
|| (pmadapter->ps_state == PS_STATE_SLEEP_CFM)
|
||||
|| (pmadapter->tx_lock_flag == MTRUE)
|
||||
) {
|
||||
if ((pmadapter->ps_state == PS_STATE_SLEEP) ||
|
||||
(pmadapter->ps_state == PS_STATE_PRE_SLEEP) ||
|
||||
(pmadapter->ps_state == PS_STATE_SLEEP_CFM) ||
|
||||
(pmadapter->tx_lock_flag == MTRUE)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* in a case of race condition, download the VDLL block here */
|
||||
if (!pmadapter->cmd_sent && pmadapter->vdll_ctrl.pending_block) {
|
||||
wlan_download_vdll_block(pmadapter,
|
||||
pmadapter->vdll_ctrl.
|
||||
pending_block,
|
||||
pmadapter->vdll_ctrl.
|
||||
pending_block_len);
|
||||
if (!pmadapter->cmd_sent &&
|
||||
pmadapter->vdll_ctrl.pending_block) {
|
||||
wlan_download_vdll_block(
|
||||
pmadapter, pmadapter->vdll_ctrl.pending_block,
|
||||
pmadapter->vdll_ctrl.pending_block_len);
|
||||
pmadapter->vdll_ctrl.pending_block = MNULL;
|
||||
}
|
||||
if (!pmadapter->cmd_sent && !pmadapter->curr_cmd) {
|
||||
|
@ -1250,21 +1218,20 @@ process_start:
|
|||
wlan_process_bypass_tx(pmadapter);
|
||||
if (pmadapter->hs_activated == MTRUE) {
|
||||
pmadapter->is_hs_configured = MFALSE;
|
||||
wlan_host_sleep_activated_event(wlan_get_priv
|
||||
(pmadapter,
|
||||
wlan_host_sleep_activated_event(
|
||||
wlan_get_priv(pmadapter,
|
||||
MLAN_BSS_ROLE_ANY),
|
||||
MFALSE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!pmadapter->data_sent && !wlan_wmm_lists_empty(pmadapter)
|
||||
&& !wlan_11h_radar_detected_tx_blocked(pmadapter)
|
||||
) {
|
||||
if (!pmadapter->data_sent && !wlan_wmm_lists_empty(pmadapter) &&
|
||||
!wlan_11h_radar_detected_tx_blocked(pmadapter)) {
|
||||
wlan_wmm_process_tx(pmadapter);
|
||||
if (pmadapter->hs_activated == MTRUE) {
|
||||
pmadapter->is_hs_configured = MFALSE;
|
||||
wlan_host_sleep_activated_event(wlan_get_priv
|
||||
(pmadapter,
|
||||
wlan_host_sleep_activated_event(
|
||||
wlan_get_priv(pmadapter,
|
||||
MLAN_BSS_ROLE_ANY),
|
||||
MFALSE);
|
||||
}
|
||||
|
@ -1275,11 +1242,11 @@ process_start:
|
|||
!pmadapter->curr_cmd && !wlan_is_cmd_pending(pmadapter) &&
|
||||
wlan_bypass_tx_list_empty(pmadapter) &&
|
||||
wlan_wmm_lists_empty(pmadapter)) {
|
||||
if (wlan_send_null_packet
|
||||
(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_STA),
|
||||
if (wlan_send_null_packet(
|
||||
wlan_get_priv(pmadapter, MLAN_BSS_ROLE_STA),
|
||||
MRVDRV_TxPD_POWER_MGMT_NULL_PACKET |
|
||||
MRVDRV_TxPD_POWER_MGMT_LAST_PACKET)
|
||||
== MLAN_STATUS_SUCCESS) {
|
||||
MRVDRV_TxPD_POWER_MGMT_LAST_PACKET) ==
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
pmadapter->delay_null_pkt = MFALSE;
|
||||
}
|
||||
break;
|
||||
|
@ -1315,8 +1282,7 @@ exit_main_proc:
|
|||
*
|
||||
* @return MLAN_STATUS_PENDING
|
||||
*/
|
||||
mlan_status
|
||||
mlan_send_packet(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf)
|
||||
mlan_status mlan_send_packet(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_PENDING;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
||||
|
@ -1335,14 +1301,12 @@ mlan_send_packet(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf)
|
|||
pmpriv = pmadapter->priv[pmbuf->bss_index];
|
||||
|
||||
eth_type =
|
||||
mlan_ntohs(*(t_u16 *)&pmbuf->
|
||||
pbuf[pmbuf->data_offset +
|
||||
mlan_ntohs(*(t_u16 *)&pmbuf->pbuf[pmbuf->data_offset +
|
||||
MLAN_ETHER_PKT_TYPE_OFFSET]);
|
||||
if (((pmadapter->priv[pmbuf->bss_index]->port_ctrl_mode == MTRUE) &&
|
||||
((eth_type == MLAN_ETHER_PKT_TYPE_EAPOL)
|
||||
|| (eth_type == MLAN_ETHER_PKT_TYPE_WAPI)
|
||||
))
|
||||
|| (pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA)
|
||||
((eth_type == MLAN_ETHER_PKT_TYPE_EAPOL) ||
|
||||
(eth_type == MLAN_ETHER_PKT_TYPE_WAPI))) ||
|
||||
(pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA)
|
||||
|
||||
) {
|
||||
if (eth_type == MLAN_ETHER_PKT_TYPE_EAPOL) {
|
||||
|
@ -1366,10 +1330,10 @@ mlan_send_packet(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf)
|
|||
* @param adapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail
|
||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success,
|
||||
* otherwise fail
|
||||
*/
|
||||
mlan_status
|
||||
mlan_ioctl(IN t_void *adapter, IN pmlan_ioctl_req pioctl_req)
|
||||
mlan_status mlan_ioctl(IN t_void *adapter, IN pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_adapter pmadapter = (pmlan_adapter)adapter;
|
||||
|
@ -1405,10 +1369,9 @@ exit:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
mlan_write_data_async_complete(IN t_void *pmlan_adapter,
|
||||
IN pmlan_buffer pmbuf,
|
||||
IN t_u32 port, IN mlan_status status)
|
||||
mlan_status mlan_write_data_async_complete(IN t_void *pmlan_adapter,
|
||||
IN pmlan_buffer pmbuf, IN t_u32 port,
|
||||
IN mlan_status status)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
||||
|
@ -1436,10 +1399,11 @@ mlan_write_data_async_complete(IN t_void *pmlan_adapter,
|
|||
* @param pmbuf A pointer to mlan_buffer structure
|
||||
* @param port Data port
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE or MLAN_STATUS_PENDING
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE or
|
||||
* MLAN_STATUS_PENDING
|
||||
*/
|
||||
mlan_status
|
||||
mlan_recv(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf, IN t_u32 port)
|
||||
mlan_status mlan_recv(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf,
|
||||
IN t_u32 port)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_PENDING;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
||||
|
@ -1480,8 +1444,8 @@ mlan_recv(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf, IN t_u32 port)
|
|||
if (pmadapter->ps_state == PS_STATE_SLEEP_CFM) {
|
||||
pmbuf->data_offset += MLAN_TYPE_LEN;
|
||||
pmbuf->data_len -= MLAN_TYPE_LEN;
|
||||
wlan_process_sleep_confirm_resp
|
||||
(pmadapter,
|
||||
wlan_process_sleep_confirm_resp(
|
||||
pmadapter,
|
||||
pmbuf->pbuf +
|
||||
pmbuf->data_offset,
|
||||
pmbuf->data_len);
|
||||
|
@ -1534,17 +1498,15 @@ mlan_recv(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf, IN t_u32 port)
|
|||
PRINTM(MDATA, "mlan_recv: DATA (%lu.%06lu)\n", sec, usec);
|
||||
#if defined(USB)
|
||||
if (pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.enable) {
|
||||
max_rx_data_size =
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.
|
||||
aggr_max;
|
||||
if (pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.
|
||||
aggr_mode == MLAN_USB_AGGR_MODE_NUM) {
|
||||
max_rx_data_size = pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_max;
|
||||
if (pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl
|
||||
.aggr_mode == MLAN_USB_AGGR_MODE_NUM) {
|
||||
max_rx_data_size *=
|
||||
MAX(MLAN_USB_MAX_PKT_SIZE,
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.
|
||||
aggr_ctrl.aggr_align);
|
||||
max_rx_data_size =
|
||||
MAX(max_rx_data_size,
|
||||
pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_align);
|
||||
max_rx_data_size = MAX(max_rx_data_size,
|
||||
MLAN_RX_DATA_BUF_SIZE);
|
||||
}
|
||||
}
|
||||
|
@ -1555,27 +1517,20 @@ mlan_recv(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf, IN t_u32 port)
|
|||
PRINTM(MERROR, "mlan_recv: DATA too large\n");
|
||||
} else {
|
||||
pmadapter->upld_len = len;
|
||||
pmadapter->callbacks.moal_get_system_time(pmadapter->
|
||||
pmoal_handle,
|
||||
&pmbuf->
|
||||
in_ts_sec,
|
||||
&pmbuf->
|
||||
in_ts_usec);
|
||||
pmadapter->callbacks.moal_spin_lock(pmadapter->
|
||||
pmoal_handle,
|
||||
pmadapter->
|
||||
rx_data_queue.
|
||||
plock);
|
||||
pmadapter->callbacks.moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &pmbuf->in_ts_sec,
|
||||
&pmbuf->in_ts_usec);
|
||||
pmadapter->callbacks.moal_spin_lock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
util_enqueue_list_tail(pmadapter->pmoal_handle,
|
||||
&pmadapter->rx_data_queue,
|
||||
(pmlan_linked_list)pmbuf, MNULL,
|
||||
MNULL);
|
||||
pmadapter->rx_pkts_queued++;
|
||||
pmadapter->callbacks.moal_spin_unlock(pmadapter->
|
||||
pmoal_handle,
|
||||
pmadapter->
|
||||
rx_data_queue.
|
||||
plock);
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
pmadapter->data_received = MTRUE;
|
||||
mlan_queue_rx_work(pmadapter);
|
||||
}
|
||||
|
@ -1599,9 +1554,9 @@ mlan_recv(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf, IN t_u32 port)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
mlan_recv_packet_complete(IN t_void *pmlan_adapter,
|
||||
IN pmlan_buffer pmbuf, IN mlan_status status)
|
||||
mlan_status mlan_recv_packet_complete(IN t_void *pmlan_adapter,
|
||||
IN pmlan_buffer pmbuf,
|
||||
IN mlan_status status)
|
||||
{
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
||||
|
||||
|
@ -1620,8 +1575,8 @@ mlan_recv_packet_complete(IN t_void *pmlan_adapter,
|
|||
*
|
||||
* @return wmm queue priority (0 - 3)
|
||||
*/
|
||||
t_u8
|
||||
mlan_select_wmm_queue(IN t_void *pmlan_adapter, IN t_u8 bss_num, IN t_u8 tid)
|
||||
t_u8 mlan_select_wmm_queue(IN t_void *pmlan_adapter, IN t_u8 bss_num,
|
||||
IN t_u8 tid)
|
||||
{
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
||||
pmlan_private pmpriv = pmadapter->priv[bss_num];
|
||||
|
@ -1642,8 +1597,7 @@ mlan_select_wmm_queue(IN t_void *pmlan_adapter, IN t_u8 bss_num, IN t_u8 tid)
|
|||
* @param adapter A pointer to mlan_adapter structure
|
||||
* @return MLAN_STATUS_FAILURE -- if the intererupt is not for us
|
||||
*/
|
||||
mlan_status
|
||||
mlan_interrupt(IN t_u16 msg_id, IN t_void *adapter)
|
||||
mlan_status mlan_interrupt(IN t_u16 msg_id, IN t_void *adapter)
|
||||
{
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)adapter;
|
||||
mlan_status ret;
|
||||
|
@ -1662,8 +1616,7 @@ mlan_interrupt(IN t_u16 msg_id, IN t_void *adapter)
|
|||
* @param keep_wakeup keep wake up flag
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
mlan_pm_wakeup_card(IN t_void *adapter, IN t_u8 keep_wakeup)
|
||||
t_void mlan_pm_wakeup_card(IN t_void *adapter, IN t_u8 keep_wakeup)
|
||||
{
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)adapter;
|
||||
|
||||
|
@ -1681,8 +1634,7 @@ mlan_pm_wakeup_card(IN t_void *adapter, IN t_u8 keep_wakeup)
|
|||
* @param adapter A pointer to mlan_adapter structure
|
||||
* @return MTRUE/MFALSE
|
||||
*/
|
||||
t_u8
|
||||
mlan_is_main_process_running(IN t_void *adapter)
|
||||
t_u8 mlan_is_main_process_running(IN t_void *adapter)
|
||||
{
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)adapter;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
@ -1711,8 +1663,8 @@ mlan_is_main_process_running(IN t_void *adapter)
|
|||
* @param func_num PCIE function num
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
mlan_set_int_mode(IN t_void *adapter, IN t_u32 int_mode, IN t_u8 func_num)
|
||||
t_void mlan_set_int_mode(IN t_void *adapter, IN t_u32 int_mode,
|
||||
IN t_u8 func_num)
|
||||
{
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)adapter;
|
||||
ENTER();
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -55,8 +55,7 @@ Change log:
|
|||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @return N/A
|
||||
*/
|
||||
static t_void
|
||||
wlan_handle_disconnect_event(pmlan_private pmpriv)
|
||||
static t_void wlan_handle_disconnect_event(pmlan_private pmpriv)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -80,8 +79,7 @@ wlan_handle_disconnect_event(pmlan_private pmpriv)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
||||
t_void wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
||||
{
|
||||
mlan_adapter *pmadapter = priv->adapter;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -93,11 +91,13 @@ wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
|||
|
||||
PRINTM(MINFO, "Handles disconnect event.\n");
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/* If DFS repeater mode is enabled and station interface disconnects
|
||||
* then make sure that all uAPs are stopped.
|
||||
*/
|
||||
if (pmadapter->dfs_repeater)
|
||||
wlan_dfs_rep_disconnect(pmadapter);
|
||||
#endif
|
||||
|
||||
if (drv_disconnect) {
|
||||
priv->media_connected = MFALSE;
|
||||
|
@ -167,8 +167,7 @@ wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
|||
wlan_clean_txrx(priv);
|
||||
|
||||
/* Need to erase the current SSID and BSSID info */
|
||||
memset(pmadapter,
|
||||
&priv->curr_bss_params, 0x00,
|
||||
memset(pmadapter, &priv->curr_bss_params, 0x00,
|
||||
sizeof(priv->curr_bss_params));
|
||||
}
|
||||
pmadapter->tx_lock_flag = MFALSE;
|
||||
|
@ -179,15 +178,13 @@ wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
|||
|
||||
if ((wlan_fw_11d_is_enabled(priv)) &&
|
||||
(priv->state_11d.user_enable_11d == DISABLE_11D)) {
|
||||
|
||||
priv->state_11d.enable_11d = DISABLE_11D;
|
||||
enable = DISABLE_11D;
|
||||
|
||||
/* Send cmd to FW to enable/disable 11D function */
|
||||
ret = wlan_prepare_cmd(priv,
|
||||
HostCmd_CMD_802_11_SNMP_MIB,
|
||||
HostCmd_ACT_GEN_SET,
|
||||
Dot11D_i, MNULL, &enable);
|
||||
ret = wlan_prepare_cmd(priv, HostCmd_CMD_802_11_SNMP_MIB,
|
||||
HostCmd_ACT_GEN_SET, Dot11D_i, MNULL,
|
||||
&enable);
|
||||
if (ret)
|
||||
PRINTM(MERROR, "11D: Failed to enable 11D\n");
|
||||
}
|
||||
|
@ -216,8 +213,7 @@ wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
wlan_2040_coex_event(pmlan_private pmpriv)
|
||||
t_void wlan_2040_coex_event(pmlan_private pmpriv)
|
||||
{
|
||||
t_u8 event_buf[100];
|
||||
mlan_event *pevent = (mlan_event *)event_buf;
|
||||
|
@ -226,19 +222,18 @@ wlan_2040_coex_event(pmlan_private pmpriv)
|
|||
ENTER();
|
||||
|
||||
if (pmpriv->curr_bss_params.bss_descriptor.poverlap_bss_scan_param &&
|
||||
pmpriv->curr_bss_params.bss_descriptor.poverlap_bss_scan_param->
|
||||
ieee_hdr.element_id == OVERLAPBSSSCANPARAM) {
|
||||
ele_len =
|
||||
pmpriv->curr_bss_params.bss_descriptor.
|
||||
poverlap_bss_scan_param->ieee_hdr.len;
|
||||
pmpriv->curr_bss_params.bss_descriptor.poverlap_bss_scan_param
|
||||
->ieee_hdr.element_id == OVERLAPBSSSCANPARAM) {
|
||||
ele_len = pmpriv->curr_bss_params.bss_descriptor
|
||||
.poverlap_bss_scan_param->ieee_hdr.len;
|
||||
pevent->bss_index = pmpriv->bss_index;
|
||||
pevent->event_id = MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM;
|
||||
pevent->event_len = ele_len;
|
||||
/* Copy OBSS scan parameters */
|
||||
memcpy_ext(pmpriv->adapter, (t_u8 *)pevent->event_buf,
|
||||
(t_u8 *)&pmpriv->curr_bss_params.bss_descriptor.
|
||||
poverlap_bss_scan_param->obss_scan_param, ele_len,
|
||||
pevent->event_len);
|
||||
(t_u8 *)&pmpriv->curr_bss_params.bss_descriptor
|
||||
.poverlap_bss_scan_param->obss_scan_param,
|
||||
ele_len, pevent->event_len);
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM,
|
||||
pevent);
|
||||
}
|
||||
|
@ -254,8 +249,8 @@ wlan_2040_coex_event(pmlan_private pmpriv)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
wlan_process_sta_tx_pause_event(pmlan_private priv, pmlan_buffer pevent)
|
||||
static void wlan_process_sta_tx_pause_event(pmlan_private priv,
|
||||
pmlan_buffer pevent)
|
||||
{
|
||||
t_u16 tlv_type, tlv_len;
|
||||
int tlv_buf_left = pevent->data_len - sizeof(t_u32);
|
||||
|
@ -290,7 +285,6 @@ wlan_process_sta_tx_pause_event(pmlan_private priv, pmlan_buffer pevent)
|
|||
else
|
||||
priv->tx_pause = MFALSE;
|
||||
}
|
||||
|
||||
}
|
||||
tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len);
|
||||
tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len +
|
||||
|
@ -309,8 +303,7 @@ wlan_process_sta_tx_pause_event(pmlan_private priv, pmlan_buffer pevent)
|
|||
* received from firmware
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
wlan_print_disconnect_reason(t_u16 reason_code)
|
||||
static void wlan_print_disconnect_reason(t_u16 reason_code)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -365,8 +358,7 @@ wlan_print_disconnect_reason(t_u16 reason_code)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_ops_sta_process_event(IN t_void *priv)
|
||||
mlan_status wlan_ops_sta_process_event(IN t_void *priv)
|
||||
{
|
||||
pmlan_private pmpriv = (pmlan_private)priv;
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
|
@ -409,8 +401,7 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
pevent = (pmlan_event)event_buf;
|
||||
memset(pmadapter, event_buf, 0, MAX_EVENT_SIZE);
|
||||
|
||||
if (eventcause != EVENT_PS_SLEEP &&
|
||||
eventcause != EVENT_PS_AWAKE &&
|
||||
if (eventcause != EVENT_PS_SLEEP && eventcause != EVENT_PS_AWAKE &&
|
||||
pmbuf->data_len > sizeof(eventcause))
|
||||
DBG_HEXDUMP(MEVT_D, "EVENT", pmbuf->pbuf + pmbuf->data_offset,
|
||||
pmbuf->data_len);
|
||||
|
@ -433,9 +424,8 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
"wlan: Receive deauth event in wps session\n");
|
||||
break;
|
||||
}
|
||||
reason_code =
|
||||
wlan_le16_to_cpu(*(t_u16 *)
|
||||
(pmbuf->pbuf + pmbuf->data_offset +
|
||||
reason_code = wlan_le16_to_cpu(*(t_u16 *)(pmbuf->pbuf +
|
||||
pmbuf->data_offset +
|
||||
sizeof(eventcause)));
|
||||
PRINTM(MMSG, "wlan: EVENT: Deauthenticated (reason 0x%x)\n",
|
||||
reason_code);
|
||||
|
@ -452,9 +442,8 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
"wlan: Receive disassociate event in wps session\n");
|
||||
break;
|
||||
}
|
||||
reason_code =
|
||||
wlan_le16_to_cpu(*(t_u16 *)
|
||||
(pmbuf->pbuf + pmbuf->data_offset +
|
||||
reason_code = wlan_le16_to_cpu(*(t_u16 *)(pmbuf->pbuf +
|
||||
pmbuf->data_offset +
|
||||
sizeof(eventcause)));
|
||||
PRINTM(MMSG, "wlan: EVENT: Disassociated (reason 0x%x)\n",
|
||||
reason_code);
|
||||
|
@ -465,9 +454,8 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
break;
|
||||
|
||||
case EVENT_LINK_LOST:
|
||||
reason_code =
|
||||
wlan_le16_to_cpu(*(t_u16 *)
|
||||
(pmbuf->pbuf + pmbuf->data_offset +
|
||||
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);
|
||||
|
@ -493,8 +481,7 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
PRINTM(MINFO, "EVENT: AWAKE\n");
|
||||
PRINTM_NETINTF(MEVENT, pmpriv);
|
||||
PRINTM(MEVENT, "|");
|
||||
if (!pmadapter->pps_uapsd_mode &&
|
||||
pmpriv->media_connected &&
|
||||
if (!pmadapter->pps_uapsd_mode && pmpriv->media_connected &&
|
||||
(pmpriv->port_open || !pmpriv->port_ctrl_mode) &&
|
||||
pmadapter->sleep_period.period) {
|
||||
pmadapter->pps_uapsd_mode = MTRUE;
|
||||
|
@ -505,13 +492,14 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
break;
|
||||
pmadapter->tx_lock_flag = MFALSE;
|
||||
if (pmadapter->pps_uapsd_mode && pmadapter->gen_null_pkt) {
|
||||
if (MTRUE == wlan_check_last_packet_indication(pmpriv)) {
|
||||
if (MTRUE ==
|
||||
wlan_check_last_packet_indication(pmpriv)) {
|
||||
if (!pmadapter->data_sent) {
|
||||
if (wlan_send_null_packet(pmpriv,
|
||||
MRVDRV_TxPD_POWER_MGMT_NULL_PACKET
|
||||
|
|
||||
MRVDRV_TxPD_POWER_MGMT_LAST_PACKET)
|
||||
== MLAN_STATUS_SUCCESS) {
|
||||
if (wlan_send_null_packet(
|
||||
pmpriv,
|
||||
MRVDRV_TxPD_POWER_MGMT_NULL_PACKET |
|
||||
MRVDRV_TxPD_POWER_MGMT_LAST_PACKET) ==
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -525,9 +513,8 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
|
||||
case EVENT_HS_ACT_REQ:
|
||||
PRINTM(MEVENT, "EVENT: HS_ACT_REQ\n");
|
||||
ret = wlan_prepare_cmd(priv,
|
||||
HostCmd_CMD_802_11_HS_CFG_ENH,
|
||||
0, 0, MNULL, MNULL);
|
||||
ret = wlan_prepare_cmd(priv, HostCmd_CMD_802_11_HS_CFG_ENH, 0,
|
||||
0, MNULL, MNULL);
|
||||
break;
|
||||
case EVENT_MIC_ERR_UNICAST:
|
||||
PRINTM(MEVENT, "EVENT: UNICAST MIC ERROR\n");
|
||||
|
@ -554,11 +541,10 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
pevent->bss_index = pmpriv->bss_index;
|
||||
pevent->event_id = MLAN_EVENT_ID_FW_DEBUG_INFO;
|
||||
pevent->event_len = pmbuf->data_len - sizeof(eventcause);
|
||||
memcpy_ext(pmadapter,
|
||||
(t_u8 *)pevent->event_buf,
|
||||
memcpy_ext(pmadapter, (t_u8 *)pevent->event_buf,
|
||||
pmbuf->pbuf + pmbuf->data_offset +
|
||||
sizeof(eventcause), pevent->event_len,
|
||||
pevent->event_len);
|
||||
sizeof(eventcause),
|
||||
pevent->event_len, pevent->event_len);
|
||||
PRINTM(MEVENT, "EVENT: FW Debug Info %s\n",
|
||||
(t_u8 *)pevent->event_buf);
|
||||
wlan_recv_event(pmpriv, pevent->event_id, pevent);
|
||||
|
@ -588,18 +574,20 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
|
||||
case EVENT_STOP_TX:
|
||||
PRINTM(MEVENT, "EVENT: Stop Tx (%#x)\n", eventcause);
|
||||
wlan_11h_tx_disable(pmpriv); /* this fn will send event up to MOAL */
|
||||
wlan_11h_tx_disable(pmpriv); /* this fn will send event up to
|
||||
MOAL */
|
||||
break;
|
||||
case EVENT_START_TX:
|
||||
PRINTM(MEVENT, "EVENT: Start Tx (%#x)\n", eventcause);
|
||||
wlan_11h_tx_enable(pmpriv); /* this fn will send event up to MOAL */
|
||||
wlan_11h_tx_enable(pmpriv); /* this fn will send event up to
|
||||
MOAL */
|
||||
break;
|
||||
case EVENT_CHANNEL_SWITCH:
|
||||
PRINTM(MEVENT, "EVENT: Channel Switch (%#x)\n", eventcause);
|
||||
if (pmadapter->ecsa_enable) {
|
||||
MrvlIEtypes_channel_band_t *pchan_info =
|
||||
(MrvlIEtypes_channel_band_t *)(pmadapter->
|
||||
event_body);
|
||||
(MrvlIEtypes_channel_band_t
|
||||
*)(pmadapter->event_body);
|
||||
t_u8 channel = pchan_info->channel;
|
||||
chan_freq_power_t *cfp = MNULL;
|
||||
DBG_HEXDUMP(MCMD_D, "chan band config",
|
||||
|
@ -609,11 +597,11 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
channel);
|
||||
#define MAX_CHANNEL_BAND_B 14
|
||||
if (channel <= MAX_CHANNEL_BAND_B)
|
||||
cfp = wlan_find_cfp_by_band_and_channel
|
||||
(pmadapter, BAND_B, channel);
|
||||
cfp = wlan_find_cfp_by_band_and_channel(
|
||||
pmadapter, BAND_B, channel);
|
||||
else
|
||||
cfp = wlan_find_cfp_by_band_and_channel
|
||||
(pmadapter, BAND_A, channel);
|
||||
cfp = wlan_find_cfp_by_band_and_channel(
|
||||
pmadapter, BAND_A, channel);
|
||||
pmpriv->curr_bss_params.bss_descriptor.channel =
|
||||
channel;
|
||||
if (cfp)
|
||||
|
@ -643,9 +631,9 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
pchan_band_info->channel = pchan_info->channel;
|
||||
if (pchan_band_info->bandcfg.chanWidth == CHAN_BW_80MHZ)
|
||||
pchan_band_info->center_chan =
|
||||
wlan_get_center_freq_idx(priv, BAND_AAC,
|
||||
pchan_info->
|
||||
channel,
|
||||
wlan_get_center_freq_idx(
|
||||
priv, BAND_AAC,
|
||||
pchan_info->channel,
|
||||
CHANNEL_BW_80MHZ);
|
||||
wlan_recv_event(pmpriv,
|
||||
MLAN_EVENT_ID_FW_CHAN_SWITCH_COMPLETE,
|
||||
|
@ -656,8 +644,8 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
PRINTM_NETINTF(MEVENT, pmpriv);
|
||||
PRINTM(MEVENT, "EVENT: Channel Switch Announcement\n");
|
||||
/* Here, pass up event first, as handling will send deauth */
|
||||
wlan_recv_event(pmpriv,
|
||||
MLAN_EVENT_ID_FW_CHANNEL_SWITCH_ANN, MNULL);
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_CHANNEL_SWITCH_ANN,
|
||||
MNULL);
|
||||
wlan_11h_handle_event_chanswann(pmpriv);
|
||||
break;
|
||||
case EVENT_RADAR_DETECTED:
|
||||
|
@ -692,8 +680,8 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
/* Copy event data */
|
||||
memcpy_ext(pmadapter, (t_u8 *)pevent->event_buf,
|
||||
pmbuf->pbuf + pmbuf->data_offset +
|
||||
sizeof(eventcause), pevent->event_len,
|
||||
pevent->event_len);
|
||||
sizeof(eventcause),
|
||||
pevent->event_len, pevent->event_len);
|
||||
/* Handle / pass event data */
|
||||
ret = wlan_11h_handle_event_chanrpt_ready(pmpriv, pevent,
|
||||
&radar_chan);
|
||||
|
@ -726,16 +714,16 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
HostCmd_ACT_GEN_SET, 0, 0, MNULL);
|
||||
break;
|
||||
case EVENT_WMM_STATUS_CHANGE:
|
||||
if (pmbuf && pmbuf->data_len
|
||||
> sizeof(eventcause) + sizeof(MrvlIEtypesHeader_t)) {
|
||||
if (pmbuf &&
|
||||
pmbuf->data_len >
|
||||
sizeof(eventcause) + sizeof(MrvlIEtypesHeader_t)) {
|
||||
PRINTM(MEVENT, "EVENT: WMM status changed: %d\n",
|
||||
pmbuf->data_len);
|
||||
|
||||
evt_buf = (pmbuf->pbuf
|
||||
+ pmbuf->data_offset + sizeof(eventcause));
|
||||
evt_buf = (pmbuf->pbuf + pmbuf->data_offset +
|
||||
sizeof(eventcause));
|
||||
|
||||
wlan_ret_wmm_get_status(pmpriv,
|
||||
evt_buf,
|
||||
wlan_ret_wmm_get_status(pmpriv, evt_buf,
|
||||
pmbuf->data_len -
|
||||
sizeof(eventcause));
|
||||
} else {
|
||||
|
@ -804,8 +792,8 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
break;
|
||||
case EVENT_IBSS_COALESCED:
|
||||
PRINTM(MEVENT, "EVENT: IBSS_COALESCED\n");
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_802_11_IBSS_COALESCING_STATUS,
|
||||
ret = wlan_prepare_cmd(
|
||||
pmpriv, HostCmd_CMD_802_11_IBSS_COALESCING_STATUS,
|
||||
HostCmd_ACT_GEN_GET, 0, MNULL, MNULL);
|
||||
break;
|
||||
case EVENT_ADDBA:
|
||||
|
@ -830,8 +818,8 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
case EVENT_BA_STREAM_TIMEOUT:
|
||||
PRINTM(MEVENT, "EVENT: BA Stream timeout\n");
|
||||
if (pmpriv->media_connected == MTRUE)
|
||||
wlan_11n_ba_stream_timeout(pmpriv,
|
||||
(HostCmd_DS_11N_BATIMEOUT *)
|
||||
wlan_11n_ba_stream_timeout(
|
||||
pmpriv, (HostCmd_DS_11N_BATIMEOUT *)
|
||||
pmadapter->event_body);
|
||||
else
|
||||
PRINTM(MERROR,
|
||||
|
@ -849,8 +837,8 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
MIN(pmadapter->curr_tx_buf_size,
|
||||
wlan_le16_to_cpu(*(t_u16 *)pmadapter->event_body));
|
||||
if (pmbuf->data_len == sizeof(eventcause) + sizeof(t_u32)) {
|
||||
enable = wlan_le16_to_cpu(*(t_u16 *)
|
||||
(pmadapter->event_body +
|
||||
enable = wlan_le16_to_cpu(
|
||||
*(t_u16 *)(pmadapter->event_body +
|
||||
sizeof(t_u16)));
|
||||
if (enable)
|
||||
pmpriv->amsdu_disable = MFALSE;
|
||||
|
@ -882,8 +870,10 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
memcpy_ext(pmadapter, (t_u8 *)pevent->event_buf,
|
||||
pmadapter->event_body, pevent->event_len,
|
||||
pevent->event_len);
|
||||
#ifdef UAP_SUPPORT
|
||||
if (pmadapter->dfs_repeater)
|
||||
wlan_dfs_rep_bw_change(pmadapter);
|
||||
#endif
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_BW_CHANGED, pevent);
|
||||
break;
|
||||
|
||||
|
@ -928,19 +918,16 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
break;
|
||||
case EVENT_IBSS_STATION_DISCONNECT:
|
||||
break;
|
||||
case EVENT_SAD_REPORT:
|
||||
{
|
||||
case EVENT_SAD_REPORT: {
|
||||
#ifdef DEBUG_LEVEL1
|
||||
t_u8 *pevt_dat =
|
||||
pmbuf->pbuf + pmbuf->data_offset +
|
||||
sizeof(t_u32);
|
||||
pmbuf->pbuf + pmbuf->data_offset + sizeof(t_u32);
|
||||
#endif
|
||||
PRINTM(MEVENT,
|
||||
"EVENT: Antenna Diversity %d (%d, %d, %d, %d)\n",
|
||||
eventcause, pevt_dat[0] + 1, pevt_dat[1] + 1,
|
||||
pevt_dat[2], pevt_dat[3]);
|
||||
}
|
||||
break;
|
||||
} break;
|
||||
|
||||
case EVENT_FW_DUMP_INFO:
|
||||
PRINTM(MEVENT, "EVENT: Dump FW info\n");
|
||||
|
@ -974,9 +961,10 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
if (!pmadapter->ssu_buf || !pmadapter->ssu_buf->pbuf)
|
||||
break;
|
||||
|
||||
/* If ADMA is supported, SSU header could not be received with SSU data. Instead,
|
||||
* SSU header is received through this event. So, copy the header into the buffer
|
||||
* before passing the buffer to upper layer for file writting
|
||||
/* If ADMA is supported, SSU header could not be received with
|
||||
* SSU data. Instead, SSU header is received through this event.
|
||||
* So, copy the header into the buffer before passing the buffer
|
||||
* to upper layer for file writting
|
||||
*/
|
||||
memcpy_ext(pmadapter,
|
||||
(t_u8 *)pmadapter->ssu_buf->pbuf +
|
||||
|
@ -988,12 +976,12 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
|
||||
DBG_HEXDUMP(MEVT_D, "SSU data",
|
||||
(t_u8 *)pmadapter->ssu_buf->pbuf +
|
||||
pmadapter->ssu_buf->data_offset, 512);
|
||||
pmadapter->ssu_buf->data_offset,
|
||||
512);
|
||||
pevent->bss_index = pmpriv->bss_index;
|
||||
pevent->event_id = MLAN_EVENT_ID_SSU_DUMP_FILE;
|
||||
pevent->event_len = MLAN_SSU_BUF_SIZE;
|
||||
*(t_u64 *)pevent->event_buf =
|
||||
(t_u64)pmadapter->ssu_buf->pbuf +
|
||||
*(t_u64 *)pevent->event_buf = (t_u64)pmadapter->ssu_buf->pbuf +
|
||||
pmadapter->ssu_buf->data_offset;
|
||||
wlan_recv_event(pmpriv, pevent->event_id, pevent);
|
||||
wlan_free_ssu_pcie_buf(pmadapter);
|
||||
|
@ -1019,8 +1007,8 @@ wlan_ops_sta_process_event(IN t_void *priv)
|
|||
break;
|
||||
}
|
||||
PRINTM(MEVENT, "EVENT: EVENT_FW_HANG_REPORT reasoncode=%d\n",
|
||||
wlan_le16_to_cpu(*(t_u16 *)
|
||||
(pmbuf->pbuf + pmbuf->data_offset +
|
||||
wlan_le16_to_cpu(*(t_u16 *)(pmbuf->pbuf +
|
||||
pmbuf->data_offset +
|
||||
sizeof(eventcause))));
|
||||
pmadapter->fw_hang_report = MTRUE;
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_DBG_DUMP, MNULL);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -108,14 +108,15 @@ typedef MLAN_PACK_START struct {
|
|||
Global functions
|
||||
********************************************************/
|
||||
/**
|
||||
* @brief This function check and discard IPv4 and IPv6 gratuitous broadcast packets
|
||||
* @brief This function check and discard IPv4 and IPv6 gratuitous broadcast
|
||||
* packets
|
||||
*
|
||||
* @param prx_pkt A pointer to RxPacketHdr_t structure of received packet
|
||||
* @param pmadapter A pointer to pmlan_adapter structure
|
||||
* @return TRUE if found such type of packets, FALSE not found
|
||||
*/
|
||||
static t_u8
|
||||
discard_gratuitous_ARP_msg(RxPacketHdr_t *prx_pkt, pmlan_adapter pmadapter)
|
||||
static t_u8 discard_gratuitous_ARP_msg(RxPacketHdr_t *prx_pkt,
|
||||
pmlan_adapter pmadapter)
|
||||
{
|
||||
t_u8 proto_ARP_type[] = {0x08, 0x06};
|
||||
t_u8 proto_ARP_type_v6[] = {0x86, 0xDD};
|
||||
|
@ -128,16 +129,14 @@ discard_gratuitous_ARP_msg(RxPacketHdr_t *prx_pkt, pmlan_adapter pmadapter)
|
|||
* where the source and destination IP are both set to
|
||||
* the IP of the machine issuing the packet.
|
||||
*/
|
||||
if (memcmp
|
||||
(pmadapter, proto_ARP_type, &prx_pkt->eth803_hdr.h803_len,
|
||||
if (memcmp(pmadapter, proto_ARP_type, &prx_pkt->eth803_hdr.h803_len,
|
||||
sizeof(proto_ARP_type)) == 0) {
|
||||
parp_hdr = (IPv4_ARP_t *)(&prx_pkt->rfc1042_hdr);
|
||||
/* Graguitous ARP can be ARP request or ARP reply*/
|
||||
if ((parp_hdr->op_code == mlan_htons(0x01)) ||
|
||||
(parp_hdr->op_code == mlan_htons(0x02)))
|
||||
if (memcmp
|
||||
(pmadapter, parp_hdr->src_ip, parp_hdr->dst_ip,
|
||||
4) == 0)
|
||||
if (memcmp(pmadapter, parp_hdr->src_ip,
|
||||
parp_hdr->dst_ip, 4) == 0)
|
||||
ret = MTRUE;
|
||||
}
|
||||
|
||||
|
@ -145,8 +144,7 @@ discard_gratuitous_ARP_msg(RxPacketHdr_t *prx_pkt, pmlan_adapter pmadapter)
|
|||
* An unsolicited Neighbor Advertisement pkt is
|
||||
* marked by a cleared Solicited Flag
|
||||
*/
|
||||
if (memcmp
|
||||
(pmadapter, proto_ARP_type_v6, &prx_pkt->eth803_hdr.h803_len,
|
||||
if (memcmp(pmadapter, proto_ARP_type_v6, &prx_pkt->eth803_hdr.h803_len,
|
||||
sizeof(proto_ARP_type_v6)) == 0) {
|
||||
pNadv_hdr = (IPv6_Nadv_t *)(&prx_pkt->rfc1042_hdr);
|
||||
/* Check Nadv type: next header is ICMPv6 and
|
||||
|
@ -168,8 +166,7 @@ discard_gratuitous_ARP_msg(RxPacketHdr_t *prx_pkt, pmlan_adapter pmadapter)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||
mlan_status wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_private priv = pmadapter->priv[pmbuf->bss_index];
|
||||
|
@ -177,12 +174,10 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
RxPD *prx_pd;
|
||||
int hdr_chop;
|
||||
EthII_Hdr_t *peth_hdr;
|
||||
t_u8 rfc1042_eth_hdr[MLAN_MAC_ADDR_LENGTH] = {
|
||||
0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
|
||||
};
|
||||
t_u8 snap_oui_802_h[MLAN_MAC_ADDR_LENGTH] = {
|
||||
0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
|
||||
};
|
||||
t_u8 rfc1042_eth_hdr[MLAN_MAC_ADDR_LENGTH] = {0xaa, 0xaa, 0x03,
|
||||
0x00, 0x00, 0x00};
|
||||
t_u8 snap_oui_802_h[MLAN_MAC_ADDR_LENGTH] = {0xaa, 0xaa, 0x03,
|
||||
0x00, 0x00, 0xf8};
|
||||
t_u8 appletalk_aarp_type[2] = {0x80, 0xf3};
|
||||
t_u8 ipx_snap_type[2] = {0x81, 0x37};
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
|
@ -223,29 +218,29 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
HEXDUMP("RX Data: Src", prx_pkt->eth803_hdr.src_addr,
|
||||
sizeof(prx_pkt->eth803_hdr.src_addr));
|
||||
|
||||
if ((memcmp(pmadapter, &prx_pkt->rfc1042_hdr,
|
||||
snap_oui_802_h, sizeof(snap_oui_802_h)) == 0) ||
|
||||
((memcmp(pmadapter, &prx_pkt->rfc1042_hdr,
|
||||
rfc1042_eth_hdr, sizeof(rfc1042_eth_hdr)) == 0) &&
|
||||
if ((memcmp(pmadapter, &prx_pkt->rfc1042_hdr, snap_oui_802_h,
|
||||
sizeof(snap_oui_802_h)) == 0) ||
|
||||
((memcmp(pmadapter, &prx_pkt->rfc1042_hdr, rfc1042_eth_hdr,
|
||||
sizeof(rfc1042_eth_hdr)) == 0) &&
|
||||
memcmp(pmadapter, &prx_pkt->rfc1042_hdr.snap_type,
|
||||
appletalk_aarp_type, sizeof(appletalk_aarp_type)) &&
|
||||
memcmp(pmadapter, &prx_pkt->rfc1042_hdr.snap_type,
|
||||
ipx_snap_type, sizeof(ipx_snap_type)))) {
|
||||
memcmp(pmadapter, &prx_pkt->rfc1042_hdr.snap_type, ipx_snap_type,
|
||||
sizeof(ipx_snap_type)))) {
|
||||
/*
|
||||
* Replace the 803 header and rfc1042 header (llc/snap) with an
|
||||
* EthernetII header, keep the src/dst and snap_type (ethertype).
|
||||
* The firmware only passes up SNAP frames converting
|
||||
* all RX Data from 802.11 to 802.2/LLC/SNAP frames.
|
||||
* EthernetII header, keep the src/dst and snap_type
|
||||
* (ethertype). The firmware only passes up SNAP frames
|
||||
* converting all RX Data from 802.11 to 802.2/LLC/SNAP frames.
|
||||
* To create the Ethernet II, just move the src, dst address
|
||||
* right before the snap_type.
|
||||
*/
|
||||
peth_hdr = (EthII_Hdr_t *)
|
||||
((t_u8 *)&prx_pkt->eth803_hdr
|
||||
+ sizeof(prx_pkt->eth803_hdr) +
|
||||
sizeof(prx_pkt->rfc1042_hdr)
|
||||
- sizeof(prx_pkt->eth803_hdr.dest_addr)
|
||||
- sizeof(prx_pkt->eth803_hdr.src_addr)
|
||||
- sizeof(prx_pkt->rfc1042_hdr.snap_type));
|
||||
peth_hdr =
|
||||
(EthII_Hdr_t *)((t_u8 *)&prx_pkt->eth803_hdr +
|
||||
sizeof(prx_pkt->eth803_hdr) +
|
||||
sizeof(prx_pkt->rfc1042_hdr) -
|
||||
sizeof(prx_pkt->eth803_hdr.dest_addr) -
|
||||
sizeof(prx_pkt->eth803_hdr.src_addr) -
|
||||
sizeof(prx_pkt->rfc1042_hdr.snap_type));
|
||||
|
||||
memcpy_ext(pmadapter, peth_hdr->src_addr,
|
||||
prx_pkt->eth803_hdr.src_addr,
|
||||
|
@ -261,8 +256,7 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
*/
|
||||
hdr_chop = (t_u32)((t_ptr)peth_hdr - (t_ptr)prx_pd);
|
||||
} else {
|
||||
HEXDUMP("RX Data: LLC/SNAP",
|
||||
(t_u8 *)&prx_pkt->rfc1042_hdr,
|
||||
HEXDUMP("RX Data: LLC/SNAP", (t_u8 *)&prx_pkt->rfc1042_hdr,
|
||||
sizeof(prx_pkt->rfc1042_hdr));
|
||||
if ((priv->hotspot_cfg & HOTSPOT_ENABLED) &&
|
||||
discard_gratuitous_ARP_msg(prx_pkt, pmadapter)) {
|
||||
|
@ -298,8 +292,7 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
if (supplicantIsEnabled(priv->psapriv) &&
|
||||
(!memcmp
|
||||
(pmadapter, &prx_pkt->eth803_hdr.h803_len, eapol_type,
|
||||
(!memcmp(pmadapter, &prx_pkt->eth803_hdr.h803_len, eapol_type,
|
||||
sizeof(eapol_type)))) {
|
||||
// BML_SET_OFFSET(bufDesc, offset);
|
||||
if (ProcessEAPoLPkt(priv->psapriv, pmbuf)) {
|
||||
|
@ -315,7 +308,6 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
#endif
|
||||
|
||||
if (MFALSE || priv->rx_pkt_info) {
|
||||
|
||||
ext_rate_info = (t_u8)(prx_pd->rx_info >> 16);
|
||||
pmbuf->u.rx_info.data_rate =
|
||||
wlan_index_to_data_rate(priv->adapter, prx_pd->rx_rate,
|
||||
|
@ -356,8 +348,8 @@ done:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_ops_sta_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
||||
mlan_status wlan_ops_sta_process_rx_packet(IN t_void *adapter,
|
||||
IN pmlan_buffer pmbuf)
|
||||
{
|
||||
pmlan_adapter pmadapter = (pmlan_adapter)adapter;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -383,8 +375,9 @@ wlan_ops_sta_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
|||
(t_u16)pmbuf->data_len) {
|
||||
PRINTM(MERROR,
|
||||
"Wrong rx packet: len=%d,rx_pkt_offset=%d,"
|
||||
" rx_pkt_length=%d\n", pmbuf->data_len,
|
||||
prx_pd->rx_pkt_offset, prx_pd->rx_pkt_length);
|
||||
" rx_pkt_length=%d\n",
|
||||
pmbuf->data_len, prx_pd->rx_pkt_offset,
|
||||
prx_pd->rx_pkt_length);
|
||||
pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
|
@ -397,23 +390,19 @@ wlan_ops_sta_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
|||
/* Check if this is mgmt packet and needs to
|
||||
* forwarded to app as an event
|
||||
*/
|
||||
pmgmt_pkt_hdr =
|
||||
(wlan_mgmt_pkt *)((t_u8 *)prx_pd +
|
||||
pmgmt_pkt_hdr = (wlan_mgmt_pkt *)((t_u8 *)prx_pd +
|
||||
prx_pd->rx_pkt_offset);
|
||||
pmgmt_pkt_hdr->frm_len =
|
||||
wlan_le16_to_cpu(pmgmt_pkt_hdr->frm_len);
|
||||
|
||||
if ((pmgmt_pkt_hdr->wlan_header.frm_ctl
|
||||
& IEEE80211_FC_MGMT_FRAME_TYPE_MASK) == 0)
|
||||
wlan_process_802dot11_mgmt_pkt(pmadapter->
|
||||
priv[pmbuf->bss_index],
|
||||
(t_u8 *)&pmgmt_pkt_hdr->
|
||||
wlan_header,
|
||||
pmgmt_pkt_hdr->frm_len +
|
||||
sizeof(wlan_mgmt_pkt)
|
||||
-
|
||||
sizeof(pmgmt_pkt_hdr->
|
||||
frm_len), prx_pd);
|
||||
if ((pmgmt_pkt_hdr->wlan_header.frm_ctl &
|
||||
IEEE80211_FC_MGMT_FRAME_TYPE_MASK) == 0)
|
||||
wlan_process_802dot11_mgmt_pkt(
|
||||
pmadapter->priv[pmbuf->bss_index],
|
||||
(t_u8 *)&pmgmt_pkt_hdr->wlan_header,
|
||||
pmgmt_pkt_hdr->frm_len + sizeof(wlan_mgmt_pkt) -
|
||||
sizeof(pmgmt_pkt_hdr->frm_len),
|
||||
prx_pd);
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
goto done;
|
||||
}
|
||||
|
@ -423,17 +412,11 @@ wlan_ops_sta_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
|||
priv->rxpd_rx_info = (t_u8)(prx_pd->rx_info >> 16);
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_STA) {
|
||||
antenna = wlan_adjust_antenna(priv, prx_pd);
|
||||
adj_rx_rate =
|
||||
wlan_adjust_data_rate(priv, priv->rxpd_rate,
|
||||
priv->rxpd_rate_info);
|
||||
pmadapter->callbacks.moal_hist_data_add(pmadapter->
|
||||
pmoal_handle,
|
||||
pmbuf->
|
||||
bss_index,
|
||||
adj_rx_rate,
|
||||
prx_pd->snr,
|
||||
prx_pd->nf,
|
||||
antenna);
|
||||
adj_rx_rate = wlan_adjust_data_rate(
|
||||
priv, priv->rxpd_rate, priv->rxpd_rate_info);
|
||||
pmadapter->callbacks.moal_hist_data_add(
|
||||
pmadapter->pmoal_handle, pmbuf->bss_index,
|
||||
adj_rx_rate, prx_pd->snr, prx_pd->nf, antenna);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -441,8 +424,7 @@ wlan_ops_sta_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
|||
* If the packet is not an unicast packet then send the packet
|
||||
* directly to os. Don't pass thru rx reordering
|
||||
*/
|
||||
if ((!IS_11N_ENABLED(priv)
|
||||
) ||
|
||||
if ((!IS_11N_ENABLED(priv)) ||
|
||||
memcmp(priv->adapter, priv->curr_addr,
|
||||
prx_pkt->eth803_hdr.dest_addr, MLAN_MAC_ADDR_LENGTH)) {
|
||||
priv->snr = prx_pd->snr;
|
||||
|
@ -494,9 +476,9 @@ wlan_ops_sta_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
|||
goto done;
|
||||
}
|
||||
/* Reorder and send to OS */
|
||||
ret = mlan_11n_rxreorder_pkt(priv, prx_pd->seq_num,
|
||||
prx_pd->priority, ta,
|
||||
(t_u8)prx_pd->rx_pkt_type, (void *)pmbuf);
|
||||
ret = mlan_11n_rxreorder_pkt(priv, prx_pd->seq_num, prx_pd->priority,
|
||||
ta, (t_u8)prx_pd->rx_pkt_type,
|
||||
(void *)pmbuf);
|
||||
if (ret || (rx_pkt_type == PKT_TYPE_BAR))
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
|
||||
|
|
|
@ -56,8 +56,7 @@ Change log:
|
|||
*
|
||||
* @return headptr or MNULL
|
||||
*/
|
||||
t_void *
|
||||
wlan_ops_sta_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
||||
t_void *wlan_ops_sta_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
||||
{
|
||||
mlan_private *pmpriv = (mlan_private *)priv;
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
|
@ -85,8 +84,8 @@ wlan_ops_sta_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
|||
pmbuf->data_len -= sizeof(pkt_type) + sizeof(tx_control);
|
||||
}
|
||||
|
||||
if (pmbuf->data_offset < (sizeof(TxPD) + pmpriv->intf_hr_len +
|
||||
DMA_ALIGNMENT)) {
|
||||
if (pmbuf->data_offset <
|
||||
(sizeof(TxPD) + pmpriv->intf_hr_len + DMA_ALIGNMENT)) {
|
||||
PRINTM(MERROR,
|
||||
"not enough space for TxPD: headroom=%d pkt_len=%d, required=%d\n",
|
||||
pmbuf->data_offset, pmbuf->data_len,
|
||||
|
@ -96,8 +95,7 @@ wlan_ops_sta_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
|||
}
|
||||
|
||||
/* head_ptr should be aligned */
|
||||
head_ptr =
|
||||
pmbuf->pbuf + pmbuf->data_offset - sizeof(TxPD) -
|
||||
head_ptr = pmbuf->pbuf + pmbuf->data_offset - sizeof(TxPD) -
|
||||
pmpriv->intf_hr_len;
|
||||
head_ptr = (t_u8 *)((t_ptr)head_ptr & ~((t_ptr)(DMA_ALIGNMENT - 1)));
|
||||
|
||||
|
@ -118,10 +116,8 @@ wlan_ops_sta_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
|||
* Set the priority specific tx_control field, setting of 0 will
|
||||
* cause the default value to be used later in this function
|
||||
*/
|
||||
plocal_tx_pd->tx_control
|
||||
=
|
||||
pmpriv->wmm.user_pri_pkt_tx_ctrl[plocal_tx_pd->
|
||||
priority];
|
||||
plocal_tx_pd->tx_control =
|
||||
pmpriv->wmm.user_pri_pkt_tx_ctrl[plocal_tx_pd->priority];
|
||||
if (pmadapter->pps_uapsd_mode) {
|
||||
if (MTRUE == wlan_check_last_packet_indication(pmpriv)) {
|
||||
pmadapter->tx_lock_flag = MTRUE;
|
||||
|
@ -130,9 +126,8 @@ wlan_ops_sta_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
|||
}
|
||||
}
|
||||
/* Offset of actual data */
|
||||
plocal_tx_pd->tx_pkt_offset =
|
||||
(t_u16)((t_ptr)pmbuf->pbuf + pmbuf->data_offset -
|
||||
(t_ptr)plocal_tx_pd);
|
||||
plocal_tx_pd->tx_pkt_offset = (t_u16)(
|
||||
(t_ptr)pmbuf->pbuf + pmbuf->data_offset - (t_ptr)plocal_tx_pd);
|
||||
|
||||
if (!plocal_tx_pd->tx_control) {
|
||||
/* TxCtrl set by user or default */
|
||||
|
@ -151,9 +146,10 @@ wlan_ops_sta_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
|||
if (pmbuf->flags & MLAN_BUF_FLAG_TX_CTRL) {
|
||||
if (pmbuf->u.tx_info.data_rate) {
|
||||
plocal_tx_pd->tx_control |=
|
||||
(wlan_ieee_rateid_to_mrvl_rateid
|
||||
(pmpriv, pmbuf->u.tx_info.data_rate,
|
||||
MNULL) << 16);
|
||||
(wlan_ieee_rateid_to_mrvl_rateid(
|
||||
pmpriv, pmbuf->u.tx_info.data_rate,
|
||||
MNULL)
|
||||
<< 16);
|
||||
plocal_tx_pd->tx_control |= TXPD_TXRATE_ENABLE;
|
||||
}
|
||||
plocal_tx_pd->tx_control_1 |= pmbuf->u.tx_info.channel << 21;
|
||||
|
@ -165,8 +161,8 @@ wlan_ops_sta_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
|||
plocal_tx_pd->tx_control |=
|
||||
(t_u32)pmbuf->u.tx_info.tx_power.val;
|
||||
if (pmbuf->u.tx_info.retry_limit) {
|
||||
plocal_tx_pd->tx_control |=
|
||||
pmbuf->u.tx_info.retry_limit << 8;
|
||||
plocal_tx_pd->tx_control |= pmbuf->u.tx_info.retry_limit
|
||||
<< 8;
|
||||
plocal_tx_pd->tx_control |= TXPD_RETRY_ENABLE;
|
||||
}
|
||||
}
|
||||
|
@ -188,10 +184,10 @@ done:
|
|||
* @param priv A pointer to mlan_private structure
|
||||
* @param flags Transmit Pkt Flags
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise failure
|
||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise
|
||||
* failure
|
||||
*/
|
||||
mlan_status
|
||||
wlan_send_null_packet(pmlan_private priv, t_u8 flags)
|
||||
mlan_status wlan_send_null_packet(pmlan_private priv, t_u8 flags)
|
||||
{
|
||||
pmlan_adapter pmadapter = MNULL;
|
||||
TxPD *ptx_pd;
|
||||
|
@ -297,8 +293,7 @@ done:
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
t_u8
|
||||
wlan_check_last_packet_indication(pmlan_private priv)
|
||||
t_u8 wlan_check_last_packet_indication(pmlan_private priv)
|
||||
{
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
t_u8 ret = MFALSE;
|
||||
|
@ -313,12 +308,13 @@ wlan_check_last_packet_indication(pmlan_private priv)
|
|||
if (wlan_bypass_tx_list_empty(pmadapter) &&
|
||||
wlan_wmm_lists_empty(pmadapter)) {
|
||||
if (((priv->curr_bss_params.wmm_uapsd_enabled == MTRUE) &&
|
||||
priv->wmm_qosinfo) || prop_ps)
|
||||
priv->wmm_qosinfo) ||
|
||||
prop_ps)
|
||||
|
||||
ret = MTRUE;
|
||||
}
|
||||
if (ret && !pmadapter->cmd_sent && !pmadapter->curr_cmd
|
||||
&& !wlan_is_cmd_pending(pmadapter)) {
|
||||
if (ret && !pmadapter->cmd_sent && !pmadapter->curr_cmd &&
|
||||
!wlan_is_cmd_pending(pmadapter)) {
|
||||
pmadapter->delay_null_pkt = MFALSE;
|
||||
ret = MTRUE;
|
||||
} else {
|
||||
|
|
|
@ -58,8 +58,7 @@ Change Log:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_handle_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||
mlan_status wlan_handle_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_private priv = MNULL;
|
||||
|
@ -98,10 +97,11 @@ done:
|
|||
* @param pmbuf A pointer to the mlan_buffer for process
|
||||
* @param tx_param A pointer to mlan_tx_param structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise failure
|
||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise
|
||||
* failure
|
||||
*/
|
||||
mlan_status
|
||||
wlan_process_tx(pmlan_private priv, pmlan_buffer pmbuf, mlan_tx_param *tx_param)
|
||||
mlan_status wlan_process_tx(pmlan_private priv, pmlan_buffer pmbuf,
|
||||
mlan_tx_param *tx_param)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
|
@ -187,9 +187,9 @@ done:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_write_data_complete(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_buffer pmbuf, IN mlan_status status)
|
||||
mlan_status wlan_write_data_complete(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_buffer pmbuf,
|
||||
IN mlan_status status)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb;
|
||||
|
@ -215,8 +215,8 @@ wlan_write_data_complete(IN pmlan_adapter pmadapter,
|
|||
for (i = 0; i <= use_count; i++) {
|
||||
pmbuf_next = pmbuf->pnext;
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_MOAL_TX_BUF)
|
||||
pcb->moal_send_packet_complete
|
||||
(pmadapter->pmoal_handle, pmbuf,
|
||||
pcb->moal_send_packet_complete(
|
||||
pmadapter->pmoal_handle, pmbuf,
|
||||
status);
|
||||
else
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
|
@ -226,9 +226,8 @@ wlan_write_data_complete(IN pmlan_adapter pmadapter,
|
|||
#endif
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_MOAL_TX_BUF) {
|
||||
/* pmbuf was allocated by MOAL */
|
||||
pcb->moal_send_packet_complete(pmadapter->
|
||||
pmoal_handle,
|
||||
pmbuf, status);
|
||||
pcb->moal_send_packet_complete(
|
||||
pmadapter->pmoal_handle, pmbuf, status);
|
||||
} else {
|
||||
/* pmbuf was allocated by MLAN */
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
|
@ -251,9 +250,9 @@ wlan_write_data_complete(IN pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status
|
||||
wlan_recv_packet_complete(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_buffer pmbuf, IN mlan_status status)
|
||||
mlan_status wlan_recv_packet_complete(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_buffer pmbuf,
|
||||
IN mlan_status status)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb;
|
||||
|
@ -288,8 +287,7 @@ wlan_recv_packet_complete(IN pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
wlan_add_buf_bypass_txqueue(mlan_adapter *pmadapter, pmlan_buffer pmbuf)
|
||||
t_void wlan_add_buf_bypass_txqueue(mlan_adapter *pmadapter, pmlan_buffer pmbuf)
|
||||
{
|
||||
pmlan_private priv = pmadapter->priv[pmbuf->bss_index];
|
||||
ENTER();
|
||||
|
@ -313,8 +311,7 @@ wlan_add_buf_bypass_txqueue(mlan_adapter *pmadapter, pmlan_buffer pmbuf)
|
|||
*
|
||||
* @return MFALSE if not empty; MTRUE if empty
|
||||
*/
|
||||
INLINE t_u8
|
||||
wlan_bypass_tx_list_empty(mlan_adapter *pmadapter)
|
||||
INLINE t_u8 wlan_bypass_tx_list_empty(mlan_adapter *pmadapter)
|
||||
{
|
||||
return (pmadapter->bypass_pkt_count) ? MFALSE : MTRUE;
|
||||
}
|
||||
|
@ -326,16 +323,14 @@ wlan_bypass_tx_list_empty(mlan_adapter *pmadapter)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
wlan_cleanup_bypass_txq(mlan_private *priv)
|
||||
t_void wlan_cleanup_bypass_txq(mlan_private *priv)
|
||||
{
|
||||
pmlan_buffer pmbuf;
|
||||
mlan_adapter *pmadapter = priv->adapter;
|
||||
ENTER();
|
||||
pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle,
|
||||
priv->bypass_txq.plock);
|
||||
while ((pmbuf =
|
||||
(pmlan_buffer)util_peek_list(pmadapter->pmoal_handle,
|
||||
while ((pmbuf = (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle,
|
||||
&priv->bypass_txq, MNULL,
|
||||
MNULL))) {
|
||||
util_unlink_list(pmadapter->pmoal_handle, &priv->bypass_txq,
|
||||
|
@ -355,8 +350,7 @@ wlan_cleanup_bypass_txq(mlan_private *priv)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
wlan_process_bypass_tx(pmlan_adapter pmadapter)
|
||||
t_void wlan_process_bypass_tx(pmlan_adapter pmadapter)
|
||||
{
|
||||
pmlan_buffer pmbuf;
|
||||
mlan_tx_param tx_param;
|
||||
|
@ -368,67 +362,51 @@ wlan_process_bypass_tx(pmlan_adapter pmadapter)
|
|||
for (j = 0; j < pmadapter->priv_num; ++j) {
|
||||
priv = pmadapter->priv[j];
|
||||
if (priv) {
|
||||
pmbuf = (pmlan_buffer)
|
||||
util_dequeue_list(pmadapter->
|
||||
pmoal_handle,
|
||||
pmbuf = (pmlan_buffer)util_dequeue_list(
|
||||
pmadapter->pmoal_handle,
|
||||
&priv->bypass_txq,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock);
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks.moal_spin_unlock);
|
||||
if (pmbuf) {
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock(pmadapter->
|
||||
pmoal_handle,
|
||||
priv->bypass_txq.
|
||||
plock);
|
||||
pmadapter->callbacks.moal_spin_lock(
|
||||
pmadapter->pmoal_handle,
|
||||
priv->bypass_txq.plock);
|
||||
pmadapter->bypass_pkt_count--;
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock(pmadapter->
|
||||
pmoal_handle,
|
||||
priv->
|
||||
bypass_txq.
|
||||
plock);
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
priv->bypass_txq.plock);
|
||||
PRINTM(MINFO,
|
||||
"Dequeuing bypassed packet %p\n",
|
||||
pmbuf);
|
||||
if (wlan_bypass_tx_list_empty
|
||||
(pmadapter))
|
||||
if (wlan_bypass_tx_list_empty(
|
||||
pmadapter))
|
||||
tx_param.next_pkt_len = 0;
|
||||
else
|
||||
tx_param.next_pkt_len =
|
||||
pmbuf->data_len;
|
||||
status = wlan_process_tx(pmadapter->
|
||||
priv[pmbuf->
|
||||
bss_index],
|
||||
pmbuf,
|
||||
&tx_param);
|
||||
status = wlan_process_tx(
|
||||
pmadapter->priv[pmbuf->bss_index],
|
||||
pmbuf, &tx_param);
|
||||
|
||||
if (status == MLAN_STATUS_RESOURCE) {
|
||||
/* Queue the packet again so that it will be TX'ed later */
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock
|
||||
(pmadapter->
|
||||
pmoal_handle,
|
||||
priv->bypass_txq.
|
||||
plock);
|
||||
/* Queue the packet again so
|
||||
* that it will be TX'ed later
|
||||
*/
|
||||
pmadapter->callbacks.moal_spin_lock(
|
||||
pmadapter->pmoal_handle,
|
||||
priv->bypass_txq.plock);
|
||||
pmadapter->bypass_pkt_count++;
|
||||
util_enqueue_list_head
|
||||
(pmadapter->
|
||||
pmoal_handle,
|
||||
util_enqueue_list_head(
|
||||
pmadapter->pmoal_handle,
|
||||
&priv->bypass_txq,
|
||||
(pmlan_linked_list)
|
||||
pmbuf,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock);
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock
|
||||
(pmadapter->
|
||||
pmoal_handle,
|
||||
priv->bypass_txq.
|
||||
plock);
|
||||
(pmlan_linked_list)pmbuf,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_lock,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_unlock);
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
priv->bypass_txq.plock);
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
|
@ -436,7 +414,7 @@ wlan_process_bypass_tx(pmlan_adapter pmadapter)
|
|||
}
|
||||
}
|
||||
}
|
||||
} while (!pmadapter->data_sent && !pmadapter->tx_lock_flag
|
||||
&& !wlan_bypass_tx_list_empty(pmadapter));
|
||||
} while (!pmadapter->data_sent && !pmadapter->tx_lock_flag &&
|
||||
!wlan_bypass_tx_list_empty(pmadapter));
|
||||
LEAVE();
|
||||
}
|
||||
|
|
|
@ -39,15 +39,12 @@ mlan_status wlan_uap_get_beacon_dtim(IN pmlan_private pmpriv);
|
|||
|
||||
mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req);
|
||||
|
||||
mlan_status wlan_ops_uap_prepare_cmd(IN t_void *priv,
|
||||
IN t_u16 cmd_no,
|
||||
IN t_u16 cmd_action,
|
||||
IN t_u32 cmd_oid,
|
||||
mlan_status wlan_ops_uap_prepare_cmd(IN t_void *priv, IN t_u16 cmd_no,
|
||||
IN t_u16 cmd_action, IN t_u32 cmd_oid,
|
||||
IN t_void *pioctl_buf,
|
||||
IN t_void *pdata_buf, IN t_void *pcmd_buf);
|
||||
|
||||
mlan_status wlan_ops_uap_process_cmdresp(IN t_void *priv,
|
||||
IN t_u16 cmdresp_no,
|
||||
mlan_status wlan_ops_uap_process_cmdresp(IN t_void *priv, IN t_u16 cmdresp_no,
|
||||
IN t_void *pcmd_buf,
|
||||
IN t_void *pioctl);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -53,8 +53,8 @@ Change log:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_upload_uap_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||
static mlan_status wlan_upload_uap_rx_packet(pmlan_adapter pmadapter,
|
||||
pmlan_buffer pmbuf)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#ifdef DEBUG_LEVEL1
|
||||
|
@ -102,7 +102,6 @@ wlan_upload_uap_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
LEAVE();
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -111,10 +110,10 @@ wlan_upload_uap_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
* @param priv A pointer to mlan_private
|
||||
* @param mac mac address to find in station list table
|
||||
*
|
||||
* @return MLAN_STATUS_FAILURE -- drop packet, otherwise forward to network stack
|
||||
* @return MLAN_STATUS_FAILURE -- drop packet, otherwise forward to
|
||||
* network stack
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_check_unicast_packet(mlan_private *priv, t_u8 *mac)
|
||||
static mlan_status wlan_check_unicast_packet(mlan_private *priv, t_u8 *mac)
|
||||
{
|
||||
int j;
|
||||
sta_node *sta_ptr = MNULL;
|
||||
|
@ -150,7 +149,6 @@ wlan_check_unicast_packet(mlan_private *priv, t_u8 *mac)
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Global Functions
|
||||
********************************************************/
|
||||
|
@ -162,8 +160,7 @@ wlan_check_unicast_packet(mlan_private *priv, t_u8 *mac)
|
|||
*
|
||||
* @return headptr or MNULL
|
||||
*/
|
||||
t_void *
|
||||
wlan_ops_uap_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
||||
t_void *wlan_ops_uap_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
||||
{
|
||||
pmlan_private pmpriv = (pmlan_private)priv;
|
||||
TxPD *plocal_tx_pd;
|
||||
|
@ -190,8 +187,8 @@ wlan_ops_uap_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
|||
pmbuf->data_offset += sizeof(pkt_type) + sizeof(tx_control);
|
||||
pmbuf->data_len -= sizeof(pkt_type) + sizeof(tx_control);
|
||||
}
|
||||
if (pmbuf->data_offset < (sizeof(TxPD) + pmpriv->intf_hr_len +
|
||||
DMA_ALIGNMENT)) {
|
||||
if (pmbuf->data_offset <
|
||||
(sizeof(TxPD) + pmpriv->intf_hr_len + DMA_ALIGNMENT)) {
|
||||
PRINTM(MERROR,
|
||||
"not enough space for TxPD: headroom=%d pkt_len=%d, required=%d\n",
|
||||
pmbuf->data_offset, pmbuf->data_len,
|
||||
|
@ -203,8 +200,7 @@ wlan_ops_uap_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
|||
}
|
||||
|
||||
/* head_ptr should be aligned */
|
||||
head_ptr =
|
||||
pmbuf->pbuf + pmbuf->data_offset - sizeof(TxPD) -
|
||||
head_ptr = pmbuf->pbuf + pmbuf->data_offset - sizeof(TxPD) -
|
||||
pmpriv->intf_hr_len;
|
||||
head_ptr = (t_u8 *)((t_ptr)head_ptr & ~((t_ptr)(DMA_ALIGNMENT - 1)));
|
||||
|
||||
|
@ -227,10 +223,8 @@ wlan_ops_uap_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
|||
* Set the priority specific tx_control field, setting of 0 will
|
||||
* cause the default value to be used later in this function
|
||||
*/
|
||||
plocal_tx_pd->tx_control
|
||||
=
|
||||
pmpriv->wmm.user_pri_pkt_tx_ctrl[plocal_tx_pd->
|
||||
priority];
|
||||
plocal_tx_pd->tx_control =
|
||||
pmpriv->wmm.user_pri_pkt_tx_ctrl[plocal_tx_pd->priority];
|
||||
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_TX_STATUS) {
|
||||
plocal_tx_pd->tx_control_1 |= pmbuf->tx_seq_num << 8;
|
||||
|
@ -238,9 +232,8 @@ wlan_ops_uap_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
|||
}
|
||||
|
||||
/* Offset of actual data */
|
||||
plocal_tx_pd->tx_pkt_offset =
|
||||
(t_u16)((t_ptr)pmbuf->pbuf + pmbuf->data_offset -
|
||||
(t_ptr)plocal_tx_pd);
|
||||
plocal_tx_pd->tx_pkt_offset = (t_u16)(
|
||||
(t_ptr)pmbuf->pbuf + pmbuf->data_offset - (t_ptr)plocal_tx_pd);
|
||||
|
||||
if (!plocal_tx_pd->tx_control) {
|
||||
/* TxCtrl set by user or default */
|
||||
|
@ -257,9 +250,10 @@ wlan_ops_uap_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
|||
pmbuf->pbuf + pmbuf->data_offset,
|
||||
sizeof(dst_mac), sizeof(dst_mac));
|
||||
plocal_tx_pd->tx_control |=
|
||||
(wlan_ieee_rateid_to_mrvl_rateid
|
||||
(pmpriv, pmbuf->u.tx_info.data_rate,
|
||||
dst_mac) << 16);
|
||||
(wlan_ieee_rateid_to_mrvl_rateid(
|
||||
pmpriv, pmbuf->u.tx_info.data_rate,
|
||||
dst_mac)
|
||||
<< 16);
|
||||
plocal_tx_pd->tx_control |= TXPD_TXRATE_ENABLE;
|
||||
}
|
||||
plocal_tx_pd->tx_control_1 |= pmbuf->u.tx_info.channel << 21;
|
||||
|
@ -271,8 +265,8 @@ wlan_ops_uap_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf)
|
|||
plocal_tx_pd->tx_control |=
|
||||
(t_u32)pmbuf->u.tx_info.tx_power.val;
|
||||
if (pmbuf->u.tx_info.retry_limit) {
|
||||
plocal_tx_pd->tx_control |=
|
||||
pmbuf->u.tx_info.retry_limit << 8;
|
||||
plocal_tx_pd->tx_control |= pmbuf->u.tx_info.retry_limit
|
||||
<< 8;
|
||||
plocal_tx_pd->tx_control |= TXPD_RETRY_ENABLE;
|
||||
}
|
||||
}
|
||||
|
@ -298,8 +292,8 @@ done:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_ops_uap_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
||||
mlan_status wlan_ops_uap_process_rx_packet(IN t_void *adapter,
|
||||
IN pmlan_buffer pmbuf)
|
||||
{
|
||||
pmlan_adapter pmadapter = (pmlan_adapter)adapter;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -351,8 +345,9 @@ wlan_ops_uap_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
|||
(t_u16)pmbuf->data_len) {
|
||||
PRINTM(MERROR,
|
||||
"Wrong rx packet: len=%d,rx_pkt_offset=%d,"
|
||||
" rx_pkt_length=%d\n", pmbuf->data_len,
|
||||
prx_pd->rx_pkt_offset, prx_pd->rx_pkt_length);
|
||||
" rx_pkt_length=%d\n",
|
||||
pmbuf->data_len, prx_pd->rx_pkt_offset,
|
||||
prx_pd->rx_pkt_length);
|
||||
pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
|
@ -365,20 +360,16 @@ wlan_ops_uap_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
|||
/* Check if this is mgmt packet and needs to
|
||||
* forwarded to app as an event
|
||||
*/
|
||||
puap_pkt_hdr =
|
||||
(wlan_mgmt_pkt *)((t_u8 *)prx_pd +
|
||||
puap_pkt_hdr = (wlan_mgmt_pkt *)((t_u8 *)prx_pd +
|
||||
prx_pd->rx_pkt_offset);
|
||||
puap_pkt_hdr->frm_len = wlan_le16_to_cpu(puap_pkt_hdr->frm_len);
|
||||
if ((puap_pkt_hdr->wlan_header.
|
||||
frm_ctl & IEEE80211_FC_MGMT_FRAME_TYPE_MASK) == 0)
|
||||
wlan_process_802dot11_mgmt_pkt(pmadapter->
|
||||
priv[pmbuf->bss_index],
|
||||
(t_u8 *)&puap_pkt_hdr->
|
||||
wlan_header,
|
||||
puap_pkt_hdr->frm_len +
|
||||
sizeof(wlan_mgmt_pkt) -
|
||||
sizeof(puap_pkt_hdr->
|
||||
frm_len),
|
||||
if ((puap_pkt_hdr->wlan_header.frm_ctl &
|
||||
IEEE80211_FC_MGMT_FRAME_TYPE_MASK) == 0)
|
||||
wlan_process_802dot11_mgmt_pkt(
|
||||
pmadapter->priv[pmbuf->bss_index],
|
||||
(t_u8 *)&puap_pkt_hdr->wlan_header,
|
||||
puap_pkt_hdr->frm_len + sizeof(wlan_mgmt_pkt) -
|
||||
sizeof(puap_pkt_hdr->frm_len),
|
||||
(RxPD *)prx_pd);
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
goto done;
|
||||
|
@ -390,17 +381,11 @@ wlan_ops_uap_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
|||
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_UAP) {
|
||||
antenna = wlan_adjust_antenna(priv, (RxPD *)prx_pd);
|
||||
adj_rx_rate =
|
||||
wlan_adjust_data_rate(priv, priv->rxpd_rate,
|
||||
priv->rxpd_rate_info);
|
||||
pmadapter->callbacks.moal_hist_data_add(pmadapter->
|
||||
pmoal_handle,
|
||||
pmbuf->
|
||||
bss_index,
|
||||
adj_rx_rate,
|
||||
prx_pd->snr,
|
||||
prx_pd->nf,
|
||||
antenna);
|
||||
adj_rx_rate = wlan_adjust_data_rate(
|
||||
priv, priv->rxpd_rate, priv->rxpd_rate_info);
|
||||
pmadapter->callbacks.moal_hist_data_add(
|
||||
pmadapter->pmoal_handle, pmbuf->bss_index,
|
||||
adj_rx_rate, prx_pd->snr, prx_pd->nf, antenna);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -408,21 +393,19 @@ wlan_ops_uap_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
|||
if (sta_ptr) {
|
||||
sta_ptr->snr = prx_pd->snr;
|
||||
sta_ptr->nf = prx_pd->nf;
|
||||
pmadapter->callbacks.moal_get_system_time(pmadapter->
|
||||
pmoal_handle,
|
||||
&last_rx_sec,
|
||||
&last_rx_usec);
|
||||
pmadapter->callbacks.moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &last_rx_sec, &last_rx_usec);
|
||||
sta_ptr->stats.last_rx_in_msec =
|
||||
(t_u64)last_rx_sec * 1000 + (t_u64)last_rx_usec / 1000;
|
||||
}
|
||||
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
/**process eapol packet for uap*/
|
||||
if (IsAuthenticatorEnabled(priv->psapriv) &&
|
||||
(!memcmp(pmadapter, &prx_pkt->eth803_hdr.h803_len,
|
||||
eapol_type, sizeof(eapol_type)))) {
|
||||
ret = AuthenticatorProcessEapolPacket(priv->psapriv,
|
||||
((t_u8 *)prx_pd +
|
||||
prx_pd->rx_pkt_offset),
|
||||
(!memcmp(pmadapter, &prx_pkt->eth803_hdr.h803_len, eapol_type,
|
||||
sizeof(eapol_type)))) {
|
||||
ret = AuthenticatorProcessEapolPacket(
|
||||
priv->psapriv, ((t_u8 *)prx_pd + prx_pd->rx_pkt_offset),
|
||||
prx_pd->rx_pkt_length);
|
||||
if (ret == MLAN_STATUS_SUCCESS) {
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
|
@ -444,10 +427,9 @@ wlan_ops_uap_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
|||
}
|
||||
/* check if UAP enable 11n */
|
||||
if (!priv->is_11n_enabled ||
|
||||
(!wlan_11n_get_rxreorder_tbl
|
||||
((mlan_private *)priv, prx_pd->priority, ta)
|
||||
&& (prx_pd->rx_pkt_type != PKT_TYPE_AMSDU)
|
||||
)) {
|
||||
(!wlan_11n_get_rxreorder_tbl((mlan_private *)priv, prx_pd->priority,
|
||||
ta) &&
|
||||
(prx_pd->rx_pkt_type != PKT_TYPE_AMSDU))) {
|
||||
if (priv->pkt_fwd)
|
||||
wlan_process_uap_rx_packet(priv, pmbuf);
|
||||
else
|
||||
|
@ -455,9 +437,9 @@ wlan_ops_uap_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf)
|
|||
goto done;
|
||||
}
|
||||
/* Reorder and send to OS */
|
||||
ret = mlan_11n_rxreorder_pkt(priv, prx_pd->seq_num,
|
||||
prx_pd->priority, ta,
|
||||
(t_u8)prx_pd->rx_pkt_type, (void *)pmbuf);
|
||||
ret = mlan_11n_rxreorder_pkt(priv, prx_pd->seq_num, prx_pd->priority,
|
||||
ta, (t_u8)prx_pd->rx_pkt_type,
|
||||
(void *)pmbuf);
|
||||
if (ret || (rx_pkt_type == PKT_TYPE_BAR)) {
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
}
|
||||
|
@ -475,8 +457,7 @@ done:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_uap_recv_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
||||
mlan_status wlan_uap_recv_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
||||
{
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -501,7 +482,8 @@ wlan_uap_recv_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
|||
if (prx_pkt->eth803_hdr.dest_addr[0] & 0x01) {
|
||||
if (!(priv->pkt_fwd & PKT_FWD_INTRA_BCAST)) {
|
||||
/* Multicast pkt */
|
||||
newbuf = wlan_alloc_mlan_buffer(pmadapter,
|
||||
newbuf =
|
||||
wlan_alloc_mlan_buffer(pmadapter,
|
||||
MLAN_TX_DATA_BUF_SIZE_2K,
|
||||
0, MOAL_MALLOC_BUFFER);
|
||||
if (newbuf) {
|
||||
|
@ -513,13 +495,11 @@ wlan_uap_recv_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
|||
newbuf->data_offset =
|
||||
(sizeof(TxPD) + priv->intf_hr_len +
|
||||
DMA_ALIGNMENT);
|
||||
util_scalar_increment(pmadapter->pmoal_handle,
|
||||
&pmadapter->
|
||||
pending_bridge_pkts,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock);
|
||||
util_scalar_increment(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts,
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks.moal_spin_unlock);
|
||||
|
||||
newbuf->flags |= MLAN_BUF_FLAG_BRIDGE_BUF;
|
||||
|
||||
|
@ -532,26 +512,26 @@ wlan_uap_recv_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
|||
MLAN_TX_DATA_BUF_SIZE_2K);
|
||||
newbuf->data_len = pmbuf->data_len;
|
||||
wlan_wmm_add_buf_txqueue(pmadapter, newbuf);
|
||||
if (util_scalar_read(pmadapter->pmoal_handle,
|
||||
&pmadapter->
|
||||
pending_bridge_pkts,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock) >
|
||||
if (util_scalar_read(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts,
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_unlock) >
|
||||
RX_HIGH_THRESHOLD)
|
||||
wlan_drop_tx_pkts(priv);
|
||||
wlan_recv_event(priv,
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||
wlan_recv_event(
|
||||
priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||
MNULL);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((!(priv->pkt_fwd & PKT_FWD_INTRA_UCAST)) &&
|
||||
(wlan_get_station_entry
|
||||
(priv, prx_pkt->eth803_hdr.dest_addr))) {
|
||||
(wlan_get_station_entry(priv,
|
||||
prx_pkt->eth803_hdr.dest_addr))) {
|
||||
/* Intra BSS packet */
|
||||
newbuf = wlan_alloc_mlan_buffer(pmadapter,
|
||||
newbuf =
|
||||
wlan_alloc_mlan_buffer(pmadapter,
|
||||
MLAN_TX_DATA_BUF_SIZE_2K,
|
||||
0, MOAL_MALLOC_BUFFER);
|
||||
if (newbuf) {
|
||||
|
@ -563,13 +543,11 @@ wlan_uap_recv_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
|||
newbuf->data_offset =
|
||||
(sizeof(TxPD) + priv->intf_hr_len +
|
||||
DMA_ALIGNMENT);
|
||||
util_scalar_increment(pmadapter->pmoal_handle,
|
||||
&pmadapter->
|
||||
pending_bridge_pkts,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock);
|
||||
util_scalar_increment(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts,
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks.moal_spin_unlock);
|
||||
newbuf->flags |= MLAN_BUF_FLAG_BRIDGE_BUF;
|
||||
|
||||
/* copy the data */
|
||||
|
@ -581,24 +559,22 @@ wlan_uap_recv_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
|||
MLAN_TX_DATA_BUF_SIZE_2K);
|
||||
newbuf->data_len = pmbuf->data_len;
|
||||
wlan_wmm_add_buf_txqueue(pmadapter, newbuf);
|
||||
if (util_scalar_read(pmadapter->pmoal_handle,
|
||||
&pmadapter->
|
||||
pending_bridge_pkts,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock) >
|
||||
if (util_scalar_read(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts,
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_unlock) >
|
||||
RX_HIGH_THRESHOLD)
|
||||
wlan_drop_tx_pkts(priv);
|
||||
wlan_recv_event(priv,
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||
wlan_recv_event(
|
||||
priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||
MNULL);
|
||||
}
|
||||
goto done;
|
||||
} else if (MLAN_STATUS_FAILURE ==
|
||||
wlan_check_unicast_packet(priv,
|
||||
prx_pkt->eth803_hdr.
|
||||
dest_addr)) {
|
||||
wlan_check_unicast_packet(
|
||||
priv, prx_pkt->eth803_hdr.dest_addr)) {
|
||||
/* drop packet */
|
||||
PRINTM(MDATA, "Drop AMSDU dest " MACSTR "\n",
|
||||
MAC2STR(prx_pkt->eth803_hdr.dest_addr));
|
||||
|
@ -623,8 +599,8 @@ done:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_process_uap_rx_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
||||
mlan_status wlan_process_uap_rx_packet(IN mlan_private *priv,
|
||||
IN pmlan_buffer pmbuf)
|
||||
{
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -659,7 +635,8 @@ wlan_process_uap_rx_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
|||
if (prx_pkt->eth803_hdr.dest_addr[0] & 0x01) {
|
||||
if (!(priv->pkt_fwd & PKT_FWD_INTRA_BCAST)) {
|
||||
/* Multicast pkt */
|
||||
newbuf = wlan_alloc_mlan_buffer(pmadapter,
|
||||
newbuf =
|
||||
wlan_alloc_mlan_buffer(pmadapter,
|
||||
MLAN_TX_DATA_BUF_SIZE_2K,
|
||||
0, MOAL_MALLOC_BUFFER);
|
||||
if (newbuf) {
|
||||
|
@ -671,13 +648,11 @@ wlan_process_uap_rx_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
|||
newbuf->data_offset =
|
||||
(sizeof(TxPD) + priv->intf_hr_len +
|
||||
DMA_ALIGNMENT);
|
||||
util_scalar_increment(pmadapter->pmoal_handle,
|
||||
&pmadapter->
|
||||
pending_bridge_pkts,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock);
|
||||
util_scalar_increment(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts,
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks.moal_spin_unlock);
|
||||
newbuf->flags |= MLAN_BUF_FLAG_BRIDGE_BUF;
|
||||
|
||||
/* copy the data, skip rxpd */
|
||||
|
@ -692,30 +667,29 @@ wlan_process_uap_rx_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
|||
newbuf->data_len =
|
||||
pmbuf->data_len - prx_pd->rx_pkt_offset;
|
||||
wlan_wmm_add_buf_txqueue(pmadapter, newbuf);
|
||||
if (util_scalar_read(pmadapter->pmoal_handle,
|
||||
&pmadapter->
|
||||
pending_bridge_pkts,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock) >
|
||||
if (util_scalar_read(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts,
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_unlock) >
|
||||
RX_HIGH_THRESHOLD)
|
||||
wlan_drop_tx_pkts(priv);
|
||||
wlan_recv_event(priv,
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||
wlan_recv_event(
|
||||
priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||
MNULL);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((!(priv->pkt_fwd & PKT_FWD_INTRA_UCAST)) &&
|
||||
(wlan_get_station_entry
|
||||
(priv, prx_pkt->eth803_hdr.dest_addr))) {
|
||||
(wlan_get_station_entry(priv,
|
||||
prx_pkt->eth803_hdr.dest_addr))) {
|
||||
/* Forwarding Intra-BSS packet */
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_RX_DEAGGR) {
|
||||
newbuf = wlan_alloc_mlan_buffer
|
||||
(pmadapter,
|
||||
newbuf = wlan_alloc_mlan_buffer(
|
||||
pmadapter,
|
||||
MLAN_TX_DATA_BUF_SIZE_2K, 0,
|
||||
MOAL_MALLOC_BUFFER);
|
||||
if (newbuf) {
|
||||
|
@ -733,59 +707,50 @@ wlan_process_uap_rx_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
|||
(sizeof(TxPD) +
|
||||
priv->intf_hr_len +
|
||||
DMA_ALIGNMENT);
|
||||
util_scalar_increment
|
||||
(pmadapter->
|
||||
pmoal_handle,
|
||||
&pmadapter->
|
||||
pending_bridge_pkts,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock);
|
||||
util_scalar_increment(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_lock,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_unlock);
|
||||
newbuf->flags |=
|
||||
MLAN_BUF_FLAG_BRIDGE_BUF;
|
||||
|
||||
/* copy the data, skip rxpd */
|
||||
memcpy_ext(pmadapter,
|
||||
(t_u8 *)newbuf->
|
||||
pbuf +
|
||||
memcpy_ext(
|
||||
pmadapter,
|
||||
(t_u8 *)newbuf->pbuf +
|
||||
newbuf->data_offset,
|
||||
pmbuf->pbuf +
|
||||
pmbuf->data_offset +
|
||||
prx_pd->
|
||||
rx_pkt_offset,
|
||||
prx_pd->rx_pkt_offset,
|
||||
pmbuf->data_len -
|
||||
prx_pd->
|
||||
rx_pkt_offset,
|
||||
prx_pd->rx_pkt_offset,
|
||||
pmbuf->data_len -
|
||||
prx_pd->
|
||||
rx_pkt_offset);
|
||||
prx_pd->rx_pkt_offset);
|
||||
newbuf->data_len =
|
||||
pmbuf->data_len -
|
||||
prx_pd->rx_pkt_offset;
|
||||
wlan_wmm_add_buf_txqueue
|
||||
(pmadapter, newbuf);
|
||||
if (util_scalar_read
|
||||
(pmadapter->pmoal_handle,
|
||||
&pmadapter->
|
||||
pending_bridge_pkts,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock) >
|
||||
wlan_wmm_add_buf_txqueue(
|
||||
pmadapter, newbuf);
|
||||
if (util_scalar_read(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_lock,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_unlock) >
|
||||
RX_HIGH_THRESHOLD)
|
||||
wlan_drop_tx_pkts(priv);
|
||||
wlan_recv_event(priv,
|
||||
wlan_recv_event(
|
||||
priv,
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||
MNULL);
|
||||
}
|
||||
pmadapter->callbacks.
|
||||
moal_recv_complete(pmadapter->
|
||||
pmoal_handle,
|
||||
pmbuf,
|
||||
pmadapter->
|
||||
rx_data_ep,
|
||||
ret);
|
||||
pmadapter->callbacks.moal_recv_complete(
|
||||
pmadapter->pmoal_handle, pmbuf,
|
||||
pmadapter->rx_data_ep, ret);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
@ -793,28 +758,25 @@ wlan_process_uap_rx_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf)
|
|||
pmbuf->data_len -= prx_pd->rx_pkt_offset;
|
||||
pmbuf->data_offset += prx_pd->rx_pkt_offset;
|
||||
pmbuf->flags |= MLAN_BUF_FLAG_BRIDGE_BUF;
|
||||
util_scalar_increment(pmadapter->pmoal_handle,
|
||||
util_scalar_increment(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock);
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks.moal_spin_unlock);
|
||||
wlan_wmm_add_buf_txqueue(pmadapter, pmbuf);
|
||||
if (util_scalar_read(pmadapter->pmoal_handle,
|
||||
if (util_scalar_read(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_lock,
|
||||
pmadapter->callbacks.
|
||||
moal_spin_unlock) >
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks.moal_spin_unlock) >
|
||||
RX_HIGH_THRESHOLD)
|
||||
wlan_drop_tx_pkts(priv);
|
||||
wlan_recv_event(priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||
MNULL);
|
||||
goto done;
|
||||
} else if (MLAN_STATUS_FAILURE ==
|
||||
wlan_check_unicast_packet(priv,
|
||||
prx_pkt->eth803_hdr.
|
||||
dest_addr)) {
|
||||
wlan_check_unicast_packet(
|
||||
priv, prx_pkt->eth803_hdr.dest_addr)) {
|
||||
PRINTM(MDATA, "Drop Pkts: Rx dest " MACSTR "\n",
|
||||
MAC2STR(prx_pkt->eth803_hdr.dest_addr));
|
||||
pmbuf->status_code = MLAN_ERROR_PKT_INVALID;
|
||||
|
|
|
@ -99,8 +99,7 @@ static const struct _mlan_card_info mlan_card_info_usb9097 = {
|
|||
* @param rev_id A pointer to chip revision id
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_usb_check_revision(mlan_adapter *pmadapter, t_u32 *rev_id)
|
||||
mlan_status wlan_usb_check_revision(mlan_adapter *pmadapter, t_u32 *rev_id)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
@ -174,8 +173,8 @@ cleanup:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_usb_prog_fw_w_helper(IN pmlan_adapter pmadapter, IN pmlan_fw_image pmfw)
|
||||
static mlan_status wlan_usb_prog_fw_w_helper(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_fw_image pmfw)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
@ -243,18 +242,18 @@ wlan_usb_prog_fw_w_helper(IN pmlan_adapter pmadapter, IN pmlan_fw_image pmfw)
|
|||
sizeof(FWHeader));
|
||||
DataLength = 0;
|
||||
} else {
|
||||
/* Copy the header of the firmware data to get the length */
|
||||
/* Copy the header of the firmware data to get the
|
||||
* length */
|
||||
if (firmware)
|
||||
memcpy_ext(pmadapter, &fwdata->fw_header,
|
||||
&firmware[TotalBytes],
|
||||
sizeof(FWHeader),
|
||||
sizeof(fwdata->fw_header));
|
||||
else
|
||||
pcb->moal_get_fw_data(pmadapter->pmoal_handle,
|
||||
TotalBytes,
|
||||
pcb->moal_get_fw_data(
|
||||
pmadapter->pmoal_handle, TotalBytes,
|
||||
sizeof(FWHeader),
|
||||
(t_u8 *)&fwdata->
|
||||
fw_header);
|
||||
(t_u8 *)&fwdata->fw_header);
|
||||
|
||||
DataLength =
|
||||
wlan_le32_to_cpu(fwdata->fw_header.data_length);
|
||||
|
@ -297,8 +296,8 @@ wlan_usb_prog_fw_w_helper(IN pmlan_adapter pmadapter, IN pmlan_fw_image pmfw)
|
|||
mbuf.pbuf = (t_u8 *)fwdata;
|
||||
mbuf.data_len = length;
|
||||
/* Send the firmware block */
|
||||
ret = pcb->moal_write_data_sync(pmadapter->pmoal_handle,
|
||||
&mbuf,
|
||||
ret = pcb->moal_write_data_sync(
|
||||
pmadapter->pmoal_handle, &mbuf,
|
||||
pmadapter->tx_cmd_ep,
|
||||
MLAN_USB_BULK_MSG_TIMEOUT);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
|
@ -313,8 +312,8 @@ wlan_usb_prog_fw_w_helper(IN pmlan_adapter pmadapter, IN pmlan_fw_image pmfw)
|
|||
mbuf.data_len = FW_DNLD_RX_BUF_SIZE;
|
||||
|
||||
/* Receive the firmware block response */
|
||||
ret = pcb->moal_read_data_sync(pmadapter->pmoal_handle,
|
||||
&mbuf,
|
||||
ret = pcb->moal_read_data_sync(
|
||||
pmadapter->pmoal_handle, &mbuf,
|
||||
pmadapter->rx_cmd_ep,
|
||||
MLAN_USB_BULK_MSG_TIMEOUT);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
|
@ -326,7 +325,8 @@ wlan_usb_prog_fw_w_helper(IN pmlan_adapter pmadapter, IN pmlan_fw_image pmfw)
|
|||
memcpy_ext(pmadapter, &SyncFWHeader, RecvBuff,
|
||||
sizeof(FWSyncHeader), sizeof(SyncFWHeader));
|
||||
endian_convert_syncfwheader(&SyncFWHeader);
|
||||
/* Check the first firmware block response for highest bit set */
|
||||
/* Check the first firmware block response for highest
|
||||
* bit set */
|
||||
if (check_winner) {
|
||||
if (SyncFWHeader.cmd & 0x80000000) {
|
||||
PRINTM(MMSG,
|
||||
|
@ -343,7 +343,8 @@ wlan_usb_prog_fw_w_helper(IN pmlan_adapter pmadapter, IN pmlan_fw_image pmfw)
|
|||
|
||||
/* Check the firmware block response for CRC errors */
|
||||
if (SyncFWHeader.cmd) {
|
||||
/* Check firmware block response for CRC and MIC errors */
|
||||
/* Check firmware block response for CRC and MIC
|
||||
* errors */
|
||||
if (check_fw_status) {
|
||||
if (SyncFWHeader.status & MBIT(0)) {
|
||||
PRINTM(MERROR,
|
||||
|
@ -353,8 +354,8 @@ wlan_usb_prog_fw_w_helper(IN pmlan_adapter pmadapter, IN pmlan_fw_image pmfw)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
continue;
|
||||
}
|
||||
if (SyncFWHeader.
|
||||
status & (MBIT(6) | MBIT(7))) {
|
||||
if (SyncFWHeader.status &
|
||||
(MBIT(6) | MBIT(7))) {
|
||||
PRINTM(MERROR,
|
||||
"FW received Blk with MIC error 0x%x offset\n",
|
||||
SyncFWHeader.status,
|
||||
|
@ -408,8 +409,7 @@ fw_exit:
|
|||
*
|
||||
* @return Number of packets
|
||||
*/
|
||||
static int
|
||||
wlan_usb_deaggr_rx_num_pkts(pmlan_adapter pmadapter, t_u8 *pdata,
|
||||
static int wlan_usb_deaggr_rx_num_pkts(pmlan_adapter pmadapter, t_u8 *pdata,
|
||||
int aggr_pkt_len)
|
||||
{
|
||||
int pkt_count = 0, pkt_len;
|
||||
|
@ -418,8 +418,8 @@ wlan_usb_deaggr_rx_num_pkts(pmlan_adapter pmadapter, t_u8 *pdata,
|
|||
ENTER();
|
||||
while (aggr_pkt_len >= sizeof(RxPD)) {
|
||||
prx_pd = (RxPD *)pdata;
|
||||
pkt_len = wlan_le16_to_cpu(prx_pd->rx_pkt_length)
|
||||
+ wlan_le16_to_cpu(prx_pd->rx_pkt_offset);
|
||||
pkt_len = wlan_le16_to_cpu(prx_pd->rx_pkt_length) +
|
||||
wlan_le16_to_cpu(prx_pd->rx_pkt_offset);
|
||||
if (pkt_len == 0) /* blank RxPD can be at the end */
|
||||
break;
|
||||
|
||||
|
@ -431,11 +431,10 @@ wlan_usb_deaggr_rx_num_pkts(pmlan_adapter pmadapter, t_u8 *pdata,
|
|||
if (pkt_len %
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.aggr_align)
|
||||
pkt_len +=
|
||||
(pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.
|
||||
aggr_align -
|
||||
(pkt_len %
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.
|
||||
aggr_align));
|
||||
(pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl
|
||||
.aggr_align -
|
||||
(pkt_len % pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_align));
|
||||
aggr_pkt_len -= pkt_len;
|
||||
pdata += pkt_len;
|
||||
}
|
||||
|
@ -443,17 +442,12 @@ wlan_usb_deaggr_rx_num_pkts(pmlan_adapter pmadapter, t_u8 *pdata,
|
|||
return pkt_count;
|
||||
}
|
||||
|
||||
static inline t_u32
|
||||
usb_tx_aggr_pad_len(t_u32 len, usb_tx_aggr_params *pusb_tx_aggr)
|
||||
static inline t_u32 usb_tx_aggr_pad_len(t_u32 len,
|
||||
usb_tx_aggr_params *pusb_tx_aggr)
|
||||
{
|
||||
return (len % pusb_tx_aggr->aggr_ctrl.aggr_align) ? (len +
|
||||
(pusb_tx_aggr->
|
||||
aggr_ctrl.
|
||||
aggr_align -
|
||||
(len %
|
||||
pusb_tx_aggr->
|
||||
aggr_ctrl.
|
||||
aggr_align))) :
|
||||
return (len % pusb_tx_aggr->aggr_ctrl.aggr_align) ?
|
||||
(len + (pusb_tx_aggr->aggr_ctrl.aggr_align -
|
||||
(len % pusb_tx_aggr->aggr_ctrl.aggr_align))) :
|
||||
len;
|
||||
}
|
||||
|
||||
|
@ -468,8 +462,7 @@ usb_tx_aggr_pad_len(t_u32 len, usb_tx_aggr_params *pusb_tx_aggr)
|
|||
* @return N/A
|
||||
*/
|
||||
static inline t_void
|
||||
wlan_usb_tx_copy_buf_to_aggr(pmlan_adapter pmadapter,
|
||||
pmlan_buffer pmbuf_aggr,
|
||||
wlan_usb_tx_copy_buf_to_aggr(pmlan_adapter pmadapter, pmlan_buffer pmbuf_aggr,
|
||||
pmlan_buffer pmbuf,
|
||||
usb_tx_aggr_params *pusb_tx_aggr)
|
||||
{
|
||||
|
@ -478,8 +471,9 @@ wlan_usb_tx_copy_buf_to_aggr(pmlan_adapter pmadapter,
|
|||
usb_tx_aggr_pad_len(pmbuf_aggr->data_len, pusb_tx_aggr);
|
||||
memcpy_ext(pmadapter,
|
||||
pmbuf_aggr->pbuf + pmbuf_aggr->data_offset +
|
||||
pmbuf_aggr->data_len, pmbuf->pbuf + pmbuf->data_offset,
|
||||
pmbuf->data_len, pmbuf->data_len);
|
||||
pmbuf_aggr->data_len,
|
||||
pmbuf->pbuf + pmbuf->data_offset, pmbuf->data_len,
|
||||
pmbuf->data_len);
|
||||
pmbuf_aggr->data_len += pmbuf->data_len;
|
||||
LEAVE();
|
||||
}
|
||||
|
@ -498,8 +492,7 @@ wlan_usb_tx_copy_buf_to_aggr(pmlan_adapter pmadapter,
|
|||
*/
|
||||
static inline t_void
|
||||
wlan_usb_tx_copy_buf_to_aggr_v2(pmlan_adapter pmadapter,
|
||||
pmlan_buffer pmbuf_aggr,
|
||||
pmlan_buffer pmbuf,
|
||||
pmlan_buffer pmbuf_aggr, pmlan_buffer pmbuf,
|
||||
t_u8 last, usb_tx_aggr_params *pusb_tx_aggr)
|
||||
{
|
||||
t_u8 *payload;
|
||||
|
@ -510,10 +503,10 @@ wlan_usb_tx_copy_buf_to_aggr_v2(pmlan_adapter pmadapter,
|
|||
usb_tx_aggr_pad_len(pmbuf_aggr->data_len, pusb_tx_aggr);
|
||||
memcpy_ext(pmadapter,
|
||||
pmbuf_aggr->pbuf + pmbuf_aggr->data_offset +
|
||||
pmbuf_aggr->data_len, pmbuf->pbuf + pmbuf->data_offset,
|
||||
pmbuf->data_len, pmbuf->data_len);
|
||||
payload =
|
||||
pmbuf_aggr->pbuf + pmbuf_aggr->data_offset +
|
||||
pmbuf_aggr->data_len,
|
||||
pmbuf->pbuf + pmbuf->data_offset, pmbuf->data_len,
|
||||
pmbuf->data_len);
|
||||
payload = pmbuf_aggr->pbuf + pmbuf_aggr->data_offset +
|
||||
pmbuf_aggr->data_len;
|
||||
if (last) {
|
||||
offset = pmbuf->data_len;
|
||||
|
@ -545,9 +538,8 @@ wlan_usb_copy_buf_to_aggr(pmlan_adapter pmadapter,
|
|||
pmlan_buffer pmbuf_aggr = MNULL;
|
||||
t_u8 i, use_count;
|
||||
pmlan_buffer pmbuf_curr, pmbuf_next;
|
||||
pmbuf_aggr =
|
||||
wlan_alloc_mlan_buffer(pmadapter, pusb_tx_aggr->aggr_len, 0,
|
||||
MOAL_MALLOC_BUFFER);
|
||||
pmbuf_aggr = wlan_alloc_mlan_buffer(pmadapter, pusb_tx_aggr->aggr_len,
|
||||
0, MOAL_MALLOC_BUFFER);
|
||||
if (pmbuf_aggr) {
|
||||
pmbuf_curr = pusb_tx_aggr->pmbuf_aggr;
|
||||
pmbuf_aggr->bss_index = pmbuf_curr->bss_index;
|
||||
|
@ -562,13 +554,13 @@ wlan_usb_copy_buf_to_aggr(pmlan_adapter pmadapter,
|
|||
if (pusb_tx_aggr->aggr_ctrl.aggr_mode ==
|
||||
MLAN_USB_AGGR_MODE_LEN_V2) {
|
||||
if (i == use_count)
|
||||
wlan_usb_tx_copy_buf_to_aggr_v2
|
||||
(pmadapter, pmbuf_aggr,
|
||||
wlan_usb_tx_copy_buf_to_aggr_v2(
|
||||
pmadapter, pmbuf_aggr,
|
||||
pmbuf_curr, MTRUE,
|
||||
pusb_tx_aggr);
|
||||
else
|
||||
wlan_usb_tx_copy_buf_to_aggr_v2
|
||||
(pmadapter, pmbuf_aggr,
|
||||
wlan_usb_tx_copy_buf_to_aggr_v2(
|
||||
pmadapter, pmbuf_aggr,
|
||||
pmbuf_curr, MFALSE,
|
||||
pusb_tx_aggr);
|
||||
} else
|
||||
|
@ -593,8 +585,7 @@ wlan_usb_copy_buf_to_aggr(pmlan_adapter pmadapter,
|
|||
* @param pusb_tx_aggr Pointer to usb_tx_aggr_params
|
||||
*/
|
||||
static inline t_void
|
||||
wlan_usb_tx_link_buf_to_aggr(pmlan_buffer pmbuf_aggr,
|
||||
pmlan_buffer pmbuf,
|
||||
wlan_usb_tx_link_buf_to_aggr(pmlan_buffer pmbuf_aggr, pmlan_buffer pmbuf,
|
||||
usb_tx_aggr_params *pusb_tx_aggr)
|
||||
{
|
||||
/* link new buf at end of list */
|
||||
|
@ -615,8 +606,8 @@ wlan_usb_tx_link_buf_to_aggr(pmlan_buffer pmbuf_aggr,
|
|||
* @param pmadapter Pointer to mlan_adapter structure
|
||||
* @param pusb_tx_aggr Pointer to usb_tx_aggr_params
|
||||
*/
|
||||
static inline t_void
|
||||
wlan_usb_tx_send_aggr(pmlan_adapter pmadapter, usb_tx_aggr_params *pusb_tx_aggr)
|
||||
static inline t_void wlan_usb_tx_send_aggr(pmlan_adapter pmadapter,
|
||||
usb_tx_aggr_params *pusb_tx_aggr)
|
||||
{
|
||||
mlan_status ret;
|
||||
pmlan_buffer pmbuf_aggr = pusb_tx_aggr->pmbuf_aggr;
|
||||
|
@ -663,11 +654,9 @@ wlan_usb_tx_send_aggr(pmlan_adapter pmadapter, usb_tx_aggr_params *pusb_tx_aggr)
|
|||
|
||||
if (pmbuf_aggr && pmbuf_aggr->data_len) {
|
||||
pmadapter->data_sent = MTRUE;
|
||||
ret = pmadapter->callbacks.moal_write_data_async(pmadapter->
|
||||
pmoal_handle,
|
||||
pmbuf_aggr,
|
||||
pusb_tx_aggr->
|
||||
port);
|
||||
ret = pmadapter->callbacks.moal_write_data_async(
|
||||
pmadapter->pmoal_handle, pmbuf_aggr,
|
||||
pusb_tx_aggr->port);
|
||||
switch (ret) {
|
||||
case MLAN_STATUS_PRESOURCE:
|
||||
PRINTM(MINFO, "MLAN_STATUS_PRESOURCE is returned\n");
|
||||
|
@ -675,7 +664,8 @@ wlan_usb_tx_send_aggr(pmlan_adapter pmadapter, usb_tx_aggr_params *pusb_tx_aggr)
|
|||
case MLAN_STATUS_RESOURCE:
|
||||
/* Shouldn't reach here due to next condition. */
|
||||
/* TODO: (maybe) How to requeue the aggregate? */
|
||||
/* It may occur when the pending tx urbs reach the high mark */
|
||||
/* It may occur when the pending tx urbs reach the high
|
||||
* mark */
|
||||
/* Thus, block further pkts for a bit */
|
||||
PRINTM(MERROR,
|
||||
"Error: moal_write_data_async failed: 0x%X\n",
|
||||
|
@ -720,8 +710,7 @@ wlan_usb_tx_send_aggr(pmlan_adapter pmadapter, usb_tx_aggr_params *pusb_tx_aggr)
|
|||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_get_usb_device(pmlan_adapter pmadapter)
|
||||
mlan_status wlan_get_usb_device(pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u16 card_type = pmadapter->card_type;
|
||||
|
@ -782,8 +771,7 @@ wlan_get_usb_device(pmlan_adapter pmadapter)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_usb_dnld_fw(IN pmlan_adapter pmadapter, IN pmlan_fw_image pmfw)
|
||||
mlan_status wlan_usb_dnld_fw(IN pmlan_adapter pmadapter, IN pmlan_fw_image pmfw)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
|
@ -807,8 +795,8 @@ wlan_usb_dnld_fw(IN pmlan_adapter pmadapter, IN pmlan_fw_image pmfw)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_usb_deaggr_rx_pkt(IN pmlan_adapter pmadapter, IN pmlan_buffer pmbuf)
|
||||
mlan_status wlan_usb_deaggr_rx_pkt(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_buffer pmbuf)
|
||||
{
|
||||
const t_u8 zero_rx_pd[sizeof(RxPD)] = {0};
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -822,13 +810,13 @@ wlan_usb_deaggr_rx_pkt(IN pmlan_adapter pmadapter, IN pmlan_buffer pmbuf)
|
|||
|
||||
pdata = pmbuf->pbuf + pmbuf->data_offset;
|
||||
prx_pd = (RxPD *)pdata;
|
||||
curr_pkt_len = wlan_le16_to_cpu(prx_pd->rx_pkt_length)
|
||||
+ wlan_le16_to_cpu(prx_pd->rx_pkt_offset);
|
||||
curr_pkt_len = wlan_le16_to_cpu(prx_pd->rx_pkt_length) +
|
||||
wlan_le16_to_cpu(prx_pd->rx_pkt_offset);
|
||||
/* if non-aggregate, just send through, don’t process here */
|
||||
aggr_len = pmbuf->data_len;
|
||||
if ((aggr_len == curr_pkt_len)
|
||||
|| (wlan_usb_deaggr_rx_num_pkts(pmadapter, pdata, aggr_len) == 1)
|
||||
|| (pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.enable != MTRUE)) {
|
||||
if ((aggr_len == curr_pkt_len) ||
|
||||
(wlan_usb_deaggr_rx_num_pkts(pmadapter, pdata, aggr_len) == 1) ||
|
||||
(pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.enable != MTRUE)) {
|
||||
ret = wlan_handle_rx_packet(pmadapter, pmbuf);
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -875,24 +863,22 @@ wlan_usb_deaggr_rx_pkt(IN pmlan_adapter pmadapter, IN pmlan_buffer pmbuf)
|
|||
/* round up to next block boundary */
|
||||
if (curr_pkt_len %
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.aggr_align)
|
||||
curr_pkt_len +=
|
||||
(pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.
|
||||
aggr_align -
|
||||
curr_pkt_len += (pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_align -
|
||||
(curr_pkt_len %
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.
|
||||
aggr_align));
|
||||
pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_align));
|
||||
/* point to next packet */
|
||||
aggr_len -= curr_pkt_len;
|
||||
pdata += curr_pkt_len;
|
||||
prx_pd = (RxPD *)pdata;
|
||||
curr_pkt_len = wlan_le16_to_cpu(prx_pd->rx_pkt_length)
|
||||
+ wlan_le16_to_cpu(prx_pd->rx_pkt_offset);
|
||||
curr_pkt_len = wlan_le16_to_cpu(prx_pd->rx_pkt_length) +
|
||||
wlan_le16_to_cpu(prx_pd->rx_pkt_offset);
|
||||
}
|
||||
|
||||
/* free original pmbuf (since not sent for processing) */
|
||||
pmadapter->callbacks.moal_recv_complete(pmadapter->pmoal_handle,
|
||||
pmbuf, pmadapter->rx_data_ep,
|
||||
ret);
|
||||
pmadapter->callbacks.moal_recv_complete(pmadapter->pmoal_handle, pmbuf,
|
||||
pmadapter->rx_data_ep, ret);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
@ -905,8 +891,7 @@ wlan_usb_deaggr_rx_pkt(IN pmlan_adapter pmadapter, IN pmlan_buffer pmbuf)
|
|||
*
|
||||
* @return MTRUE/MFALSE
|
||||
*/
|
||||
t_u8
|
||||
wlan_is_port_tx_paused(pmlan_adapter pmadapter,
|
||||
t_u8 wlan_is_port_tx_paused(pmlan_adapter pmadapter,
|
||||
usb_tx_aggr_params *pusb_tx_aggr)
|
||||
{
|
||||
mlan_private *pmpriv = MNULL;
|
||||
|
@ -930,10 +915,8 @@ wlan_is_port_tx_paused(pmlan_adapter pmadapter,
|
|||
* @param function_context A pointer to function_context
|
||||
* @return N/A
|
||||
*/
|
||||
t_void
|
||||
wlan_usb_tx_aggr_timeout_func(t_void *function_context)
|
||||
t_void wlan_usb_tx_aggr_timeout_func(t_void *function_context)
|
||||
{
|
||||
|
||||
usb_tx_aggr_params *pusb_tx_aggr =
|
||||
(usb_tx_aggr_params *)function_context;
|
||||
pmlan_adapter pmadapter = (mlan_adapter *)pusb_tx_aggr->phandle;
|
||||
|
@ -942,9 +925,8 @@ wlan_usb_tx_aggr_timeout_func(t_void *function_context)
|
|||
ENTER();
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle, pusb_tx_aggr->paggr_lock);
|
||||
pusb_tx_aggr->aggr_hold_timer_is_set = MFALSE;
|
||||
if (pusb_tx_aggr->pmbuf_aggr && !pmadapter->data_sent
|
||||
&& !wlan_is_port_tx_paused(pmadapter, pusb_tx_aggr)
|
||||
)
|
||||
if (pusb_tx_aggr->pmbuf_aggr && !pmadapter->data_sent &&
|
||||
!wlan_is_port_tx_paused(pmadapter, pusb_tx_aggr))
|
||||
wlan_usb_tx_send_aggr(pmadapter, pusb_tx_aggr);
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pusb_tx_aggr->paggr_lock);
|
||||
|
@ -968,8 +950,7 @@ wlan_usb_tx_aggr_timeout_func(t_void *function_context)
|
|||
* in order to handle complete AFTER the aggregate is sent.
|
||||
* pmbuf_aggr->data_len is used to keep track of bytes aggregated so far.
|
||||
*/
|
||||
mlan_status
|
||||
wlan_usb_host_to_card_aggr(IN pmlan_adapter pmadapter,
|
||||
mlan_status wlan_usb_host_to_card_aggr(IN pmlan_adapter pmadapter,
|
||||
IN pmlan_buffer pmbuf,
|
||||
IN mlan_tx_param *tx_param,
|
||||
IN usb_tx_aggr_params *pusb_tx_aggr)
|
||||
|
@ -1004,7 +985,8 @@ wlan_usb_host_to_card_aggr(IN pmlan_adapter pmadapter,
|
|||
pusb_tx_aggr->hold_timeout_msec =
|
||||
MLAN_USB_TX_MIN_AGGR_TIMEOUT;
|
||||
} else {
|
||||
/* Increase timeout in milisecond if pkts are consecutive */
|
||||
/* Increase timeout in milisecond if pkts are
|
||||
* consecutive */
|
||||
if (pusb_tx_aggr->hold_timeout_msec <
|
||||
MLAN_USB_TX_MAX_AGGR_TIMEOUT)
|
||||
pusb_tx_aggr->hold_timeout_msec++;
|
||||
|
@ -1017,8 +999,7 @@ wlan_usb_host_to_card_aggr(IN pmlan_adapter pmadapter,
|
|||
|
||||
max_aggr_size = max_aggr_num = pusb_tx_aggr->aggr_ctrl.aggr_max;
|
||||
if (pusb_tx_aggr->aggr_ctrl.aggr_mode == MLAN_USB_AGGR_MODE_NUM) {
|
||||
max_aggr_size *=
|
||||
MAX(MLAN_USB_MAX_PKT_SIZE,
|
||||
max_aggr_size *= MAX(MLAN_USB_MAX_PKT_SIZE,
|
||||
pusb_tx_aggr->aggr_ctrl.aggr_align);
|
||||
}
|
||||
if (pusb_tx_aggr->aggr_ctrl.aggr_mode == MLAN_USB_AGGR_MODE_LEN)
|
||||
|
@ -1035,25 +1016,27 @@ wlan_usb_host_to_card_aggr(IN pmlan_adapter pmadapter,
|
|||
|
||||
} else {
|
||||
/* DECIDE what to do */
|
||||
aggr_len_counter =
|
||||
usb_tx_aggr_pad_len(pusb_tx_aggr->aggr_len,
|
||||
aggr_len_counter = usb_tx_aggr_pad_len(pusb_tx_aggr->aggr_len,
|
||||
pusb_tx_aggr);
|
||||
|
||||
if ((aggr_len_counter + pmbuf->data_len) < max_aggr_size) {
|
||||
f_precopy_cur_buf = 1; /* can fit current packet in aggr */
|
||||
f_precopy_cur_buf = 1; /* can fit current packet in aggr
|
||||
*/
|
||||
if (next_pkt_len) {
|
||||
aggr_len_counter +=
|
||||
usb_tx_aggr_pad_len(pmbuf->data_len,
|
||||
pusb_tx_aggr);
|
||||
aggr_len_counter += usb_tx_aggr_pad_len(
|
||||
pmbuf->data_len, pusb_tx_aggr);
|
||||
if ((aggr_len_counter + next_pkt_len) >=
|
||||
max_aggr_size)
|
||||
f_send_aggr_buf = 1; /* can't fit next packet, send now */
|
||||
f_send_aggr_buf = 1; /* can't fit next
|
||||
packet, send now
|
||||
*/
|
||||
}
|
||||
} else {
|
||||
/* can't fit current packet */
|
||||
if (pusb_tx_aggr->aggr_len)
|
||||
f_send_aggr_buf = 1; /* send aggr first */
|
||||
f_postcopy_cur_buf = 1; /* then copy into new aggr_buf */
|
||||
f_postcopy_cur_buf = 1; /* then copy into new aggr_buf
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1069,8 +1052,8 @@ wlan_usb_host_to_card_aggr(IN pmlan_adapter pmadapter,
|
|||
if (pmbuf_aggr->use_count + 1 >= max_aggr_num)
|
||||
f_send_aggr_buf = 1;
|
||||
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_NULL_PKT
|
||||
|| pmbuf->flags & MLAN_BUF_FLAG_TCP_ACK)
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_NULL_PKT ||
|
||||
pmbuf->flags & MLAN_BUF_FLAG_TCP_ACK)
|
||||
f_send_aggr_buf = 1;
|
||||
|
||||
if (f_send_aggr_buf) {
|
||||
|
@ -1115,8 +1098,7 @@ wlan_usb_host_to_card_aggr(IN pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_pm_usb_wakeup_card(IN pmlan_adapter pmadapter, IN t_u8 timeout)
|
||||
mlan_status wlan_pm_usb_wakeup_card(IN pmlan_adapter pmadapter, IN t_u8 timeout)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u32 age_ts_usec;
|
||||
|
@ -1147,13 +1129,14 @@ wlan_pm_usb_wakeup_card(IN pmlan_adapter pmadapter, IN t_u8 timeout)
|
|||
*
|
||||
* @param pmpriv A pointer to pmlan_private structure
|
||||
* @param type data or command
|
||||
* @param pmbuf A pointer to mlan_buffer (pmbuf->data_len should include PCIE header)
|
||||
* @param tx_param A pointer to mlan_tx_param (can be MNULL if type is command)
|
||||
* @param pmbuf A pointer to mlan_buffer (pmbuf->data_len should include
|
||||
* PCIE header)
|
||||
* @param tx_param A pointer to mlan_tx_param (can be MNULL if type is
|
||||
* command)
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
wlan_usb_host_to_card(pmlan_private pmpriv, t_u8 type,
|
||||
mlan_status wlan_usb_host_to_card(pmlan_private pmpriv, t_u8 type,
|
||||
mlan_buffer *pmbuf, mlan_tx_param *tx_param)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -1167,16 +1150,13 @@ wlan_usb_host_to_card(pmlan_private pmpriv, t_u8 type,
|
|||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
if (type == MLAN_TYPE_CMD
|
||||
#if defined(FW_VDLL) && (defined(USB9098) || defined(USB9097))
|
||||
#if (defined(USB9098) || defined(USB9097))
|
||||
|| type == MLAN_TYPE_VDLL
|
||||
#endif
|
||||
) {
|
||||
pmadapter->cmd_sent = MTRUE;
|
||||
ret = pmadapter->callbacks.moal_write_data_async(pmadapter->
|
||||
pmoal_handle,
|
||||
pmbuf,
|
||||
pmadapter->
|
||||
tx_cmd_ep);
|
||||
ret = pmadapter->callbacks.moal_write_data_async(
|
||||
pmadapter->pmoal_handle, pmbuf, pmadapter->tx_cmd_ep);
|
||||
if (ret == MLAN_STATUS_FAILURE)
|
||||
pmadapter->cmd_sent = MFALSE;
|
||||
LEAVE();
|
||||
|
@ -1188,10 +1168,8 @@ wlan_usb_host_to_card(pmlan_private pmpriv, t_u8 type,
|
|||
pusb_tx_aggr);
|
||||
} else {
|
||||
pmadapter->data_sent = MTRUE;
|
||||
ret = pmadapter->callbacks.moal_write_data_async(pmadapter->
|
||||
pmoal_handle,
|
||||
pmbuf,
|
||||
pmpriv->port);
|
||||
ret = pmadapter->callbacks.moal_write_data_async(
|
||||
pmadapter->pmoal_handle, pmbuf, pmpriv->port);
|
||||
switch (ret) {
|
||||
case MLAN_STATUS_PRESOURCE:
|
||||
PRINTM(MINFO, "MLAN_STATUS_PRESOURCE is returned\n");
|
||||
|
@ -1210,7 +1188,6 @@ wlan_usb_host_to_card(pmlan_private pmpriv, t_u8 type,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
|
@ -1224,9 +1201,8 @@ wlan_usb_host_to_card(pmlan_private pmpriv, t_u8 type,
|
|||
* @param pmbuf A pointer to the mlan_buffer
|
||||
* @return N/A
|
||||
*/
|
||||
mlan_status
|
||||
wlan_usb_cmdevt_complete(IN pmlan_adapter pmadapter, mlan_buffer *pmbuf,
|
||||
mlan_status status)
|
||||
mlan_status wlan_usb_cmdevt_complete(IN pmlan_adapter pmadapter,
|
||||
mlan_buffer *pmbuf, mlan_status status)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -1244,9 +1220,8 @@ wlan_usb_cmdevt_complete(IN pmlan_adapter pmadapter, mlan_buffer *pmbuf,
|
|||
* @param pmbuf A pointer to the mlan_buffer
|
||||
* @return N/A
|
||||
*/
|
||||
mlan_status
|
||||
wlan_usb_data_complete(IN pmlan_adapter pmadapter, mlan_buffer *pmbuf,
|
||||
mlan_status status)
|
||||
mlan_status wlan_usb_data_complete(IN pmlan_adapter pmadapter,
|
||||
mlan_buffer *pmbuf, mlan_status status)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -1264,8 +1239,8 @@ wlan_usb_data_complete(IN pmlan_adapter pmadapter, mlan_buffer *pmbuf,
|
|||
* @param pmbuf A pointer to the mlan_buffer
|
||||
* @return
|
||||
*/
|
||||
mlan_status
|
||||
wlan_usb_handle_rx_packet(mlan_adapter *pmadapter, pmlan_buffer pmbuf)
|
||||
mlan_status wlan_usb_handle_rx_packet(mlan_adapter *pmadapter,
|
||||
pmlan_buffer pmbuf)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
|
|
@ -54,8 +54,7 @@ typedef struct _mlan_list_head {
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
util_init_list(pmlan_linked_list phead)
|
||||
static INLINE t_void util_init_list(pmlan_linked_list phead)
|
||||
{
|
||||
/* Both next and prev point to self */
|
||||
phead->pprev = phead->pnext = (pmlan_linked_list)phead;
|
||||
|
@ -70,12 +69,9 @@ util_init_list(pmlan_linked_list phead)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
util_init_list_head(t_void *pmoal_handle,
|
||||
pmlan_list_head phead,
|
||||
t_u8 lock_required,
|
||||
mlan_status (*moal_init_lock) (t_void *handle,
|
||||
t_void **pplock))
|
||||
static INLINE t_void util_init_list_head(
|
||||
t_void *pmoal_handle, pmlan_list_head phead, t_u8 lock_required,
|
||||
mlan_status (*moal_init_lock)(t_void *handle, t_void **pplock))
|
||||
{
|
||||
/* Both next and prev point to self */
|
||||
util_init_list((pmlan_linked_list)phead);
|
||||
|
@ -93,11 +89,9 @@ util_init_list_head(t_void *pmoal_handle,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
util_free_list_head(t_void *pmoal_handle,
|
||||
pmlan_list_head phead,
|
||||
mlan_status (*moal_free_lock) (t_void *handle,
|
||||
t_void *plock))
|
||||
static INLINE t_void util_free_list_head(
|
||||
t_void *pmoal_handle, pmlan_list_head phead,
|
||||
mlan_status (*moal_free_lock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
phead->pprev = phead->pnext = 0;
|
||||
if (phead->plock)
|
||||
|
@ -114,8 +108,7 @@ util_free_list_head(t_void *pmoal_handle,
|
|||
* @return List node
|
||||
*/
|
||||
static INLINE pmlan_linked_list
|
||||
util_peek_list(t_void *pmoal_handle,
|
||||
pmlan_list_head phead,
|
||||
util_peek_list(t_void *pmoal_handle, pmlan_list_head phead,
|
||||
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
||||
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
|
@ -140,14 +133,10 @@ util_peek_list(t_void *pmoal_handle,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
util_enqueue_list_tail(t_void *pmoal_handle,
|
||||
pmlan_list_head phead,
|
||||
pmlan_linked_list pnode,
|
||||
mlan_status (*moal_spin_lock) (t_void *handle,
|
||||
t_void *plock),
|
||||
mlan_status (*moal_spin_unlock) (t_void *handle,
|
||||
t_void *plock))
|
||||
static INLINE t_void util_enqueue_list_tail(
|
||||
t_void *pmoal_handle, pmlan_list_head phead, pmlan_linked_list pnode,
|
||||
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
||||
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
pmlan_linked_list pold_last;
|
||||
|
||||
|
@ -172,14 +161,10 @@ util_enqueue_list_tail(t_void *pmoal_handle,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
util_enqueue_list_head(t_void *pmoal_handle,
|
||||
pmlan_list_head phead,
|
||||
pmlan_linked_list pnode,
|
||||
mlan_status (*moal_spin_lock) (t_void *handle,
|
||||
t_void *plock),
|
||||
mlan_status (*moal_spin_unlock) (t_void *handle,
|
||||
t_void *plock))
|
||||
static INLINE t_void util_enqueue_list_head(
|
||||
t_void *pmoal_handle, pmlan_list_head phead, pmlan_linked_list pnode,
|
||||
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
||||
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
pmlan_linked_list pold_first;
|
||||
|
||||
|
@ -204,13 +189,10 @@ util_enqueue_list_head(t_void *pmoal_handle,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
util_unlink_list(t_void *pmoal_handle,
|
||||
pmlan_list_head phead,
|
||||
pmlan_linked_list pnode,
|
||||
static INLINE t_void util_unlink_list(
|
||||
t_void *pmoal_handle, pmlan_list_head phead, pmlan_linked_list pnode,
|
||||
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
||||
mlan_status (*moal_spin_unlock) (t_void *handle,
|
||||
t_void *plock))
|
||||
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
pmlan_linked_list pmy_prev;
|
||||
pmlan_linked_list pmy_next;
|
||||
|
@ -236,12 +218,10 @@ util_unlink_list(t_void *pmoal_handle,
|
|||
*
|
||||
* @return List node
|
||||
*/
|
||||
static INLINE pmlan_linked_list
|
||||
util_dequeue_list(t_void *pmoal_handle,
|
||||
pmlan_list_head phead,
|
||||
static INLINE pmlan_linked_list util_dequeue_list(
|
||||
t_void *pmoal_handle, pmlan_list_head phead,
|
||||
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
||||
mlan_status (*moal_spin_unlock) (t_void *handle,
|
||||
t_void *plock))
|
||||
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
pmlan_linked_list pnode;
|
||||
|
||||
|
@ -291,12 +271,9 @@ typedef enum _MLAN_SCALAR_CONDITIONAL {
|
|||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
util_scalar_init(t_void *pmoal_handle,
|
||||
pmlan_scalar pscalar,
|
||||
t_s32 val,
|
||||
util_scalar_init(t_void *pmoal_handle, pmlan_scalar pscalar, t_s32 val,
|
||||
t_void *plock_to_use,
|
||||
mlan_status (*moal_init_lock) (t_void *handle,
|
||||
t_void **pplock))
|
||||
mlan_status (*moal_init_lock)(t_void *handle, t_void **pplock))
|
||||
{
|
||||
pscalar->value = val;
|
||||
pscalar->flags = 0;
|
||||
|
@ -318,8 +295,7 @@ util_scalar_init(t_void *pmoal_handle,
|
|||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
util_scalar_free(t_void *pmoal_handle,
|
||||
pmlan_scalar pscalar,
|
||||
util_scalar_free(t_void *pmoal_handle, pmlan_scalar pscalar,
|
||||
mlan_status (*moal_free_lock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
if (pscalar->flags & MLAN_SCALAR_FLAG_UNIQUE_LOCK)
|
||||
|
@ -336,11 +312,9 @@ util_scalar_free(t_void *pmoal_handle,
|
|||
* @return Stored value
|
||||
*/
|
||||
static INLINE t_s32
|
||||
util_scalar_read(t_void *pmoal_handle,
|
||||
pmlan_scalar pscalar,
|
||||
util_scalar_read(t_void *pmoal_handle, pmlan_scalar pscalar,
|
||||
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
||||
mlan_status (*moal_spin_unlock) (t_void *handle,
|
||||
t_void *plock))
|
||||
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
t_s32 val;
|
||||
|
||||
|
@ -363,13 +337,10 @@ util_scalar_read(t_void *pmoal_handle,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
util_scalar_write(t_void *pmoal_handle,
|
||||
pmlan_scalar pscalar,
|
||||
t_s32 val,
|
||||
static INLINE t_void util_scalar_write(
|
||||
t_void *pmoal_handle, pmlan_scalar pscalar, t_s32 val,
|
||||
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
||||
mlan_status (*moal_spin_unlock) (t_void *handle,
|
||||
t_void *plock))
|
||||
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
if (moal_spin_lock)
|
||||
moal_spin_lock(pmoal_handle, pscalar->plock);
|
||||
|
@ -387,13 +358,10 @@ util_scalar_write(t_void *pmoal_handle,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
util_scalar_increment(t_void *pmoal_handle,
|
||||
pmlan_scalar pscalar,
|
||||
mlan_status (*moal_spin_lock) (t_void *handle,
|
||||
t_void *plock),
|
||||
mlan_status (*moal_spin_unlock) (t_void *handle,
|
||||
t_void *plock))
|
||||
static INLINE t_void util_scalar_increment(
|
||||
t_void *pmoal_handle, pmlan_scalar pscalar,
|
||||
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
||||
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
if (moal_spin_lock)
|
||||
moal_spin_lock(pmoal_handle, pscalar->plock);
|
||||
|
@ -411,13 +379,10 @@ util_scalar_increment(t_void *pmoal_handle,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
util_scalar_decrement(t_void *pmoal_handle,
|
||||
pmlan_scalar pscalar,
|
||||
mlan_status (*moal_spin_lock) (t_void *handle,
|
||||
t_void *plock),
|
||||
mlan_status (*moal_spin_unlock) (t_void *handle,
|
||||
t_void *plock))
|
||||
static INLINE t_void util_scalar_decrement(
|
||||
t_void *pmoal_handle, pmlan_scalar pscalar,
|
||||
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
||||
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
if (moal_spin_lock)
|
||||
moal_spin_lock(pmoal_handle, pscalar->plock);
|
||||
|
@ -437,14 +402,10 @@ util_scalar_decrement(t_void *pmoal_handle,
|
|||
*
|
||||
* @return Value after offset
|
||||
*/
|
||||
static INLINE t_s32
|
||||
util_scalar_offset(t_void *pmoal_handle,
|
||||
pmlan_scalar pscalar,
|
||||
t_s32 offset,
|
||||
mlan_status (*moal_spin_lock) (t_void *handle,
|
||||
t_void *plock),
|
||||
mlan_status (*moal_spin_unlock) (t_void *handle,
|
||||
t_void *plock))
|
||||
static INLINE t_s32 util_scalar_offset(
|
||||
t_void *pmoal_handle, pmlan_scalar pscalar, t_s32 offset,
|
||||
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
||||
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
t_s32 newval;
|
||||
|
||||
|
@ -471,16 +432,11 @@ util_scalar_offset(t_void *pmoal_handle,
|
|||
*
|
||||
* @return Comparison result (MTRUE or MFALSE)
|
||||
*/
|
||||
static INLINE t_u8
|
||||
util_scalar_conditional_write(t_void *pmoal_handle,
|
||||
pmlan_scalar pscalar,
|
||||
MLAN_SCALAR_CONDITIONAL condition,
|
||||
t_s32 val_compare,
|
||||
t_s32 val_to_set,
|
||||
mlan_status (*moal_spin_lock) (t_void *handle,
|
||||
t_void *plock),
|
||||
mlan_status (*moal_spin_unlock) (t_void *handle,
|
||||
t_void *plock))
|
||||
static INLINE t_u8 util_scalar_conditional_write(
|
||||
t_void *pmoal_handle, pmlan_scalar pscalar,
|
||||
MLAN_SCALAR_CONDITIONAL condition, t_s32 val_compare, t_s32 val_to_set,
|
||||
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
||||
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
||||
{
|
||||
t_u8 update;
|
||||
if (moal_spin_lock)
|
||||
|
@ -523,14 +479,11 @@ util_scalar_conditional_write(t_void *pmoal_handle,
|
|||
* @param num number
|
||||
* @return number of bits
|
||||
*/
|
||||
static INLINE t_u32
|
||||
bitcount(t_u32 num)
|
||||
static INLINE t_u32 bitcount(t_u32 num)
|
||||
{
|
||||
t_u32 count = 0;
|
||||
static t_u32 nibblebits[] = {
|
||||
0, 1, 1, 2, 1, 2, 2, 3,
|
||||
1, 2, 2, 3, 2, 3, 3, 4
|
||||
};
|
||||
static t_u32 nibblebits[] = {0, 1, 1, 2, 1, 2, 2, 3,
|
||||
1, 2, 2, 3, 2, 3, 3, 4};
|
||||
for (; num != 0; num >>= 4)
|
||||
count += nibblebits[num & 0x0f];
|
||||
return count;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -37,8 +37,7 @@ Change log:
|
|||
*
|
||||
* @return TID
|
||||
*/
|
||||
static INLINE t_u32
|
||||
wlan_get_tid(pmlan_adapter pmadapter, raListTbl *ptr)
|
||||
static INLINE t_u32 wlan_get_tid(pmlan_adapter pmadapter, raListTbl *ptr)
|
||||
{
|
||||
pmlan_buffer mbuf;
|
||||
|
||||
|
@ -60,8 +59,7 @@ wlan_get_tid(pmlan_adapter pmadapter, raListTbl *ptr)
|
|||
*
|
||||
* @return Length of list
|
||||
*/
|
||||
static INLINE t_u32
|
||||
wlan_wmm_list_len(pmlan_list_head head)
|
||||
static INLINE t_u32 wlan_wmm_list_len(pmlan_list_head head)
|
||||
{
|
||||
pmlan_linked_list pos;
|
||||
t_u32 count = 0;
|
||||
|
@ -86,8 +84,7 @@ wlan_wmm_list_len(pmlan_list_head head)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
wlan_request_ralist_lock(IN mlan_private *priv)
|
||||
static INLINE t_void wlan_request_ralist_lock(IN mlan_private *priv)
|
||||
{
|
||||
mlan_adapter *pmadapter = priv->adapter;
|
||||
mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks;
|
||||
|
@ -109,8 +106,7 @@ wlan_request_ralist_lock(IN mlan_private *priv)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE t_void
|
||||
wlan_release_ralist_lock(IN mlan_private *priv)
|
||||
static INLINE t_void wlan_release_ralist_lock(IN mlan_private *priv)
|
||||
{
|
||||
mlan_adapter *pmadapter = priv->adapter;
|
||||
mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks;
|
||||
|
@ -211,8 +207,8 @@ extern mlan_status wlan_cmd_wmm_ts_status(IN pmlan_private pmpriv,
|
|||
* Functions used in the cmdresp handling routine
|
||||
*/
|
||||
/** WMM get status command response handler */
|
||||
extern mlan_status wlan_ret_wmm_get_status(IN pmlan_private priv,
|
||||
IN t_u8 *ptlv, IN int resp_len);
|
||||
extern mlan_status wlan_ret_wmm_get_status(IN pmlan_private priv, IN t_u8 *ptlv,
|
||||
IN int resp_len);
|
||||
/** WMM ADDTS request command response handler */
|
||||
extern mlan_status wlan_ret_wmm_addts_req(IN pmlan_private pmpriv,
|
||||
const IN HostCmd_DS_COMMAND *resp,
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define _MLAN_DECL_H_
|
||||
|
||||
/** MLAN release version */
|
||||
#define MLAN_RELEASE_VERSION "169"
|
||||
#define MLAN_RELEASE_VERSION "175"
|
||||
|
||||
/** Re-define generic data types for MLAN/MOAL */
|
||||
/** Signed char (1-byte) */
|
||||
|
@ -116,8 +116,7 @@ typedef t_s32 t_sval;
|
|||
#endif
|
||||
|
||||
/** Macros for Data Alignment : size */
|
||||
#define ALIGN_SZ(p, a) \
|
||||
(((p) + ((a) - 1)) & ~((a) - 1))
|
||||
#define ALIGN_SZ(p, a) (((p) + ((a)-1)) & ~((a)-1))
|
||||
|
||||
/** Macros for Data Alignment : address */
|
||||
#define ALIGN_ADDR(p, a) \
|
||||
|
@ -248,7 +247,7 @@ typedef t_s32 t_sval;
|
|||
* Size of DMA buffer to collect 10ms SSU data:
|
||||
* 2500 spectral packets, plus header
|
||||
*/
|
||||
#define MLAN_SSU_BUF_SIZE_1MS MLAN_SSU_MAX_PKT_SIZE * 250
|
||||
#define MLAN_SSU_BUF_SIZE_1MS (MLAN_SSU_MAX_PKT_SIZE * 250)
|
||||
#define MLAN_SSU_BUF_SIZE (MLAN_SSU_HEADER_SIZE + MLAN_SSU_BUF_SIZE_1MS * 10)
|
||||
#define MLAN_SSU_BUF_SIZE_HOST (MLAN_SSU_BUF_SIZE)
|
||||
#endif
|
||||
|
@ -281,12 +280,14 @@ typedef t_s32 t_sval;
|
|||
|
||||
#define MLAN_USB_TX_AGGR_ALIGN (MLAN_USB_BLOCK_SIZE * 4)
|
||||
#define MLAN_USB_TX_MAX_AGGR_NUM (8)
|
||||
#define MLAN_USB_TX_MAX_AGGR_SIZE (MLAN_USB_BLOCK_SIZE * 4 * MLAN_USB_TX_MAX_AGGR_NUM)
|
||||
#define MLAN_USB_TX_MAX_AGGR_SIZE \
|
||||
(MLAN_USB_BLOCK_SIZE * 4 * MLAN_USB_TX_MAX_AGGR_NUM)
|
||||
#define MLAN_USB_TX_MIN_AGGR_TIMEOUT (1)
|
||||
#define MLAN_USB_TX_MAX_AGGR_TIMEOUT (4)
|
||||
#define MLAN_USB_TX_AGGR_TIMEOUT_MSEC MLAN_USB_TX_MIN_AGGR_TIMEOUT
|
||||
#define MLAN_USB_TX_AGGR_TIMEOUT_DYN (0xFFFF)
|
||||
#endif /*USB*/
|
||||
|
||||
/** MLAN MAC Address Length */
|
||||
#define MLAN_MAC_ADDR_LENGTH (6)
|
||||
/** MLAN 802.11 MAC Address */
|
||||
|
@ -807,35 +808,39 @@ enum mlan_channel_type {
|
|||
};
|
||||
|
||||
/** channel band */
|
||||
enum {
|
||||
BAND_2GHZ = 0,
|
||||
enum { BAND_2GHZ = 0,
|
||||
BAND_5GHZ = 1,
|
||||
BAND_4GHZ = 2,
|
||||
};
|
||||
|
||||
/** channel offset */
|
||||
enum {
|
||||
SEC_CHAN_NONE = 0,
|
||||
enum { SEC_CHAN_NONE = 0,
|
||||
SEC_CHAN_ABOVE = 1,
|
||||
SEC_CHAN_5MHZ = 2,
|
||||
SEC_CHAN_BELOW = 3
|
||||
};
|
||||
SEC_CHAN_BELOW = 3 };
|
||||
|
||||
/** channel bandwidth */
|
||||
enum {
|
||||
CHAN_BW_20MHZ = 0,
|
||||
enum { CHAN_BW_20MHZ = 0,
|
||||
CHAN_BW_10MHZ,
|
||||
CHAN_BW_40MHZ,
|
||||
CHAN_BW_80MHZ,
|
||||
};
|
||||
|
||||
/** scan mode */
|
||||
enum {
|
||||
SCAN_MODE_MANUAL = 0,
|
||||
enum { SCAN_MODE_MANUAL = 0,
|
||||
SCAN_MODE_ACS,
|
||||
SCAN_MODE_USER,
|
||||
};
|
||||
|
||||
typedef enum _dfs_w53_cfg_t {
|
||||
/** DFS W53 Default Fw Value */
|
||||
DFS_W53_DEFAULT_FW = 0,
|
||||
/** DFS W53 New W53 Rules/Standard */
|
||||
DFS_W53_NEW = 1,
|
||||
/** DFS W53 Old W53 Rules/Standard */
|
||||
DFS_W53_OLD = 2
|
||||
} dfs_w53_cfg_t;
|
||||
|
||||
/** Band_Config_t */
|
||||
typedef MLAN_PACK_START struct _Band_Config_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
|
@ -911,7 +916,8 @@ typedef struct _chan_freq_power_t {
|
|||
/** Max allowed Tx power level */
|
||||
t_u16 max_tx_power;
|
||||
/** TRUE:radar detect required for BAND A or passive scan for BAND B/G;
|
||||
* FALSE:radar detect not required for BAND A or active scan for BAND B/G*/
|
||||
* FALSE:radar detect not required for BAND A or active scan for BAND
|
||||
* B/G*/
|
||||
t_bool passive_scan_or_radar_detect;
|
||||
/** Elements associated to cfp that change at run-time */
|
||||
cfp_dyn_t dynamic;
|
||||
|
@ -1146,7 +1152,8 @@ typedef MLAN_PACK_START struct {
|
|||
/** Medium time granted for the TSID */
|
||||
t_u16 medium_time;
|
||||
} MLAN_PACK_END wlan_ioctl_wmm_ts_status_t,
|
||||
/** Type definition of mlan_ds_wmm_ts_status for MLAN_OID_WMM_CFG_TS_STATUS */
|
||||
/** Type definition of mlan_ds_wmm_ts_status for
|
||||
MLAN_OID_WMM_CFG_TS_STATUS */
|
||||
mlan_ds_wmm_ts_status, *pmlan_ds_wmm_ts_status;
|
||||
|
||||
/** Max Ie length */
|
||||
|
@ -1233,7 +1240,8 @@ typedef struct {
|
|||
t_u32 nss : 2;
|
||||
/** 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz */
|
||||
t_u32 bw : 3;
|
||||
/** OFDM/CCK rate code would be as per ieee std in the units of 0.5mbps */
|
||||
/** OFDM/CCK rate code would be as per ieee std in the units of 0.5mbps
|
||||
*/
|
||||
/** HT/VHT it would be mcs index */
|
||||
t_u32 rateMcsIdx : 8;
|
||||
/** reserved */
|
||||
|
@ -1285,7 +1293,8 @@ typedef enum {
|
|||
|
||||
/** set for QOS association */
|
||||
#define WIFI_CAPABILITY_QOS 0x00000001
|
||||
/** set for protected association (802.11 beacon frame control protected bit set) */
|
||||
/** set for protected association (802.11 beacon frame control protected bit
|
||||
* set) */
|
||||
#define WIFI_CAPABILITY_PROTECTED 0x00000002
|
||||
/** set if 802.11 Extended Capabilities element interworking bit is set */
|
||||
#define WIFI_CAPABILITY_INTERWORKING 0x00000004
|
||||
|
@ -1326,7 +1335,8 @@ typedef struct {
|
|||
wifi_channel_info channel;
|
||||
/** msecs the radio is awake (32 bits number accruing over time) */
|
||||
t_u32 on_time;
|
||||
/** msecs the CCA register is busy (32 bits number accruing over time) */
|
||||
/** msecs the CCA register is busy (32 bits number accruing over time)
|
||||
*/
|
||||
t_u32 cca_busy_time;
|
||||
} wifi_channel_stat;
|
||||
|
||||
|
@ -1338,9 +1348,14 @@ typedef struct {
|
|||
t_u32 time_usec;
|
||||
} wifi_timeval;
|
||||
|
||||
#define timeval_to_msec(timeval) (t_u64)((t_u64)(timeval.time_sec)*1000 + (t_u64)(timeval.time_usec)/1000)
|
||||
#define timeval_to_usec(timeval) (t_u64)((t_u64)(timeval.time_sec)*1000*1000 + (t_u64)(timeval.time_usec))
|
||||
#define is_zero_timeval(timeval) ((timeval.time_sec == 0) && (timeval.time_usec == 0))
|
||||
#define timeval_to_msec(timeval) \
|
||||
(t_u64)((t_u64)(timeval.time_sec) * 1000 + \
|
||||
(t_u64)(timeval.time_usec) / 1000)
|
||||
#define timeval_to_usec(timeval) \
|
||||
(t_u64)((t_u64)(timeval.time_sec) * 1000 * 1000 + \
|
||||
(t_u64)(timeval.time_usec))
|
||||
#define is_zero_timeval(timeval) \
|
||||
((timeval.time_sec == 0) && (timeval.time_usec == 0))
|
||||
|
||||
/** radio statistics */
|
||||
typedef struct {
|
||||
|
@ -1348,25 +1363,34 @@ typedef struct {
|
|||
int radio;
|
||||
/** msecs the radio is awake (32 bits number accruing over time) */
|
||||
t_u32 on_time;
|
||||
/** msecs the radio is transmitting (32 bits number accruing over time) */
|
||||
/** msecs the radio is transmitting (32 bits number accruing over time)
|
||||
*/
|
||||
t_u32 tx_time;
|
||||
/** TBD: num_tx_levels: number of radio transmit power levels */
|
||||
t_u32 reserved0;
|
||||
/** TBD: tx_time_per_levels: pointer to an array of radio transmit per power levels in msecs accured over time */
|
||||
/** TBD: tx_time_per_levels: pointer to an array of radio transmit per
|
||||
* power levels in msecs accured over time */
|
||||
/* t_u32 *reserved1;*/
|
||||
/** msecs the radio is in active receive (32 bits number accruing over time) */
|
||||
/** msecs the radio is in active receive (32 bits number accruing over
|
||||
* time) */
|
||||
t_u32 rx_time;
|
||||
/** msecs the radio is awake due to all scan (32 bits number accruing over time) */
|
||||
/** msecs the radio is awake due to all scan (32 bits number accruing
|
||||
* over time) */
|
||||
t_u32 on_time_scan;
|
||||
/** msecs the radio is awake due to NAN (32 bits number accruing over time) */
|
||||
/** msecs the radio is awake due to NAN (32 bits number accruing over
|
||||
* time) */
|
||||
t_u32 on_time_nbd;
|
||||
/** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
|
||||
/** msecs the radio is awake due to G?scan (32 bits number accruing over
|
||||
* time) */
|
||||
t_u32 on_time_gscan;
|
||||
/** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
|
||||
/** msecs the radio is awake due to roam?scan (32 bits number accruing
|
||||
* over time) */
|
||||
t_u32 on_time_roam_scan;
|
||||
/** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
|
||||
/** msecs the radio is awake due to PNO scan (32 bits number accruing
|
||||
* over time) */
|
||||
t_u32 on_time_pno_scan;
|
||||
/** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
|
||||
/** msecs the radio is awake due to HS2.0 scans and GAS exchange (32
|
||||
* bits number accruing over time) */
|
||||
t_u32 on_time_hs20;
|
||||
/** number of channels */
|
||||
t_u32 num_channels;
|
||||
|
@ -1426,7 +1450,8 @@ typedef struct {
|
|||
/** number of received unicast mpdus */
|
||||
t_u32 rx_mpdu;
|
||||
/** number of succesfully transmitted multicast data packets */
|
||||
/** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
|
||||
/** STA case: implies ACK received from AP for the unicast packet in
|
||||
* which mcast pkt was sent */
|
||||
t_u32 tx_mcast;
|
||||
/** number of received multicast data packets */
|
||||
t_u32 rx_mcast;
|
||||
|
@ -1463,19 +1488,24 @@ typedef struct {
|
|||
/** Average beacon offset encountered (beacon_TSF - TBTT)
|
||||
* the average_tsf_offset field is used so as to calculate the
|
||||
* typical beacon contention time on the channel as well may be
|
||||
* used to debug beacon synchronization and related power consumption issue
|
||||
* used to debug beacon synchronization and related power consumption
|
||||
* issue
|
||||
*/
|
||||
t_u64 average_tsf_offset;
|
||||
/** indicate that this AP typically leaks packets beyond the driver guard time */
|
||||
/** indicate that this AP typically leaks packets beyond the driver
|
||||
* guard time */
|
||||
t_u32 leaky_ap_detected;
|
||||
/** average number of frame leaked by AP after frame with PM bit set was ACK'ed by AP */
|
||||
/** average number of frame leaked by AP after frame with PM bit set was
|
||||
* ACK'ed by AP */
|
||||
t_u32 leaky_ap_avg_num_frames_leaked;
|
||||
/** Guard time currently in force (when implementing IEEE power management based on
|
||||
* frame control PM bit), How long driver waits before shutting down the radio and
|
||||
* after receiving an ACK for a data frame with PM bit set)
|
||||
/** Guard time currently in force (when implementing IEEE power
|
||||
* management based on frame control PM bit), How long driver waits
|
||||
* before shutting down the radio and after receiving an ACK for a data
|
||||
* frame with PM bit set)
|
||||
*/
|
||||
t_u32 leaky_ap_guard_time;
|
||||
/** access point mgmt frames received count from connected AP (including Beacon) */
|
||||
/** access point mgmt frames received count from connected AP (including
|
||||
* Beacon) */
|
||||
t_u32 mgmt_rx;
|
||||
/** action frames received count */
|
||||
t_u32 mgmt_action_rx;
|
||||
|
@ -1505,13 +1535,20 @@ typedef struct {
|
|||
|
||||
/** wifi statistics bitmap */
|
||||
#define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
|
||||
#define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
|
||||
#define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
|
||||
#define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
|
||||
#define WIFI_STATS_RADIO_CCA \
|
||||
0x00000002 /** cca_busy_time (within radio statistics) */
|
||||
#define WIFI_STATS_RADIO_CHANNELS \
|
||||
0x00000004 /** all channel statistics (within radio statistics) */
|
||||
#define WIFI_STATS_RADIO_SCAN \
|
||||
0x00000008 /** all scan statistics (within radio statistics) */
|
||||
#define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
|
||||
#define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
|
||||
#define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
|
||||
#define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
|
||||
#define WIFI_STATS_IFACE_TXRATE \
|
||||
0x00000020 /** all tx rate statistics (within interface statistics) */
|
||||
#define WIFI_STATS_IFACE_AC \
|
||||
0x00000040 /** all ac statistics (within interface statistics) */
|
||||
#define WIFI_STATS_IFACE_CONTENTION \
|
||||
0x00000080 /** all contention (min, max, avg) statistics (within ac \
|
||||
statisctics) */
|
||||
|
||||
/** station stats */
|
||||
typedef struct _sta_stats {
|
||||
|
@ -1526,10 +1563,10 @@ typedef struct _sta_stats {
|
|||
typedef struct _mlan_callbacks {
|
||||
/** moal_get_fw_data */
|
||||
mlan_status (*moal_get_fw_data)(IN t_void *pmoal_handle,
|
||||
IN t_u32 offset,
|
||||
IN t_u32 len, OUT t_u8 *pbuf);
|
||||
mlan_status (*moal_get_vdll_data) (IN t_void *pmoal_handle,
|
||||
IN t_u32 len, OUT t_u8 *pbuf);
|
||||
IN t_u32 offset, IN t_u32 len,
|
||||
OUT t_u8 *pbuf);
|
||||
mlan_status (*moal_get_vdll_data)(IN t_void *pmoal_handle, IN t_u32 len,
|
||||
OUT t_u8 *pbuf);
|
||||
/** moal_get_hw_spec_complete */
|
||||
mlan_status (*moal_get_hw_spec_complete)(IN t_void *pmoal_handle,
|
||||
IN mlan_status status,
|
||||
|
@ -1547,8 +1584,7 @@ typedef struct _mlan_callbacks {
|
|||
IN mlan_status status);
|
||||
/** moal_recv_complete */
|
||||
mlan_status (*moal_recv_complete)(IN t_void *pmoal_handle,
|
||||
IN pmlan_buffer pmbuf,
|
||||
IN t_u32 port,
|
||||
IN pmlan_buffer pmbuf, IN t_u32 port,
|
||||
IN mlan_status status);
|
||||
/** moal_recv_packet */
|
||||
mlan_status (*moal_recv_packet)(IN t_void *pmoal_handle,
|
||||
|
@ -1577,11 +1613,11 @@ typedef struct _mlan_callbacks {
|
|||
#endif /* USB */
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
/** moal_write_reg */
|
||||
mlan_status (*moal_write_reg) (IN t_void *pmoal_handle,
|
||||
IN t_u32 reg, IN t_u32 data);
|
||||
mlan_status (*moal_write_reg)(IN t_void *pmoal_handle, IN t_u32 reg,
|
||||
IN t_u32 data);
|
||||
/** moal_read_reg */
|
||||
mlan_status (*moal_read_reg) (IN t_void *pmoal_handle,
|
||||
IN t_u32 reg, OUT t_u32 *data);
|
||||
mlan_status (*moal_read_reg)(IN t_void *pmoal_handle, IN t_u32 reg,
|
||||
OUT t_u32 *data);
|
||||
#endif /* SDIO || PCIE */
|
||||
/** moal_write_data_sync */
|
||||
mlan_status (*moal_write_data_sync)(IN t_void *pmoal_handle,
|
||||
|
@ -1592,56 +1628,48 @@ typedef struct _mlan_callbacks {
|
|||
IN OUT pmlan_buffer pmbuf,
|
||||
IN t_u32 port, IN t_u32 timeout);
|
||||
/** moal_malloc */
|
||||
mlan_status (*moal_malloc) (IN t_void *pmoal_handle,
|
||||
IN t_u32 size,
|
||||
mlan_status (*moal_malloc)(IN t_void *pmoal_handle, IN t_u32 size,
|
||||
IN t_u32 flag, OUT t_u8 **ppbuf);
|
||||
/** moal_mfree */
|
||||
mlan_status (*moal_mfree)(IN t_void *pmoal_handle, IN t_u8 *pbuf);
|
||||
/** moal_vmalloc */
|
||||
mlan_status (*moal_vmalloc) (IN t_void *pmoal_handle,
|
||||
IN t_u32 size, OUT t_u8 **ppbuf);
|
||||
mlan_status (*moal_vmalloc)(IN t_void *pmoal_handle, IN t_u32 size,
|
||||
OUT t_u8 **ppbuf);
|
||||
/** moal_vfree */
|
||||
mlan_status (*moal_vfree)(IN t_void *pmoal_handle, IN t_u8 *pbuf);
|
||||
#ifdef PCIE
|
||||
/** moal_malloc_consistent */
|
||||
mlan_status (*moal_malloc_consistent)(IN t_void *pmoal_handle,
|
||||
IN t_u32 size,
|
||||
OUT t_u8 **ppbuf,
|
||||
IN t_u32 size, OUT t_u8 **ppbuf,
|
||||
OUT t_u64 *pbuf_pa);
|
||||
/** moal_mfree_consistent */
|
||||
mlan_status (*moal_mfree_consistent)(IN t_void *pmoal_handle,
|
||||
IN t_u32 size,
|
||||
IN t_u8 *pbuf, IN t_u64 buf_pa);
|
||||
IN t_u32 size, IN t_u8 *pbuf,
|
||||
IN t_u64 buf_pa);
|
||||
/** moal_map_memory */
|
||||
mlan_status (*moal_map_memory) (IN t_void *pmoal_handle,
|
||||
IN t_u8 *pbuf,
|
||||
OUT t_u64 *pbuf_pa,
|
||||
IN t_u32 size, IN t_u32 flag);
|
||||
mlan_status (*moal_map_memory)(IN t_void *pmoal_handle, IN t_u8 *pbuf,
|
||||
OUT t_u64 *pbuf_pa, IN t_u32 size,
|
||||
IN t_u32 flag);
|
||||
/** moal_unmap_memory */
|
||||
mlan_status (*moal_unmap_memory) (IN t_void *pmoal_handle,
|
||||
IN t_u8 *pbuf,
|
||||
IN t_u64 buf_pa,
|
||||
IN t_u32 size, IN t_u32 flag);
|
||||
mlan_status (*moal_unmap_memory)(IN t_void *pmoal_handle, IN t_u8 *pbuf,
|
||||
IN t_u64 buf_pa, IN t_u32 size,
|
||||
IN t_u32 flag);
|
||||
#endif /* PCIE */
|
||||
/** moal_memset */
|
||||
t_void *(*moal_memset) (IN t_void *pmoal_handle,
|
||||
IN t_void *pmem, IN t_u8 byte, IN t_u32 num);
|
||||
t_void *(*moal_memset)(IN t_void *pmoal_handle, IN t_void *pmem,
|
||||
IN t_u8 byte, IN t_u32 num);
|
||||
/** moal_memcpy */
|
||||
t_void *(*moal_memcpy) (IN t_void *pmoal_handle,
|
||||
IN t_void *pdest,
|
||||
t_void *(*moal_memcpy)(IN t_void *pmoal_handle, IN t_void *pdest,
|
||||
IN const t_void *psrc, IN t_u32 num);
|
||||
/** moal_memcpy_ext */
|
||||
t_void *(*moal_memcpy_ext) (IN t_void *pmoal_handle,
|
||||
IN t_void *pdest,
|
||||
IN const t_void *psrc,
|
||||
IN t_u32 num, IN t_u32 dest_size);
|
||||
t_void *(*moal_memcpy_ext)(IN t_void *pmoal_handle, IN t_void *pdest,
|
||||
IN const t_void *psrc, IN t_u32 num,
|
||||
IN t_u32 dest_size);
|
||||
/** moal_memmove */
|
||||
t_void *(*moal_memmove) (IN t_void *pmoal_handle,
|
||||
IN t_void *pdest,
|
||||
t_void *(*moal_memmove)(IN t_void *pmoal_handle, IN t_void *pdest,
|
||||
IN const t_void *psrc, IN t_u32 num);
|
||||
/** moal_memcmp */
|
||||
t_s32 (*moal_memcmp) (IN t_void *pmoal_handle,
|
||||
IN const t_void *pmem1,
|
||||
t_s32 (*moal_memcmp)(IN t_void *pmoal_handle, IN const t_void *pmem1,
|
||||
IN const t_void *pmem2, IN t_u32 num);
|
||||
/** moal_udelay */
|
||||
t_void (*moal_udelay)(IN t_void *pmoal_handle, IN t_u32 udelay);
|
||||
|
@ -1654,16 +1682,15 @@ typedef struct _mlan_callbacks {
|
|||
/** moal_init_timer*/
|
||||
mlan_status (*moal_init_timer)(IN t_void *pmoal_handle,
|
||||
OUT t_void **pptimer,
|
||||
IN t_void (*callback) (t_void
|
||||
*pcontext),
|
||||
IN t_void (*callback)(t_void *pcontext),
|
||||
IN t_void *pcontext);
|
||||
/** moal_free_timer */
|
||||
mlan_status (*moal_free_timer)(IN t_void *pmoal_handle,
|
||||
IN t_void *ptimer);
|
||||
/** moal_start_timer*/
|
||||
mlan_status (*moal_start_timer)(IN t_void *pmoal_handle,
|
||||
IN t_void *ptimer,
|
||||
IN t_u8 periodic, IN t_u32 msec);
|
||||
IN t_void *ptimer, IN t_u8 periodic,
|
||||
IN t_u32 msec);
|
||||
/** moal_stop_timer*/
|
||||
mlan_status (*moal_stop_timer)(IN t_void *pmoal_handle,
|
||||
IN t_void *ptimer);
|
||||
|
@ -1680,9 +1707,8 @@ typedef struct _mlan_callbacks {
|
|||
mlan_status (*moal_spin_unlock)(IN t_void *pmoal_handle,
|
||||
IN t_void *plock);
|
||||
/** moal_print */
|
||||
t_void (*moal_print) (IN t_void *pmoal_handle,
|
||||
IN t_u32 level, IN char *pformat, IN ...
|
||||
);
|
||||
t_void (*moal_print)(IN t_void *pmoal_handle, IN t_u32 level,
|
||||
IN char *pformat, IN...);
|
||||
/** moal_print_netintf */
|
||||
t_void (*moal_print_netintf)(IN t_void *pmoal_handle,
|
||||
IN t_u32 bss_index, IN t_u32 level);
|
||||
|
@ -1691,10 +1717,9 @@ typedef struct _mlan_callbacks {
|
|||
|
||||
/** moal_hist_data_add */
|
||||
t_void (*moal_hist_data_add)(IN t_void *pmoal_handle,
|
||||
IN t_u32 bss_index,
|
||||
IN t_u16 rx_rate,
|
||||
IN t_s8 snr,
|
||||
IN t_s8 nflr, IN t_u8 antenna);
|
||||
IN t_u32 bss_index, IN t_u16 rx_rate,
|
||||
IN t_s8 snr, IN t_s8 nflr,
|
||||
IN t_u8 antenna);
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
mlan_status (*moal_wait_hostcmd_complete)(IN t_void *pmoal_handle,
|
||||
IN t_u32 bss_index);
|
||||
|
@ -1713,7 +1738,8 @@ typedef struct _mlan_callbacks {
|
|||
#define INT_MODE_SDIO 0
|
||||
/** Interrupt Mode GPIO */
|
||||
#define INT_MODE_GPIO 1
|
||||
/** New mode: GPIO-1 as a duplicated signal of interrupt as appear of SDIO_DAT1 */
|
||||
/** New mode: GPIO-1 as a duplicated signal of interrupt as appear of SDIO_DAT1
|
||||
*/
|
||||
#define GPIO_INT_NEW_MODE 255
|
||||
#endif
|
||||
|
||||
|
@ -1837,6 +1863,8 @@ typedef struct _mlan_device {
|
|||
t_u8 uap_max_sta;
|
||||
/** drv mode */
|
||||
t_u32 drv_mode;
|
||||
/** dfs w53 cfg */
|
||||
t_u8 dfs53cfg;
|
||||
} mlan_device, *pmlan_device;
|
||||
|
||||
/** MLAN API function prototype */
|
||||
|
@ -1847,8 +1875,7 @@ MLAN_API mlan_status mlan_register(IN pmlan_device pmdevice,
|
|||
OUT t_void **ppmlan_adapter);
|
||||
|
||||
/** Un-registration */
|
||||
MLAN_API mlan_status mlan_unregister(IN t_void *pmlan_adapter
|
||||
);
|
||||
MLAN_API mlan_status mlan_unregister(IN t_void *pmlan_adapter);
|
||||
|
||||
/** Firmware Downloading */
|
||||
MLAN_API mlan_status mlan_dnld_fw(IN t_void *pmlan_adapter,
|
||||
|
@ -1859,16 +1886,13 @@ MLAN_API mlan_status mlan_set_init_param(IN t_void *pmlan_adapter,
|
|||
IN pmlan_init_param pparam);
|
||||
|
||||
/** Firmware Initialization */
|
||||
MLAN_API mlan_status mlan_init_fw(IN t_void *pmlan_adapter
|
||||
);
|
||||
MLAN_API mlan_status mlan_init_fw(IN t_void *pmlan_adapter);
|
||||
|
||||
/** Firmware Shutdown */
|
||||
MLAN_API mlan_status mlan_shutdown_fw(IN t_void *pmlan_adapter
|
||||
);
|
||||
MLAN_API mlan_status mlan_shutdown_fw(IN t_void *pmlan_adapter);
|
||||
|
||||
/** Main Process */
|
||||
MLAN_API mlan_status mlan_main_process(IN t_void *pmlan_adapter
|
||||
);
|
||||
MLAN_API mlan_status mlan_main_process(IN t_void *pmlan_adapter);
|
||||
|
||||
/** Rx process */
|
||||
mlan_status mlan_rx_process(IN t_void *pmlan_adapter, IN t_u8 *rx_pkts);
|
||||
|
@ -1885,8 +1909,8 @@ MLAN_API mlan_status mlan_write_data_async_complete(IN t_void *pmlan_adapter,
|
|||
IN mlan_status status);
|
||||
|
||||
/** Packet Reception */
|
||||
MLAN_API mlan_status mlan_recv(IN t_void *pmlan_adapter,
|
||||
IN pmlan_buffer pmbuf, IN t_u32 port);
|
||||
MLAN_API mlan_status mlan_recv(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf,
|
||||
IN t_u32 port);
|
||||
#endif /* USB */
|
||||
|
||||
/** Packet Reception complete callback */
|
||||
|
@ -1916,7 +1940,7 @@ MLAN_API t_void mlan_set_int_mode(IN t_void *adapter, IN t_u32 int_mode,
|
|||
MLAN_API mlan_status mlan_ioctl(IN t_void *pmlan_adapter,
|
||||
IN pmlan_ioctl_req pioctl_req);
|
||||
/** mlan select wmm queue */
|
||||
MLAN_API t_u8 mlan_select_wmm_queue(IN t_void *pmlan_adapter,
|
||||
IN t_u8 bss_num, IN t_u8 tid);
|
||||
MLAN_API t_u8 mlan_select_wmm_queue(IN t_void *pmlan_adapter, IN t_u8 bss_num,
|
||||
IN t_u8 tid);
|
||||
|
||||
#endif /* !_MLAN_DECL_H_ */
|
||||
|
|
|
@ -320,8 +320,7 @@ typedef MLAN_PACK_START struct _TLV_Generic_t {
|
|||
} MLAN_PACK_END TLV_Generic_t, *pTLV_Generic_t;
|
||||
|
||||
/** Capability information mask */
|
||||
#define CAPINFO_MASK \
|
||||
(~(MBIT(15) | MBIT(14) | MBIT(11) | MBIT(9)))
|
||||
#define CAPINFO_MASK (~(MBIT(15) | MBIT(14) | MBIT(11) | MBIT(9)))
|
||||
|
||||
/** Capability Bit Map*/
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
|
@ -654,7 +653,6 @@ typedef MLAN_PACK_START struct _IEEEtypes_WmmAcParameters_t {
|
|||
|
||||
/** Data structure of WMM Info IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_WmmInfo_t {
|
||||
|
||||
/**
|
||||
* WMM Info IE - Vendor Specific Header:
|
||||
* element_id [221/0xdd]
|
||||
|
@ -736,7 +734,9 @@ typedef MLAN_PACK_START struct {
|
|||
t_u8 Schedule : 1;
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
||||
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior:1; /* ! Legacy/Trigg */
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /* !
|
||||
Legacy/Trigg
|
||||
*/
|
||||
t_u8 Aggregation : 1; /* ! Reserved */
|
||||
t_u8 AccessPolicy2 : 1; /* ! */
|
||||
t_u8 AccessPolicy1 : 1; /* ! */
|
||||
|
@ -750,7 +750,9 @@ typedef MLAN_PACK_START struct {
|
|||
t_u8 AccessPolicy1 : 1; /* ! */
|
||||
t_u8 AccessPolicy2 : 1; /* ! */
|
||||
t_u8 Aggregation : 1; /* ! Reserved */
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior:1; /* ! Legacy/Trigg */
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /* !
|
||||
Legacy/Trigg
|
||||
*/
|
||||
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
||||
t_u8 Schedule : 1;
|
||||
|
@ -761,11 +763,13 @@ typedef MLAN_PACK_START struct {
|
|||
/** Data structure of WMM TSPEC Nominal Size */
|
||||
typedef MLAN_PACK_START struct {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
t_u16 Fixed:1; /* ! 1: Fixed size given in Size, 0: Var, size is nominal */
|
||||
t_u16 Fixed : 1; /* ! 1: Fixed size given in Size, 0: Var, size is
|
||||
nominal */
|
||||
t_u16 Size : 15; /* ! Nominal size in octets */
|
||||
#else
|
||||
t_u16 Size : 15; /* ! Nominal size in octets */
|
||||
t_u16 Fixed:1; /* ! 1: Fixed size given in Size, 0: Var, size is nominal */
|
||||
t_u16 Fixed : 1; /* ! 1: Fixed size given in Size, 0: Var, size is
|
||||
nominal */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_NomMSDUSize_t;
|
||||
|
||||
|
@ -782,7 +786,6 @@ typedef MLAN_PACK_START struct {
|
|||
|
||||
/** Data structure of WMM TSPEC Body */
|
||||
typedef MLAN_PACK_START struct {
|
||||
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_t TSInfo;
|
||||
IEEEtypes_WMM_TSPEC_NomMSDUSize_t NomMSDUSize;
|
||||
t_u16 MaximumMSDUSize;
|
||||
|
@ -829,6 +832,7 @@ typedef MLAN_PACK_START enum _IEEEtypes_ActionCategory_e {
|
|||
IEEE_MGMT_ACTION_CATEGORY_UNPROTECT_WNM = 11,
|
||||
|
||||
IEEE_MGMT_ACTION_CATEGORY_WMM_TSPEC = 17
|
||||
|
||||
} MLAN_PACK_END IEEEtypes_ActionCategory_e;
|
||||
|
||||
/** WMM TSPEC operations */
|
||||
|
@ -842,7 +846,6 @@ typedef MLAN_PACK_START enum _IEEEtypes_WMM_Tspec_Action_e {
|
|||
|
||||
/** WMM TSPEC Category Action Base */
|
||||
typedef MLAN_PACK_START struct {
|
||||
|
||||
IEEEtypes_ActionCategory_e category;
|
||||
IEEEtypes_WMM_Tspec_Action_e action;
|
||||
t_u8 dialogToken;
|
||||
|
@ -851,7 +854,6 @@ typedef MLAN_PACK_START struct {
|
|||
|
||||
/** WMM TSPEC AddTS request structure */
|
||||
typedef MLAN_PACK_START struct {
|
||||
|
||||
IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct;
|
||||
t_u8 statusCode;
|
||||
IEEEtypes_WMM_TSPEC_t tspecIE;
|
||||
|
@ -1229,8 +1231,7 @@ typedef MLAN_PACK_START struct _IEEEtypes_HECap_t {
|
|||
typedef MLAN_PACK_START struct {
|
||||
t_u8 element_id; /**< IEEE Element ID = 32 */
|
||||
t_u8 len; /**< Element length after id and len */
|
||||
t_u8 local_constraint;
|
||||
/**< Local power constraint applied to 11d
|
||||
t_u8 local_constraint; /**< Local power constraint applied to 11d
|
||||
chan info */
|
||||
} MLAN_PACK_END IEEEtypes_PowerConstraint_t;
|
||||
|
||||
|
@ -1238,19 +1239,17 @@ typedef MLAN_PACK_START struct {
|
|||
typedef MLAN_PACK_START struct {
|
||||
t_u8 element_id; /**< IEEE Element ID = 33 */
|
||||
t_u8 len; /**< Element length after id and len */
|
||||
t_s8 min_tx_power_capability;
|
||||
/**< Minimum Transmit power (dBm) */
|
||||
t_s8 max_tx_power_capability;
|
||||
/**< Maximum Transmit power (dBm) */
|
||||
t_s8 min_tx_power_capability; /**< Minimum Transmit power (dBm) */
|
||||
t_s8 max_tx_power_capability; /**< Maximum Transmit power (dBm) */
|
||||
} MLAN_PACK_END IEEEtypes_PowerCapability_t;
|
||||
|
||||
/** IEEE TPC Report element (7.3.2.18) */
|
||||
typedef MLAN_PACK_START struct {
|
||||
t_u8 element_id; /**< IEEE Element ID = 35 */
|
||||
t_u8 len; /**< Element length after id and len */
|
||||
t_s8 tx_power; /**< Max power used to transmit the TPC Report frame (dBm) */
|
||||
t_s8 link_margin;
|
||||
/**< Link margin when TPC Request received (dB) */
|
||||
t_s8 tx_power; /**< Max power used to transmit the TPC Report frame
|
||||
(dBm) */
|
||||
t_s8 link_margin; /**< Link margin when TPC Request received (dB) */
|
||||
} MLAN_PACK_END IEEEtypes_TPCReport_t;
|
||||
|
||||
/* IEEE Supported Channel sub-band description (7.3.2.19) */
|
||||
|
@ -1350,11 +1349,13 @@ typedef MLAN_PACK_START struct {
|
|||
typedef MLAN_PACK_START struct {
|
||||
t_u8 element_id; /**< IEEE Element ID = 40 */
|
||||
t_u8 len; /**< Element length after id and len */
|
||||
t_u8 quiet_count; /**< Number of TBTTs until beacon with the quiet period */
|
||||
t_u8 quiet_period; /**< Regular quiet period, # of TBTTS between periods */
|
||||
t_u16 quiet_duration;
|
||||
/**< Duration of the quiet period in TUs */
|
||||
t_u16 quiet_offset; /**< Offset in TUs from the TBTT for the quiet period */
|
||||
t_u8 quiet_count; /**< Number of TBTTs until beacon with the quiet
|
||||
period */
|
||||
t_u8 quiet_period; /**< Regular quiet period, # of TBTTS between periods
|
||||
*/
|
||||
t_u16 quiet_duration; /**< Duration of the quiet period in TUs */
|
||||
t_u16 quiet_offset; /**< Offset in TUs from the TBTT for the quiet
|
||||
period */
|
||||
|
||||
} MLAN_PACK_END IEEEtypes_Quiet_t;
|
||||
|
||||
|
@ -1400,8 +1401,8 @@ typedef MLAN_PACK_START struct {
|
|||
*/
|
||||
typedef MLAN_PACK_START struct {
|
||||
t_u8 channel_number; /**< Channel number */
|
||||
MeasRptBasicMap_t rpt_map;
|
||||
/**< Basic measurement report for the channel */
|
||||
MeasRptBasicMap_t rpt_map; /**< Basic measurement report for the channel
|
||||
*/
|
||||
|
||||
} MLAN_PACK_END IEEEtypes_ChannelMap_t;
|
||||
|
||||
|
@ -1414,11 +1415,11 @@ typedef MLAN_PACK_START struct {
|
|||
typedef MLAN_PACK_START struct {
|
||||
t_u8 element_id; /**< IEEE Element ID = 41 */
|
||||
t_u8 len; /**< Element length after id and len */
|
||||
t_u8 dfs_owner[MLAN_MAC_ADDR_LENGTH];
|
||||
/**< DFS Owner STA Address */
|
||||
t_u8 dfs_owner[MLAN_MAC_ADDR_LENGTH]; /**< DFS Owner STA Address */
|
||||
t_u8 dfs_recovery_interval; /**< DFS Recovery time in TBTTs */
|
||||
|
||||
/** Variable length map field, one Map entry for each supported channel */
|
||||
/** Variable length map field, one Map entry for each supported channel
|
||||
*/
|
||||
IEEEtypes_ChannelMap_t channel_map[WLAN_11H_MAX_IBSS_DFS_CHANNELS];
|
||||
|
||||
} MLAN_PACK_END IEEEtypes_IBSS_DFS_t;
|
||||
|
@ -1429,15 +1430,15 @@ typedef MLAN_PACK_START struct {
|
|||
* join commands
|
||||
*/
|
||||
typedef struct {
|
||||
t_u8 sensed_11h;
|
||||
/**< Capability bit set or 11h IE found in this BSS */
|
||||
t_u8 sensed_11h; /**< Capability bit set or 11h IE found in this BSS */
|
||||
|
||||
IEEEtypes_PowerConstraint_t power_constraint;
|
||||
/**< Power Constraint IE */
|
||||
IEEEtypes_PowerCapability_t power_capability;
|
||||
/**< Power Capability IE */
|
||||
IEEEtypes_PowerConstraint_t power_constraint; /**< Power Constraint IE
|
||||
*/
|
||||
IEEEtypes_PowerCapability_t power_capability; /**< Power Capability IE
|
||||
*/
|
||||
IEEEtypes_TPCReport_t tpc_report; /**< TPC Report IE */
|
||||
IEEEtypes_ChanSwitchAnn_t chan_switch_ann;/**< Channel Switch Announcement IE */
|
||||
IEEEtypes_ChanSwitchAnn_t chan_switch_ann; /**< Channel Switch
|
||||
Announcement IE */
|
||||
IEEEtypes_Quiet_t quiet; /**< Quiet IE */
|
||||
IEEEtypes_IBSS_DFS_t ibss_dfs; /**< IBSS DFS Element IE */
|
||||
|
||||
|
@ -1557,7 +1558,8 @@ typedef MLAN_PACK_START struct {
|
|||
*/
|
||||
t_u8 ssid_filter;
|
||||
/**
|
||||
* @brief BSSID filter sent in the firmware command to limit the results
|
||||
* @brief BSSID filter sent in the firmware command to limit the
|
||||
* results
|
||||
*/
|
||||
t_u8 specific_bssid[MLAN_MAC_ADDR_LENGTH];
|
||||
/**
|
||||
|
|
|
@ -228,6 +228,7 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_11H_CHAN_REPORT_REQUEST = 0x00110004,
|
||||
MLAN_OID_11H_CHAN_SWITCH_COUNT = 0x00110005,
|
||||
MLAN_OID_11H_CHAN_NOP_INFO = 0x00110006,
|
||||
MLAN_OID_11H_DFS_W53_CFG = 0x00110008,
|
||||
|
||||
/* 802.11n Configuration Group RANDYTODO for value assign */
|
||||
MLAN_IOCTL_11AC_CFG = 0x00120000,
|
||||
|
@ -239,6 +240,7 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_IOCTL_11AX_CFG = 0x00170000,
|
||||
MLAN_OID_11AX_HE_CFG = 0x00170001,
|
||||
MLAN_OID_11AX_CMD_CFG = 0x00170002,
|
||||
MLAN_OID_11AX_TWT_CFG = 0x00170003,
|
||||
|
||||
/* Miscellaneous Configuration Group */
|
||||
MLAN_IOCTL_MISC_CFG = 0x00200000,
|
||||
|
@ -337,10 +339,7 @@ enum _mlan_act_ioctl {
|
|||
};
|
||||
|
||||
/** Enumeration for generic enable/disable */
|
||||
enum _mlan_act_generic {
|
||||
MLAN_ACT_DISABLE = 0,
|
||||
MLAN_ACT_ENABLE = 1
|
||||
};
|
||||
enum _mlan_act_generic { MLAN_ACT_DISABLE = 0, MLAN_ACT_ENABLE = 1 };
|
||||
|
||||
/** Enumeration for scan mode */
|
||||
enum _mlan_scan_mode {
|
||||
|
@ -434,8 +433,8 @@ typedef struct {
|
|||
*/
|
||||
t_u32 scan_number;
|
||||
/**
|
||||
* Buffer marker for multiple wlan_ioctl_get_scan_table_entry structures.
|
||||
* Each struct is padded to the nearest 32 bit boundary.
|
||||
* Buffer marker for multiple wlan_ioctl_get_scan_table_entry
|
||||
* structures. Each struct is padded to the nearest 32 bit boundary.
|
||||
*/
|
||||
t_u8 scan_table_entry_buf[1];
|
||||
} wlan_ioctl_get_scan_table_info;
|
||||
|
@ -450,7 +449,8 @@ typedef struct _wlan_ioctl_get_scan_table_entry {
|
|||
*
|
||||
* Length value is included so future fixed fields can be added to the
|
||||
* response without breaking backwards compatibility. Use the length
|
||||
* to find the offset for the bssInfoLength field, not a sizeof() calc.
|
||||
* to find the offset for the bssInfoLength field, not a sizeof()
|
||||
* calc.
|
||||
*/
|
||||
t_u32 fixed_field_length;
|
||||
|
||||
|
@ -626,7 +626,8 @@ typedef struct _mlan_chan_list {
|
|||
|
||||
/* This channel is disabled.*/
|
||||
#define CHAN_FLAGS_DISABLED MBIT(0)
|
||||
/* do not initiate radiation, this includes sending probe requests or beaconing */
|
||||
/* do not initiate radiation, this includes sending probe requests or beaconing
|
||||
*/
|
||||
#define CHAN_FLAGS_NO_IR MBIT(1)
|
||||
/* Radar detection is required on this channel */
|
||||
#define CHAN_FLAGS_RADAR MBIT(3)
|
||||
|
@ -1077,6 +1078,8 @@ typedef struct _mlan_uap_bss_param {
|
|||
/** Wmm parameters */
|
||||
wmm_parameter_t wmm_para;
|
||||
|
||||
/** uap host based config */
|
||||
t_u32 uap_host_based_config;
|
||||
} mlan_uap_bss_param;
|
||||
|
||||
/** mlan_uap_scan_channels */
|
||||
|
@ -1192,7 +1195,8 @@ typedef struct _mlan_ds_bss {
|
|||
t_u32 bcn_interval;
|
||||
/** ATIM window for MLAN_OID_IBSS_ATIM_WINDOW */
|
||||
t_u32 atim_window;
|
||||
/** deauth param for MLAN_OID_BSS_STOP & MLAN_OID_UAP_DEAUTH_STA */
|
||||
/** deauth param for MLAN_OID_BSS_STOP & MLAN_OID_UAP_DEAUTH_STA
|
||||
*/
|
||||
mlan_deauth_param deauth_param;
|
||||
#ifdef UAP_SUPPORT
|
||||
/** host based flag for MLAN_OID_BSS_START */
|
||||
|
@ -1422,7 +1426,8 @@ enum _mlan_adhoc_status {
|
|||
ADHOC_IDLE,
|
||||
ADHOC_STARTED,
|
||||
ADHOC_JOINED,
|
||||
ADHOC_COALESCED, ADHOC_STARTING
|
||||
ADHOC_COALESCED,
|
||||
ADHOC_STARTING
|
||||
};
|
||||
|
||||
typedef struct _mlan_ds_get_stats_org {
|
||||
|
@ -2520,7 +2525,8 @@ typedef struct _mlan_pmk_t {
|
|||
/** Embedded supplicant RSN type: WPA2 */
|
||||
#define RSN_TYPE_WPA2 MBIT(5)
|
||||
/** Embedded supplicant RSN type: RFU */
|
||||
#define RSN_TYPE_VALID_BITS (RSN_TYPE_NO_RSN | RSN_TYPE_WPA | RSN_TYPE_WPANONE | RSN_TYPE_WPA2)
|
||||
#define RSN_TYPE_VALID_BITS \
|
||||
(RSN_TYPE_NO_RSN | RSN_TYPE_WPA | RSN_TYPE_WPANONE | RSN_TYPE_WPA2)
|
||||
|
||||
/** Embedded supplicant cipher type: TKIP */
|
||||
#define EMBED_CIPHER_TKIP MBIT(2)
|
||||
|
@ -2639,11 +2645,7 @@ typedef struct _mlan_ds_sup_cfg {
|
|||
/** Rate Configuration Group */
|
||||
/*-----------------------------------------------------------------*/
|
||||
/** Enumeration for rate type */
|
||||
enum _mlan_rate_type {
|
||||
MLAN_RATE_INDEX,
|
||||
MLAN_RATE_VALUE,
|
||||
MLAN_RATE_BITMAP
|
||||
};
|
||||
enum _mlan_rate_type { MLAN_RATE_INDEX, MLAN_RATE_VALUE, MLAN_RATE_BITMAP };
|
||||
|
||||
/** Enumeration for rate format */
|
||||
enum _mlan_rate_format {
|
||||
|
@ -2769,7 +2771,6 @@ typedef struct _mlan_power_cfg_t {
|
|||
#define MAX_POWER_GROUP 64
|
||||
/** Type definition of mlan_power group info */
|
||||
typedef struct mlan_power_group {
|
||||
|
||||
/** rate format (LG: 0, HT: 1, VHT: 2, no auto ctrl: 0xFF) */
|
||||
t_u32 rate_format;
|
||||
/** bandwidth (LG: 20 MHz, HT: 20/40 MHz, VHT: 80/160/80+80 MHz) */
|
||||
|
@ -2817,9 +2818,11 @@ typedef struct _mlan_ds_band_steer_cfg {
|
|||
t_u8 action;
|
||||
/** enable/disable band steering*/
|
||||
t_u8 state;
|
||||
/** Probe Response will be blocked to 2G channel for first block_2g_prb_req probe requests*/
|
||||
/** Probe Response will be blocked to 2G channel for first
|
||||
* block_2g_prb_req probe requests*/
|
||||
t_u8 block_2g_prb_req;
|
||||
/** When band steering is enabled, limit the btm request sent to STA at <max_btm_req_allowed>*/
|
||||
/** When band steering is enabled, limit the btm request sent to STA at
|
||||
* <max_btm_req_allowed>*/
|
||||
t_u8 max_btm_req_allowed;
|
||||
} mlan_ds_band_steer_cfg, *pmlan_ds_band_steer_cfg;
|
||||
|
||||
|
@ -2841,7 +2844,9 @@ typedef struct _mlan_ds_band_steer_cfg {
|
|||
#define HOST_SLEEP_COND_IPV6_PACKET MBIT(31)
|
||||
|
||||
/** Host sleep config conditions: Default */
|
||||
#define HOST_SLEEP_DEF_COND (HOST_SLEEP_COND_BROADCAST_DATA | HOST_SLEEP_COND_UNICAST_DATA | HOST_SLEEP_COND_MAC_EVENT)
|
||||
#define HOST_SLEEP_DEF_COND \
|
||||
(HOST_SLEEP_COND_BROADCAST_DATA | HOST_SLEEP_COND_UNICAST_DATA | \
|
||||
HOST_SLEEP_COND_MAC_EVENT)
|
||||
|
||||
/** Host sleep config GPIO : Default */
|
||||
#define HOST_SLEEP_DEF_GPIO 0xff
|
||||
|
@ -2901,7 +2906,8 @@ typedef struct _mlan_mgmt_frame_wakeup {
|
|||
** Action[1:0]=00 Discard and Not Wake host
|
||||
** Action[1:0]=01 Discard and Wake host
|
||||
** Action[1:0]=10 Invalid
|
||||
** Note that default action on non-match is "Discard and Not Wake host".
|
||||
** Note that default action on non-match is "Discard and Not Wake
|
||||
*host".
|
||||
**/
|
||||
t_u32 action;
|
||||
/** Frame type(p2p, tdls...)
|
||||
|
@ -3138,7 +3144,8 @@ typedef struct _mlan_ds_pm_cfg {
|
|||
t_u32 sleep_period;
|
||||
/** PS configuration parameters for MLAN_OID_PM_CFG_PS_CFG */
|
||||
mlan_ds_ps_cfg ps_cfg;
|
||||
/** PS configuration parameters for MLAN_OID_PM_CFG_SLEEP_PARAMS */
|
||||
/** PS configuration parameters for MLAN_OID_PM_CFG_SLEEP_PARAMS
|
||||
*/
|
||||
mlan_ds_sleep_params sleep_params;
|
||||
/** PS configuration parameters for MLAN_OID_PM_CFG_PS_MODE */
|
||||
mlan_ds_ps_mgmt ps_mgmt;
|
||||
|
@ -3157,10 +3164,8 @@ typedef struct _mlan_ds_pm_cfg {
|
|||
typedef struct {
|
||||
mlan_cmd_result_e cmd_result; /**< Firmware execution result */
|
||||
|
||||
t_u32 pkt_threshold;
|
||||
/** Packet threshold */
|
||||
t_u16 delay;
|
||||
/** Timeout value in milliseconds */
|
||||
t_u32 pkt_threshold; /** Packet threshold */
|
||||
t_u16 delay; /** Timeout value in milliseconds */
|
||||
} wlan_ioctl_rx_pkt_coalesce_config_t;
|
||||
#endif
|
||||
|
||||
|
@ -3193,10 +3198,8 @@ typedef struct {
|
|||
t_u8 ieee_status_code; /**< IEEE status code */
|
||||
|
||||
t_u32 ie_data_len; /**< Length of ie block in ie_data */
|
||||
t_u8 ie_data[MLAN_WMM_TSPEC_SIZE
|
||||
/**< TSPEC to send in the ADDTS */
|
||||
+ MLAN_WMM_ADDTS_EXTRA_IE_BYTES];
|
||||
/**< Extra IE buf*/
|
||||
t_u8 ie_data[MLAN_WMM_TSPEC_SIZE /**< TSPEC to send in the ADDTS */
|
||||
+ MLAN_WMM_ADDTS_EXTRA_IE_BYTES]; /**< Extra IE buf*/
|
||||
} wlan_ioctl_wmm_addts_req_t;
|
||||
|
||||
/**
|
||||
|
@ -3208,12 +3211,10 @@ typedef struct {
|
|||
* @sa woal_wmm_delts_req_ioctl
|
||||
*/
|
||||
typedef struct {
|
||||
mlan_cmd_result_e cmd_result;
|
||||
/**< Firmware execution result */
|
||||
mlan_cmd_result_e cmd_result; /**< Firmware execution result */
|
||||
t_u8 ieee_reason_code; /**< IEEE reason code sent, unused for WMM */
|
||||
t_u32 ie_data_len; /**< Length of ie block in ie_data */
|
||||
t_u8 ie_data[MLAN_WMM_TSPEC_SIZE];
|
||||
/**< TSPEC to send in the DELTS */
|
||||
t_u8 ie_data[MLAN_WMM_TSPEC_SIZE]; /**< TSPEC to send in the DELTS */
|
||||
} wlan_ioctl_wmm_delts_req_t;
|
||||
|
||||
/**
|
||||
|
@ -3366,7 +3367,8 @@ typedef struct _mlan_ds_wmm_cfg {
|
|||
mlan_ds_wmm_delts delts;
|
||||
/** WMM queue configuration for MLAN_OID_WMM_CFG_QUEUE_CONFIG */
|
||||
mlan_ds_wmm_queue_config q_cfg;
|
||||
/** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */
|
||||
/** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI,
|
||||
* WMM_AC_VO */
|
||||
wmm_ac_parameters_t ac_params[MAX_AC_QUEUES];
|
||||
/** WMM queue status for MLAN_OID_WMM_CFG_QUEUE_STATS */
|
||||
mlan_ds_wmm_queue_stats q_stats;
|
||||
|
@ -3632,7 +3634,8 @@ typedef struct _mlan_ds_11n_cfg {
|
|||
t_u32 coex_rx_winsize;
|
||||
/** aggrprirotity table for MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM */
|
||||
mlan_ds_ibss_ampdu_param ibss_ampdu;
|
||||
/** Minimum BA Threshold for MLAN_OID_11N_CFG_MIN_BA_THRESHOLD */
|
||||
/** Minimum BA Threshold for MLAN_OID_11N_CFG_MIN_BA_THRESHOLD
|
||||
*/
|
||||
t_u8 min_ba_threshold;
|
||||
} param;
|
||||
} mlan_ds_11n_cfg, *pmlan_ds_11n_cfg;
|
||||
|
@ -3754,15 +3757,25 @@ typedef struct _mlan_ds_11ax_cfg {
|
|||
#define MLAN_11AXCMD_CFG_ID_SR_ENABLE 2
|
||||
#define MLAN_11AXCMD_CFG_ID_BEAM_CHANGE 3
|
||||
#define MLAN_11AXCMD_CFG_ID_HTC_ENABLE 4
|
||||
#define MLAN_11AXCMD_CFG_ID_TXOP_RTS 5
|
||||
#define MLAN_11AXCMD_CFG_ID_TX_OMI 6
|
||||
#define MLAN_11AXCMD_CFG_ID_OBSSNBRU_TOLTIME 7
|
||||
|
||||
#define MLAN_11AXCMD_SR_SUBID 0x102
|
||||
#define MLAN_11AXCMD_BEAM_SUBID 0x103
|
||||
#define MLAN_11AXCMD_HTC_SUBID 0x104
|
||||
#define MLAN_11AXCMD_TXOMI_SUBID 0x105
|
||||
#define MLAN_11AXCMD_OBSS_TOLTIME_SUBID 0x106
|
||||
#define MLAN_11AXCMD_TXOPRTS_SUBID 0x108
|
||||
|
||||
#define MLAN_11AX_TWT_SETUP_SUBID 0x114
|
||||
#define MLAN_11AX_TWT_TEARDOWN_SUBID 0x115
|
||||
|
||||
#define MRVL_DOT11AX_ENABLE_SR_TLV_ID (PROPRIETARY_TLV_BASE_ID + 322)
|
||||
#define MRVL_DOT11AX_OBSS_PD_OFFSET_TLV_ID (PROPRIETARY_TLV_BASE_ID + 323)
|
||||
|
||||
/** Type definition of mlan_11axcmdcfg_obss_pd_offset for MLAN_OID_11AX_CMD_CFG */
|
||||
/** Type definition of mlan_11axcmdcfg_obss_pd_offset for MLAN_OID_11AX_CMD_CFG
|
||||
*/
|
||||
typedef struct MLAN_PACK_START _mlan_11axcmdcfg_obss_pd_offset {
|
||||
/** <NON_SRG_OffSET, SRG_OFFSET> */
|
||||
t_u8 offset[2];
|
||||
|
@ -3799,6 +3812,25 @@ typedef struct _mlan_ds_11ax_htc_cmd {
|
|||
t_u8 value;
|
||||
} mlan_ds_11ax_htc_cmd, *pmlan_ds_11ax_htc_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_htc_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_txop_cmd {
|
||||
/** Two byte rts threshold value of which only 10 bits, bit 0 to bit 9
|
||||
* are valid */
|
||||
t_u16 rts_thres;
|
||||
} mlan_ds_11ax_txop_cmd, *pmlan_ds_11ax_txop_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_htc_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_txomi_cmd {
|
||||
/* 11ax spec 9.2.4.6a.2 OM Control 12 bits. Bit 0 to bit 11 */
|
||||
t_u16 omi;
|
||||
} mlan_ds_11ax_txomi_cmd, *pmlan_ds_11ax_txomi_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_toltime_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_toltime_cmd {
|
||||
/* OBSS Narrow Bandwidth RU Tolerance Time */
|
||||
t_u32 tol_time;
|
||||
} mlan_ds_11ax_toltime_cmd, *pmlan_ds_11ax_toltime_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_cmd_cfg for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_cmd_cfg {
|
||||
/** Sub-command */
|
||||
|
@ -3813,9 +3845,72 @@ typedef struct _mlan_ds_11ax_cmd_cfg {
|
|||
mlan_ds_11ax_beam_cmd beam_cfg;
|
||||
/** HTC configuration for MLAN_11AXCMD_HTC_SUBID */
|
||||
mlan_ds_11ax_htc_cmd htc_cfg;
|
||||
/** txop RTS configuration for MLAN_11AXCMD_TXOPRTS_SUBID */
|
||||
mlan_ds_11ax_txop_cmd txop_cfg;
|
||||
/** tx omi configuration for MLAN_11AXCMD_TXOMI_SUBID */
|
||||
mlan_ds_11ax_txomi_cmd txomi_cfg;
|
||||
/** OBSS tolerance time configuration for
|
||||
* MLAN_11AXCMD_TOLTIME_SUBID */
|
||||
mlan_ds_11ax_toltime_cmd toltime_cfg;
|
||||
} param;
|
||||
} mlan_ds_11ax_cmd_cfg, *pmlan_ds_11ax_cmd_cfg;
|
||||
|
||||
/** Type definition of mlan_ds_twt_setup for MLAN_OID_11AX_TWT_CFG */
|
||||
typedef struct MLAN_PACK_START _mlan_ds_twt_setup {
|
||||
/** Implicit, 0: TWT session is explicit, 1: Session is implicit */
|
||||
t_u8 implicit;
|
||||
/** Announced, 0: Unannounced, 1: Announced TWT */
|
||||
t_u8 announced;
|
||||
/** Trigger Enabled, 0: Non-Trigger enabled, 1: Trigger enabled TWT */
|
||||
t_u8 trigger_enabled;
|
||||
/** TWT Information Disabled, 0: TWT info enabled, 1: TWT info disabled
|
||||
*/
|
||||
t_u8 twt_info_disabled;
|
||||
/** Negotiation Type, 0: Future Individual TWT SP start time, 1: Next
|
||||
* Wake TBTT time */
|
||||
t_u8 negotiation_type;
|
||||
/** TWT Wakeup Duration, time after which the TWT requesting STA can
|
||||
* transition to doze state */
|
||||
t_u8 twt_wakeup_duration;
|
||||
/** Flow Identifier. Range: [0-7]*/
|
||||
t_u8 flow_identifier;
|
||||
/** Hard Constraint, 0: FW can tweak the TWT setup parameters if it is
|
||||
*rejected by AP.
|
||||
** 1: Firmware should not tweak any parameters. */
|
||||
t_u8 hard_constraint;
|
||||
/** TWT Exponent, Range: [0-63] */
|
||||
t_u8 twt_exponent;
|
||||
/** TWT Mantissa Range: [0-sizeof(UINT16)] */
|
||||
t_u16 twt_mantissa;
|
||||
} MLAN_PACK_END mlan_ds_twt_setup, *pmlan_ds_twt_setup;
|
||||
|
||||
/** Type definition of mlan_ds_twt_teardown for MLAN_OID_11AX_TWT_CFG */
|
||||
typedef struct MLAN_PACK_START _mlan_ds_twt_teardown {
|
||||
/** TWT Flow Identifier. Range: [0-7] */
|
||||
t_u8 flow_identifier;
|
||||
/** Negotiation Type. 0: Future Individual TWT SP start time, 1: Next
|
||||
* Wake TBTT time */
|
||||
t_u8 negotiation_type;
|
||||
/** Tear down all TWT. 1: To teardown all TWT, 0 otherwise */
|
||||
t_u8 teardown_all_twt;
|
||||
} MLAN_PACK_END mlan_ds_twt_teardown, *pmlan_ds_twt_teardown;
|
||||
|
||||
/** Type definition of mlan_ds_twtcfg for MLAN_OID_11AX_TWT_CFG */
|
||||
typedef struct MLAN_PACK_START _mlan_ds_twtcfg {
|
||||
/** Sub-command */
|
||||
t_u32 sub_command;
|
||||
/** Sub-id */
|
||||
t_u32 sub_id;
|
||||
/** TWT Setup/Teardown configuration parameter */
|
||||
union {
|
||||
/** TWT Setup config for Sub ID: MLAN_11AX_TWT_SETUP_SUBID */
|
||||
mlan_ds_twt_setup twt_setup;
|
||||
/** TWT Teardown config for Sub ID: MLAN_11AX_TWT_TEARDOWN_SUBID
|
||||
*/
|
||||
mlan_ds_twt_teardown twt_teardown;
|
||||
} param;
|
||||
} MLAN_PACK_END mlan_ds_twtcfg, *pmlan_ds_twtcfg;
|
||||
|
||||
/** Country code length */
|
||||
#define COUNTRY_CODE_LEN 3
|
||||
|
||||
|
@ -3882,7 +3977,8 @@ enum _mlan_reg_type {
|
|||
MLAN_REG_RF,
|
||||
MLAN_REG_CAU = 5,
|
||||
MLAN_REG_PSU = 6,
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || defined(PCIE9097) || defined(USB9097) || defined(SD9097)
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SD9097)
|
||||
MLAN_REG_MAC2 = 0x81,
|
||||
MLAN_REG_BBP2 = 0x82,
|
||||
MLAN_REG_RF2 = 0x83
|
||||
|
@ -3949,7 +4045,8 @@ typedef struct _mlan_ds_11h_dfs_testing {
|
|||
t_u16 usr_nop_period_sec;
|
||||
/** User-configured skip channel change, 0 to disable */
|
||||
t_u8 usr_no_chan_change;
|
||||
/** User-configured fixed channel to change to, 0 to use random channel */
|
||||
/** User-configured fixed channel to change to, 0 to use random channel
|
||||
*/
|
||||
t_u8 usr_fixed_new_chan;
|
||||
} mlan_ds_11h_dfs_testing, *pmlan_ds_11h_dfs_testing;
|
||||
|
||||
|
@ -3969,17 +4066,22 @@ typedef struct _mlan_ds_11h_chan_rep_req {
|
|||
t_u16 startFreq;
|
||||
Band_Config_t bandcfg;
|
||||
t_u8 chanNum;
|
||||
t_u32 millisec_dwell_time;
|
||||
/**< Channel dwell time in milliseconds */
|
||||
t_u32 millisec_dwell_time; /**< Channel dwell time in milliseconds */
|
||||
t_u8 host_based;
|
||||
} mlan_ds_11h_chan_rep_req;
|
||||
|
||||
typedef struct _mlan_ds_11h_dfs_w53_cfg {
|
||||
/** dfs w53 cfg */
|
||||
t_u8 dfs53cfg;
|
||||
} mlan_ds_11h_dfs_w53_cfg;
|
||||
|
||||
/** Type definition of mlan_ds_11h_cfg for MLAN_IOCTL_11H_CFG */
|
||||
typedef struct _mlan_ds_11h_cfg {
|
||||
/** Sub-command */
|
||||
t_u32 sub_command;
|
||||
union {
|
||||
/** Local power constraint for MLAN_OID_11H_LOCAL_POWER_CONSTRAINT */
|
||||
/** Local power constraint for
|
||||
* MLAN_OID_11H_LOCAL_POWER_CONSTRAINT */
|
||||
t_s8 usr_local_power_constraint;
|
||||
/** User-configuation for MLAN_OID_11H_DFS_TESTING */
|
||||
mlan_ds_11h_dfs_testing dfs_testing;
|
||||
|
@ -3989,6 +4091,7 @@ typedef struct _mlan_ds_11h_cfg {
|
|||
mlan_ds_11h_chan_rep_req chan_rpt_req;
|
||||
/** channel switch count for MLAN_OID_11H_CHAN_SWITCH_COUNT*/
|
||||
t_s8 cs_count;
|
||||
mlan_ds_11h_dfs_w53_cfg dfs_w53_cfg;
|
||||
} param;
|
||||
} mlan_ds_11h_cfg, *pmlan_ds_11h_cfg;
|
||||
|
||||
|
@ -4617,7 +4720,8 @@ typedef MLAN_PACK_START struct _mlan_ds_misc_tx_rx_histogram {
|
|||
} MLAN_PACK_END mlan_ds_misc_tx_rx_histogram;
|
||||
|
||||
typedef MLAN_PACK_START struct _mlan_ds_cw_mode_ctrl {
|
||||
/** Mode of Operation 0: Disable 1: Tx Continuous Packet 2: Tx Continuous Wave */
|
||||
/** Mode of Operation 0: Disable 1: Tx Continuous Packet 2: Tx
|
||||
* Continuous Wave */
|
||||
t_u8 mode;
|
||||
/*channel*/
|
||||
t_u8 channel;
|
||||
|
@ -4707,7 +4811,8 @@ typedef struct _mlan_ds_misc_dmcs_status {
|
|||
dmcsStatus_t radio_status[MAX_NUM_MAC];
|
||||
} mlan_ds_misc_dmcs_status, *pmlan_ds_misc_dmcs_status;
|
||||
|
||||
/** Type definition of mlan_ds_misc_chan_trpc_cfg for MLAN_OID_MISC_GET_CHAN_TRPC_CFG */
|
||||
/** Type definition of mlan_ds_misc_chan_trpc_cfg for
|
||||
* MLAN_OID_MISC_GET_CHAN_TRPC_CFG */
|
||||
typedef struct _mlan_ds_misc_chan_trpc_cfg {
|
||||
/** sub_band */
|
||||
t_u16 sub_band;
|
||||
|
@ -4780,7 +4885,8 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
#endif
|
||||
mlan_ds_misc_otp_user_data otp_user_data;
|
||||
#ifdef USB
|
||||
/** USB aggregation parameters for MLAN_OID_MISC_USB_AGGR_CTRL */
|
||||
/** USB aggregation parameters for MLAN_OID_MISC_USB_AGGR_CTRL
|
||||
*/
|
||||
mlan_ds_misc_usb_aggr_ctrl usb_aggr_params;
|
||||
#endif
|
||||
mlan_ds_misc_aggr_ctrl aggr_params;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -25,12 +25,12 @@
|
|||
|
||||
#include "moal_main.h"
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
#if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
|
||||
#define IEEE80211_CHAN_PASSIVE_SCAN IEEE80211_CHAN_NO_IR
|
||||
#define IEEE80211_CHAN_NO_IBSS IEEE80211_CHAN_NO_IR
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
|
||||
#if KERNEL_VERSION(3, 16, 0) <= CFG80211_VERSION_CODE
|
||||
#define MAX_CSA_COUNTERS_NUM 2
|
||||
#endif
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
|||
#ifndef WLAN_CIPHER_SUITE_AES_CMAC
|
||||
#define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4,0,0)
|
||||
#if KERNEL_VERSION(4, 0, 0) <= CFG80211_VERSION_CODE
|
||||
#ifndef WLAN_CIPHER_SUITE_BIP_GMAC_256
|
||||
#define WLAN_CIPHER_SUITE_BIP_GMAC_256 0x000FAC0C
|
||||
#endif
|
||||
|
@ -81,7 +81,7 @@ void *woal_get_netdev_priv(struct net_device *dev);
|
|||
#ifdef STA_SUPPORT
|
||||
/** get scan interface */
|
||||
moal_private *woal_get_scan_interface(moal_handle *handle);
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
#if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
|
||||
/** AUTH pending flag */
|
||||
#define HOST_MLME_AUTH_PENDING MBIT(0)
|
||||
/** AUTH complete flag */
|
||||
|
@ -98,23 +98,23 @@ t_u8 woal_band_cfg_to_ieee_band(t_u32 band);
|
|||
int woal_cfg80211_change_virtual_intf(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
enum nl80211_iftype type,
|
||||
#if CFG80211_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
||||
#if KERNEL_VERSION(4, 12, 0) > CFG80211_VERSION_CODE
|
||||
u32 *flags,
|
||||
#endif
|
||||
struct vif_params *params);
|
||||
|
||||
int woal_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed);
|
||||
|
||||
int woal_cfg80211_add_key(struct wiphy *wiphy,
|
||||
struct net_device *dev, t_u8 key_index,
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 36)
|
||||
int woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
|
||||
t_u8 key_index,
|
||||
#if KERNEL_VERSION(2, 6, 36) < CFG80211_VERSION_CODE
|
||||
bool pairwise,
|
||||
#endif
|
||||
const t_u8 *mac_addr, struct key_params *params);
|
||||
|
||||
int woal_cfg80211_del_key(struct wiphy *wiphy,
|
||||
struct net_device *dev, t_u8 key_index,
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 36)
|
||||
int woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
|
||||
t_u8 key_index,
|
||||
#if KERNEL_VERSION(2, 6, 36) < CFG80211_VERSION_CODE
|
||||
bool pairwise,
|
||||
#endif
|
||||
const t_u8 *mac_addr);
|
||||
|
@ -133,33 +133,31 @@ int woal_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *dev,
|
|||
int woal_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device *dev);
|
||||
#endif
|
||||
|
||||
int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *peer,
|
||||
const struct cfg80211_bitrate_mask *mask);
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
|
||||
#if KERNEL_VERSION(2, 6, 38) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant);
|
||||
int woal_cfg80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant);
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
int woal_cfg80211_set_qos_map(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
#if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_qos_map(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_qos_map *qos_map);
|
||||
#endif
|
||||
|
||||
#ifdef STA_CFG80211
|
||||
#ifdef STA_SUPPORT
|
||||
int woal_set_rf_channel(moal_private *priv,
|
||||
struct ieee80211_channel *chan,
|
||||
int woal_set_rf_channel(moal_private *priv, struct ieee80211_channel *chan,
|
||||
enum nl80211_channel_type channel_type,
|
||||
t_u8 wait_option);
|
||||
|
||||
static inline int
|
||||
woal_cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted)
|
||||
static inline int woal_cfg80211_scan_done(struct cfg80211_scan_request *request,
|
||||
bool aborted)
|
||||
{
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
|
||||
#if KERNEL_VERSION(4, 8, 0) <= CFG80211_VERSION_CODE
|
||||
struct cfg80211_scan_info info;
|
||||
|
||||
info.aborted = aborted;
|
||||
cfg80211_scan_done(request, &info);
|
||||
#else
|
||||
|
@ -167,44 +165,42 @@ woal_cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted)
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
mlan_status woal_inform_bss_from_scan_result(moal_private *priv,
|
||||
mlan_ssid_bssid *ssid_bssid,
|
||||
t_u8 wait_option);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 5, 0)
|
||||
#if KERNEL_VERSION(3, 5, 0) > CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_channel(struct wiphy *wiphy,
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 34)
|
||||
#if KERNEL_VERSION(2, 6, 34) < CFG80211_VERSION_CODE
|
||||
struct net_device *dev,
|
||||
#endif
|
||||
struct ieee80211_channel *chan,
|
||||
enum nl80211_channel_type channel_type);
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 37)
|
||||
int woal_cfg80211_set_default_key(struct wiphy *wiphy,
|
||||
struct net_device *dev, t_u8 key_index,
|
||||
bool ucast, bool mcast);
|
||||
#if KERNEL_VERSION(2, 6, 37) < CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev,
|
||||
t_u8 key_index, bool ucast, bool mcast);
|
||||
#else
|
||||
int woal_cfg80211_set_default_key(struct wiphy *wiphy,
|
||||
struct net_device *dev, t_u8 key_index);
|
||||
int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev,
|
||||
t_u8 key_index);
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
|
||||
#if KERNEL_VERSION(2, 6, 30) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
|
||||
struct net_device *netdev,
|
||||
t_u8 key_index);
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
#if KERNEL_VERSION(3, 1, 0) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_rekey_data(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_gtk_rekey_data *data);
|
||||
#endif
|
||||
void woal_mgmt_frame_register(moal_private *priv, u16 frame_type, bool reg);
|
||||
void woal_cfg80211_mgmt_frame_register(struct wiphy *wiphy,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
||||
#if KERNEL_VERSION(3, 6, 0) <= CFG80211_VERSION_CODE
|
||||
struct wireless_dev *wdev,
|
||||
#else
|
||||
struct net_device *dev,
|
||||
|
@ -212,30 +208,30 @@ void woal_cfg80211_mgmt_frame_register(struct wiphy *wiphy,
|
|||
t_u16 frame_type, bool reg);
|
||||
|
||||
int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
||||
#if KERNEL_VERSION(3, 6, 0) <= CFG80211_VERSION_CODE
|
||||
struct wireless_dev *wdev,
|
||||
#else
|
||||
struct net_device *dev,
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
#if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
|
||||
struct cfg80211_mgmt_tx_params *params,
|
||||
#else
|
||||
struct ieee80211_channel *chan, bool offchan,
|
||||
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
|
||||
#if KERNEL_VERSION(3, 8, 0) > CFG80211_VERSION_CODE
|
||||
enum nl80211_channel_type channel_type,
|
||||
bool channel_type_valid,
|
||||
#endif
|
||||
unsigned int wait, const u8 *buf, size_t len,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
|
||||
#if KERNEL_VERSION(3, 2, 0) <= CFG80211_VERSION_CODE
|
||||
bool no_cck,
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)
|
||||
#if KERNEL_VERSION(3, 3, 0) <= CFG80211_VERSION_CODE
|
||||
bool dont_wait_for_ack,
|
||||
#endif
|
||||
#endif
|
||||
u64 *cookie);
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
#if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
|
||||
void woal_update_radar_chans_dfs_state(struct wiphy *wiphy);
|
||||
#endif
|
||||
|
||||
|
@ -249,47 +245,46 @@ extern struct ieee80211_supported_band mac1_cfg80211_band_5ghz;
|
|||
int woal_cfg80211_bss_role_cfg(moal_private *priv, t_u16 action,
|
||||
t_u8 *bss_role);
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)
|
||||
struct wireless_dev *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy,
|
||||
const char *name,
|
||||
unsigned char
|
||||
name_assign_type,
|
||||
#if KERNEL_VERSION(4, 1, 0) <= CFG80211_VERSION_CODE
|
||||
struct wireless_dev *
|
||||
woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, const char *name,
|
||||
unsigned char name_assign_type,
|
||||
enum nl80211_iftype type,
|
||||
#if CFG80211_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
||||
#if KERNEL_VERSION(4, 12, 0) > CFG80211_VERSION_CODE
|
||||
u32 *flags,
|
||||
#endif
|
||||
struct vif_params *params);
|
||||
#else
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
|
||||
#if KERNEL_VERSION(3, 7, 0) <= CFG80211_VERSION_CODE
|
||||
struct wireless_dev *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy,
|
||||
const char *name,
|
||||
enum nl80211_iftype type,
|
||||
u32 *flags,
|
||||
struct vif_params *params);
|
||||
#else
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
||||
#if KERNEL_VERSION(3, 6, 0) <= CFG80211_VERSION_CODE
|
||||
struct wireless_dev *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy,
|
||||
char *name,
|
||||
enum nl80211_iftype type,
|
||||
u32 *flags,
|
||||
struct vif_params *params);
|
||||
#else
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 37)
|
||||
#if KERNEL_VERSION(2, 6, 37) < CFG80211_VERSION_CODE
|
||||
struct net_device *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy,
|
||||
char *name,
|
||||
enum nl80211_iftype type,
|
||||
u32 *flags,
|
||||
struct vif_params *params);
|
||||
#else
|
||||
int woal_cfg80211_add_virtual_intf(struct wiphy *wiphy,
|
||||
char *name, enum nl80211_iftype type,
|
||||
u32 *flags, struct vif_params *params);
|
||||
int woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, char *name,
|
||||
enum nl80211_iftype type, u32 *flags,
|
||||
struct vif_params *params);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
int woal_cfg80211_del_virt_if(struct wiphy *wiphy, struct net_device *dev);
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
||||
#if KERNEL_VERSION(3, 6, 0) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev);
|
||||
#else
|
||||
|
@ -344,74 +339,69 @@ void woal_remove_virtual_interface(moal_handle *handle);
|
|||
/** Define for remain on channel duration timer */
|
||||
#define MAX_REMAIN_ON_CHANNEL_DURATION (1000)
|
||||
|
||||
int woal_cfg80211_remain_on_channel_cfg(moal_private *priv,
|
||||
t_u8 wait_option, t_u8 remove,
|
||||
t_u8 *status,
|
||||
int woal_cfg80211_remain_on_channel_cfg(moal_private *priv, t_u8 wait_option,
|
||||
t_u8 remove, t_u8 *status,
|
||||
struct ieee80211_channel *chan,
|
||||
enum mlan_channel_type channel_type,
|
||||
t_u32 duration);
|
||||
|
||||
#ifdef UAP_CFG80211
|
||||
int woal_uap_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
|
||||
#if KERNEL_VERSION(3, 16, 0) <= CFG80211_VERSION_CODE
|
||||
const u8 *mac,
|
||||
#else
|
||||
u8 *mac,
|
||||
#endif
|
||||
struct station_info *stainfo);
|
||||
|
||||
int woal_uap_cfg80211_dump_station(struct wiphy *wiphy,
|
||||
struct net_device *dev, int idx,
|
||||
t_u8 *mac, struct station_info *sinfo);
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
int woal_uap_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *dev,
|
||||
int idx, t_u8 *mac,
|
||||
struct station_info *sinfo);
|
||||
#if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_change_bss(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct bss_parameters *params);
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
|
||||
#if KERNEL_VERSION(3, 9, 0) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_mac_acl(struct wiphy *wiphy, struct net_device *dev,
|
||||
const struct cfg80211_acl_data *params);
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
#if KERNEL_VERSION(3, 1, 0) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_txq_params(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct ieee80211_txq_params *params);
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)
|
||||
#if KERNEL_VERSION(3, 12, 0) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_coalesce(struct wiphy *wiphy,
|
||||
struct cfg80211_coalesce *coalesce);
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)
|
||||
int woal_cfg80211_add_beacon(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
#if KERNEL_VERSION(3, 4, 0) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_add_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_ap_settings *params);
|
||||
|
||||
int woal_cfg80211_set_beacon(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
int woal_cfg80211_set_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_beacon_data *params);
|
||||
#else
|
||||
int woal_cfg80211_add_beacon(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
int woal_cfg80211_add_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct beacon_parameters *params);
|
||||
|
||||
int woal_cfg80211_set_beacon(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
int woal_cfg80211_set_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct beacon_parameters *params);
|
||||
#endif
|
||||
|
||||
int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev);
|
||||
int woal_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
|
||||
#if KERNEL_VERSION(3, 19, 0) <= CFG80211_VERSION_CODE
|
||||
struct station_del_parameters *param);
|
||||
#else
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
|
||||
#if KERNEL_VERSION(3, 16, 0) <= CFG80211_VERSION_CODE
|
||||
const u8 *mac_addr);
|
||||
#else
|
||||
u8 *mac_addr);
|
||||
#endif
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
|
||||
#if KERNEL_VERSION(3, 12, 0) <= CFG80211_VERSION_CODE
|
||||
#if KERNEL_VERSION(3, 15, 0) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_start_radar_detection(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
struct cfg80211_chan_def *chandef,
|
||||
|
@ -422,8 +412,7 @@ int woal_cfg80211_start_radar_detection(struct wiphy *wiphy,
|
|||
struct cfg80211_chan_def *chandef);
|
||||
#endif
|
||||
|
||||
int woal_cfg80211_channel_switch(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
int woal_cfg80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_csa_settings *params);
|
||||
|
||||
void woal_cac_timer_func(void *context);
|
||||
|
@ -431,7 +420,7 @@ void woal_csa_work_queue(struct work_struct *work);
|
|||
#endif
|
||||
#endif /* UAP_CFG80211 */
|
||||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
|
||||
#if KERNEL_VERSION(3, 5, 0) <= CFG80211_VERSION_CODE
|
||||
void woal_cfg80211_notify_channel(moal_private *priv,
|
||||
chan_band_info *pchan_info);
|
||||
void woal_channel_switch_event(moal_private *priv, chan_band_info *pchan_info);
|
||||
|
@ -439,40 +428,37 @@ void woal_channel_switch_event(moal_private *priv, chan_band_info * pchan_info);
|
|||
#endif
|
||||
|
||||
#ifdef STA_CFG80211
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
|
||||
#if KERNEL_VERSION(3, 2, 0) <= CFG80211_VERSION_CODE
|
||||
void woal_bgscan_stop_event(moal_private *priv);
|
||||
void woal_cfg80211_notify_sched_scan_stop(moal_private *priv);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
#if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
|
||||
mlan_status woal_chandef_create(moal_private *priv,
|
||||
struct cfg80211_chan_def *chandef,
|
||||
chan_band_info *pchan_info);
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
||||
#if KERNEL_VERSION(4, 20, 0) <= CFG80211_VERSION_CODE
|
||||
void woal_cfg80211_setup_he_cap(moal_private *priv,
|
||||
struct ieee80211_supported_band *band);
|
||||
void woal_cfg80211_free_iftype_data(struct wiphy *wiphy);
|
||||
#endif
|
||||
|
||||
void woal_clear_all_mgmt_ies(moal_private *priv, t_u8 wait_option);
|
||||
int woal_cfg80211_mgmt_frame_ie(moal_private *priv,
|
||||
const t_u8 *beacon_ies, size_t beacon_ies_len,
|
||||
const t_u8 *proberesp_ies,
|
||||
size_t proberesp_ies_len,
|
||||
const t_u8 *assocresp_ies,
|
||||
size_t assocresp_ies_len,
|
||||
const t_u8 *probereq_ies,
|
||||
size_t probereq_ies_len, t_u16 mask,
|
||||
int woal_cfg80211_mgmt_frame_ie(
|
||||
moal_private *priv, const t_u8 *beacon_ies, size_t beacon_ies_len,
|
||||
const t_u8 *proberesp_ies, size_t proberesp_ies_len,
|
||||
const t_u8 *assocresp_ies, size_t assocresp_ies_len,
|
||||
const t_u8 *probereq_ies, size_t probereq_ies_len, t_u16 mask,
|
||||
t_u8 wait_option);
|
||||
|
||||
int woal_get_active_intf_freq(moal_private *priv);
|
||||
|
||||
void woal_cfg80211_setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info,
|
||||
t_u32 dev_cap, t_u8 *mcs_set);
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
||||
#if KERNEL_VERSION(3, 6, 0) <= CFG80211_VERSION_CODE
|
||||
void woal_cfg80211_setup_vht_cap(moal_private *priv,
|
||||
struct ieee80211_sta_vht_cap *vht_cap);
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "moal_main.h"
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
#if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
|
||||
#define RING_NAME_MAX 32
|
||||
typedef int wifi_ring_buffer_id;
|
||||
|
||||
|
@ -95,7 +95,8 @@ typedef struct _wifi_ring_buffer {
|
|||
#define WIFI_LOGGER_POWER_EVENT_SUPPORTED MBIT(3) /* Power of driver*/
|
||||
#define WIFI_LOGGER_WAKE_LOCK_SUPPORTED MBIT(4) /* Wake lock of driver*/
|
||||
#define WIFI_LOGGER_VERBOSE_SUPPORTED MBIT(5) /*verbose log of Fw*/
|
||||
#define WIFI_LOGGER_WATCHDOG_TIMER_SUPPORTED MBIT(6) /*monitor the health of Fw */
|
||||
#define WIFI_LOGGER_WATCHDOG_TIMER_SUPPORTED \
|
||||
MBIT(6) /*monitor the health of Fw*/
|
||||
|
||||
/**
|
||||
* Parameters of wifi logger events are TLVs
|
||||
|
@ -112,7 +113,8 @@ typedef struct _wifi_ring_buffer {
|
|||
|
||||
#define RING_ENTRY_SIZE (sizeof(wifi_ring_buffer_entry))
|
||||
#define ENTRY_LENGTH(hdr) (hdr->entry_size + RING_ENTRY_SIZE)
|
||||
#define READ_AVAIL_SPACE(ring) (ring->ctrl.written_bytes - ring->ctrl.read_bytes)
|
||||
#define READ_AVAIL_SPACE(ring) \
|
||||
(ring->ctrl.written_bytes - ring->ctrl.read_bytes)
|
||||
|
||||
enum logger_attributes {
|
||||
ATTR_WIFI_LOGGER_INVALID = 0,
|
||||
|
@ -139,25 +141,25 @@ enum logger_attributes {
|
|||
ATTR_WIFI_LOGGER_MAX = ATTR_WIFI_LOGGER_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
/* Below events refer to the wifi_connectivity_event ring and shall be supported */
|
||||
enum {
|
||||
WIFI_EVENT_ASSOCIATION_REQUESTED = 0,
|
||||
/* Below events refer to the wifi_connectivity_event ring and shall be supported
|
||||
*/
|
||||
enum { WIFI_EVENT_ASSOCIATION_REQUESTED = 0,
|
||||
WIFI_EVENT_AUTH_COMPLETE,
|
||||
WIFI_EVENT_ASSOC_COMPLETE,
|
||||
};
|
||||
|
||||
enum {
|
||||
RING_BUFFER_ENTRY_FLAGS_HAS_BINARY = (1 << (0)), // set for binary entries
|
||||
RING_BUFFER_ENTRY_FLAGS_HAS_TIMESTAMP = (1 << (1)) // set if 64 bits timestamp is present
|
||||
/* set for binary entries */
|
||||
RING_BUFFER_ENTRY_FLAGS_HAS_BINARY = (1 << (0)),
|
||||
/* set if 64 bits timestamp is present */
|
||||
RING_BUFFER_ENTRY_FLAGS_HAS_TIMESTAMP = (1 << (1))
|
||||
};
|
||||
|
||||
enum {
|
||||
ENTRY_TYPE_CONNECT_EVENT = 1,
|
||||
enum { ENTRY_TYPE_CONNECT_EVENT = 1,
|
||||
ENTRY_TYPE_PKT,
|
||||
ENTRY_TYPE_WAKE_LOCK,
|
||||
ENTRY_TYPE_POWER_EVENT,
|
||||
ENTRY_TYPE_DATA
|
||||
};
|
||||
ENTRY_TYPE_DATA };
|
||||
|
||||
/** WiFi ring buffer entry structure */
|
||||
typedef struct {
|
||||
|
@ -207,11 +209,11 @@ typedef struct {
|
|||
u16 event;
|
||||
/** TLV log structure array */
|
||||
tlv_log tlvs[];
|
||||
/** separate parameter structure per event to be provided and optional data
|
||||
* the event_data is expected to include an official android part, with some
|
||||
* parameter as transmit rate, num retries, num scan result found etc...
|
||||
* as well, event_data can include a vendor proprietary part which is
|
||||
* understood by the developer only
|
||||
/** separate parameter structure per event to be provided and optional
|
||||
* data the event_data is expected to include an official android part,
|
||||
* with some parameter as transmit rate, num retries, num scan result
|
||||
* found etc... as well, event_data can include a vendor proprietary
|
||||
* part which is understood by the developer only
|
||||
*/
|
||||
} __attribute__((packed)) wifi_ring_buffer_driver_connectivity_event;
|
||||
|
||||
|
@ -264,21 +266,25 @@ typedef enum {
|
|||
/** Queued within firmware, but not yet sent over air. */
|
||||
TX_PKT_FATE_FW_QUEUED,
|
||||
|
||||
/** Dropped by firmware as invalid. E.g. bad source address, bad checksum, or invalid for current
|
||||
state. */
|
||||
/** Dropped by firmware as invalid. E.g. bad source address, bad
|
||||
* checksum, or invalid for current state.
|
||||
*/
|
||||
TX_PKT_FATE_FW_DROP_INVALID,
|
||||
|
||||
/** Dropped by firmware due to lack of buffer space. */
|
||||
TX_PKT_FATE_FW_DROP_NOBUFS,
|
||||
|
||||
/** Dropped by firmware for any other reason. Includes frames that were sent by driver to firmware, but
|
||||
unaccounted for by firmware. */
|
||||
/** Dropped by firmware for any other reason. Includes frames that were
|
||||
* sent by driver to firmware, but unaccounted for by firmware.
|
||||
*/
|
||||
TX_PKT_FATE_FW_DROP_OTHER,
|
||||
|
||||
/** Queued within driver, not yet sent to firmware. */
|
||||
TX_PKT_FATE_DRV_QUEUED,
|
||||
|
||||
/** Dropped by driver as invalid. E.g. bad source address, or invalid for current state. */
|
||||
/** Dropped by driver as invalid. E.g. bad source address, or invalid
|
||||
* for current state.
|
||||
*/
|
||||
TX_PKT_FATE_DRV_DROP_INVALID,
|
||||
|
||||
/** Dropped by driver due to lack of buffer space. */
|
||||
|
@ -299,7 +305,9 @@ typedef enum {
|
|||
/** Dropped by firmware due to host-programmable filters. */
|
||||
RX_PKT_FATE_FW_DROP_FILTER,
|
||||
|
||||
/** Dropped by firmware as invalid. E.g. bad checksum, decrypt failed, or invalid for current state. */
|
||||
/** Dropped by firmware as invalid. E.g. bad checksum, decrypt failed,
|
||||
* or invalid for current state.
|
||||
*/
|
||||
RX_PKT_FATE_FW_DROP_INVALID,
|
||||
|
||||
/** Dropped by firmware due to lack of buffer space. */
|
||||
|
@ -314,7 +322,8 @@ typedef enum {
|
|||
/** Dropped by driver due to filter rules. */
|
||||
RX_PKT_FATE_DRV_DROP_FILTER,
|
||||
|
||||
/** Dropped by driver as invalid. E.g. not permitted in current state. */
|
||||
/** Dropped by driver as invalid. E.g. not permitted in current state.
|
||||
*/
|
||||
RX_PKT_FATE_DRV_DROP_INVALID,
|
||||
|
||||
/** Dropped by driver due to lack of buffer space. */
|
||||
|
@ -382,7 +391,9 @@ int woal_packet_fate_monitor(moal_private *priv,
|
|||
/* Age since filter installed in seconds. */
|
||||
#define MEM_OFFSET_FILTER_AGE 15
|
||||
|
||||
/* Leave 0 opcode unused as it's a good indicator of accidental incorrect execution (e.g. data). */
|
||||
/* Leave 0 opcode unused as it's a good indicator of accidental incorrect
|
||||
* execution (e.g. data).
|
||||
*/
|
||||
/* Load 1 byte from immediate offset, e.g. "ldb R0, [5]" */
|
||||
#define NXP_LDB_OPCODE 1
|
||||
/* Load 2 bytes from immediate offset, e.g. "ldh R0, [5]" */
|
||||
|
@ -425,13 +436,16 @@ int woal_packet_fate_monitor(moal_private *priv,
|
|||
#define NXP_JNEBS_OPCODE 20
|
||||
/* Immediate value is one of *_EXT_OPCODE
|
||||
* Extended opcodes. These all have an opcode of EXT_OPCODE
|
||||
* and specify the actual opcode in the immediate field.*/
|
||||
* and specify the actual opcode in the immediate field.
|
||||
*/
|
||||
#define NXP_EXT_OPCODE 21
|
||||
/* Load from memory, e.g. "ldm R0,5"
|
||||
* Values 0-15 represent loading the different memory slots. */
|
||||
* Values 0-15 represent loading the different memory slots.
|
||||
*/
|
||||
#define NXP_LDM_EXT_OPCODE 0
|
||||
/* Store to memory, e.g. "stm R0,5" *
|
||||
* Values 16-31 represent storing to the different memory slots. */
|
||||
* Values 16-31 represent storing to the different memory slots.
|
||||
*/
|
||||
#define NXP_STM_EXT_OPCODE 16
|
||||
/* Not, e.g. "not R0" */
|
||||
#define NXP_NOT_EXT_OPCODE 32
|
||||
|
@ -460,9 +474,11 @@ int woal_packet_fate_monitor(moal_private *priv,
|
|||
#define PASS_PKT 1
|
||||
/* Return code indicating "packet" should be dropped. */
|
||||
#define DROP_PKT 0
|
||||
/* If "c" is of an unsigned type, generate a compile warning that gets promoted to an error.
|
||||
* This makes bounds checking simpler because ">= 0" can be avoided. Otherwise adding
|
||||
* superfluous ">= 0" with unsigned expressions generates compile warnings. */
|
||||
/* If "c" is of an unsigned type, generate a compile warning that gets promoted
|
||||
* to an error. This makes bounds checking simpler because ">= 0" can be
|
||||
* avoided. Otherwise adding superfluous ">= 0" with unsigned expressions
|
||||
* generates compile warnings.
|
||||
*/
|
||||
#define ENFORCE_UNSIGNED(c) ((c) == (uint32_t)(c))
|
||||
/** =========== Define Copied from apf_interpreter.c END =========== */
|
||||
|
||||
|
@ -470,8 +486,7 @@ int woal_packet_fate_monitor(moal_private *priv,
|
|||
#define APF_FRAME_HEADER_SIZE 14
|
||||
#define PACKET_FILTER_MAX_LEN 1024
|
||||
|
||||
enum {
|
||||
PACKET_FILTER_STATE_INIT = 0,
|
||||
enum { PACKET_FILTER_STATE_INIT = 0,
|
||||
PACKET_FILTER_STATE_STOP,
|
||||
PACKET_FILTER_STATE_START,
|
||||
};
|
||||
|
@ -507,9 +522,8 @@ int woal_deinit_wifi_hal(moal_private *priv);
|
|||
#define VENDOR_SUBCMD_OVERHEAD ATTRIBUTE_U32_LEN
|
||||
#define VENDOR_DATA_OVERHEAD (nla_total_size(NLA_HDRLEN))
|
||||
|
||||
#define VENDOR_REPLY_OVERHEAD (VENDOR_ID_OVERHEAD + \
|
||||
VENDOR_SUBCMD_OVERHEAD + \
|
||||
VENDOR_DATA_OVERHEAD)
|
||||
#define VENDOR_REPLY_OVERHEAD \
|
||||
(VENDOR_ID_OVERHEAD + VENDOR_SUBCMD_OVERHEAD + VENDOR_DATA_OVERHEAD)
|
||||
|
||||
/* Features Enums*/
|
||||
#define WLAN_FEATURE_INFRA 0x0001 // Basic infrastructure mode support
|
||||
|
@ -528,16 +542,19 @@ int woal_deinit_wifi_hal(moal_private *priv);
|
|||
#define WLAN_FEATURE_TDLS_OFFCHANNEL 0x2000 // TDLS off channel support
|
||||
#define WLAN_FEATURE_EPR 0x4000 // Enhanced power reporting support
|
||||
#define WLAN_FEATURE_AP_STA 0x8000 // AP STA Concurrency support
|
||||
#define WLAN_FEATURE_LINK_LAYER_STATS 0x10000 // Link layer stats collection support
|
||||
#define WLAN_FEATURE_LINK_LAYER_STATS \
|
||||
0x10000 // Link layer stats collection support
|
||||
#define WLAN_FEATURE_LOGGER 0x20000 // WiFi Logger support
|
||||
#define WLAN_FEATURE_HAL_EPNO 0x40000 // WiFi enhanced PNO support
|
||||
#define WLAN_FEATURE_RSSI_MONITOR 0x80000 // RSSI Monitor support
|
||||
#define WLAN_FEATURE_MKEEP_ALIVE 0x100000 // WiFi mkeep_alive support
|
||||
#define WLAN_FEATURE_CONFIG_NDO 0x200000 // ND offload configure support
|
||||
#define WLAN_FEATURE_TX_TRANSMIT_POWER 0x400000 // Capture Tx transmit power levels
|
||||
#define WLAN_FEATURE_TX_TRANSMIT_POWER \
|
||||
0x400000 // Capture Tx transmit power levels
|
||||
#define WLAN_FEATURE_CONTROL_ROAMING 0x800000 // Enable/Disable firmware roaming
|
||||
#define WLAN_FEATURE_IE_WHITELIST 0x1000000 // Probe IE white listing support
|
||||
#define WLAN_FEATURE_SCAN_RAND 0x2000000 // MAC & Probe Sequence Number randomization Support
|
||||
#define WLAN_FEATURE_SCAN_RAND \
|
||||
0x2000000 // MAC & Probe Sequence Number randomization Support
|
||||
// Add more features here
|
||||
|
||||
#define MAX_CHANNEL_NUM 200
|
||||
|
@ -680,8 +697,8 @@ enum vendor_sub_command {
|
|||
};
|
||||
|
||||
void woal_register_cfg80211_vendor_command(struct wiphy *wiphy);
|
||||
int woal_cfg80211_vendor_event(IN moal_private *priv,
|
||||
IN int event, IN t_u8 *data, IN int len);
|
||||
int woal_cfg80211_vendor_event(IN moal_private *priv, IN int event,
|
||||
IN t_u8 *data, IN int len);
|
||||
|
||||
enum mrvl_wlan_vendor_attr {
|
||||
MRVL_WLAN_VENDOR_ATTR_INVALID = 0,
|
||||
|
|
|
@ -446,8 +446,7 @@ static struct debug_data uap_items[] = {
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_hist_do_reset(moal_private *priv, void *data)
|
||||
void woal_hist_do_reset(moal_private *priv, void *data)
|
||||
{
|
||||
hgm_data *phist_data = (hgm_data *)data;
|
||||
int ix;
|
||||
|
@ -473,14 +472,12 @@ woal_hist_do_reset(moal_private *priv, void *data)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_hist_data_reset(moal_private *priv)
|
||||
void woal_hist_data_reset(moal_private *priv)
|
||||
{
|
||||
int i = 0;
|
||||
for (i = 0; i < priv->phandle->card_info->histogram_table_num; i++)
|
||||
woal_hist_do_reset(priv, priv->hist_data[i]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function reset histogram data according to antenna
|
||||
*
|
||||
|
@ -488,8 +485,7 @@ woal_hist_data_reset(moal_private *priv)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_hist_reset_table(moal_private *priv, t_u8 antenna)
|
||||
void woal_hist_reset_table(moal_private *priv, t_u8 antenna)
|
||||
{
|
||||
hgm_data *phist_data = priv->hist_data[antenna];
|
||||
|
||||
|
@ -511,9 +507,8 @@ woal_hist_reset_table(moal_private *priv, t_u8 antenna)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
woal_hist_data_set(moal_private *priv, t_u16 rx_rate, t_s8 snr, t_s8 nflr,
|
||||
t_u8 antenna)
|
||||
static void woal_hist_data_set(moal_private *priv, t_u16 rx_rate, t_s8 snr,
|
||||
t_s8 nflr, t_u8 antenna)
|
||||
{
|
||||
hgm_data *phist_data = priv->hist_data[antenna];
|
||||
t_s8 nf = CAL_NF(nflr);
|
||||
|
@ -537,8 +532,7 @@ woal_hist_data_set(moal_private *priv, t_u16 rx_rate, t_s8 snr, t_s8 nflr,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_hist_data_add(moal_private *priv, t_u16 rx_rate, t_s8 snr, t_s8 nflr,
|
||||
void woal_hist_data_add(moal_private *priv, t_u16 rx_rate, t_s8 snr, t_s8 nflr,
|
||||
t_u8 antenna)
|
||||
{
|
||||
hgm_data *phist_data = NULL;
|
||||
|
@ -552,7 +546,6 @@ woal_hist_data_add(moal_private *priv, t_u16 rx_rate, t_s8 snr, t_s8 nflr,
|
|||
woal_hist_reset_table(priv, antenna);
|
||||
woal_hist_data_set(priv, rx_rate, snr, nflr, antenna);
|
||||
}
|
||||
|
||||
#define MAX_MCS_NUM_SUPP 16
|
||||
#define MAX_MCS_NUM_AC 10
|
||||
#define MAX_MCS_NUM_AX 12
|
||||
|
@ -565,8 +558,7 @@ woal_hist_data_add(moal_private *priv, t_u16 rx_rate, t_s8 snr, t_s8 nflr,
|
|||
*
|
||||
* @return Number of output data or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static int
|
||||
woal_histogram_info(struct seq_file *sfp, void *data)
|
||||
static int woal_histogram_info(struct seq_file *sfp, void *data)
|
||||
{
|
||||
hgm_data *phist_data = (hgm_data *)data;
|
||||
int i = 0;
|
||||
|
@ -591,39 +583,56 @@ woal_histogram_info(struct seq_file *sfp, void *data)
|
|||
seq_printf(sfp, "rx rates (in Mbps):\n");
|
||||
seq_printf(sfp, "\t0-3: B-MCS 0-3\n");
|
||||
seq_printf(sfp, "\t4-11: G-MCS 0-7\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t12-27: N-MCS 0-15(BW20) 28-43: N-MCS 0-15(BW40)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t44-59: N-MCS 0-15(BW20:SGI) 60-75: N-MCS 0-15(BW40:SGI)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t76-85: AC-MCS 0-9(VHT:BW20:NSS1) 86-95: AC-MCS 0-9(VHT:BW20:NSS2)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t96-105: AC-MCS 0-9(VHT:BW40:NSS1) 106-115: AC-MCS 0-9(VHT:BW40:NSS2)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t116-125: AC-MCS 0-9(VHT:BW80:NSS1) 126-135: AC-MCS 0-9(VHT:BW80:NSS2)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t136-145: AC-MCS 0-9(VHT:BW20:NSS1:SGI) 146-155: AC-MCS 0-9(VHT:BW20:NSS2:SGI)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t156-165: AC-MCS 0-9(VHT:BW40:NSS1:SGI) 166-175: AC-MCS 0-9(VHT:BW40:NSS2:SGI)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t176-185: AC-MCS 0-9(VHT:BW80:NSS1:SGI) 186-195: AC-MCS 0-9(VHT:BW80:NSS2:SGI)\n\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t196-207: AX-MCS 0-11(BW20:NSS1) 208-219: AX-MCS 0-11(BW20:NSS2)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t220-231: AX-MCS 0-11(BW40:NSS1) 232-243: AX-MCS 0-11(BW40:NSS2)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t244-255: AX-MCS 0-11(BW80:NSS1) 256-267: AX-MCS 0-11(BW80:NSS2)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t268-279: AX-MCS 0-11(BW20:NSS1:GI1) 280-291: AX-MCS 0-11(BW20:NSS2:GI1)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t292-303: AX-MCS 0-11(BW40:NSS1:GI1) 304-315: AX-MCS 0-11(BW40:NSS2:GI1)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t316-327: AX-MCS 0-11(BW80:NSS1:GI1) 328-339: AX-MCS 0-11(BW80:NSS2:GI1)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t340-351: AX-MCS 0-11(BW20:NSS1:GI2) 352-363: AX-MCS 0-11(BW20:NSS2:GI2)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t364-375: AX-MCS 0-11(BW40:NSS1:GI2) 376-387: AX-MCS 0-11(BW40:NSS2:GI2)\n");
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t388-399: AX-MCS 0-11(BW80:NSS1:GI2) 400-411: AX-MCS 0-11(BW80:NSS2:GI2)\n");
|
||||
|
||||
for (i = 0; i < rx_rate_max_size; i++) {
|
||||
|
@ -633,30 +642,46 @@ woal_histogram_info(struct seq_file *sfp, void *data)
|
|||
seq_printf(sfp, "rx_rate[%03d] = %d\n", i,
|
||||
value);
|
||||
else if (i <= 75) {
|
||||
sgi_enable = (i - 12) / (MAX_MCS_NUM_SUPP * 2); //0:LGI, 1:SGI
|
||||
bw = ((i - 12) % (MAX_MCS_NUM_SUPP * 2)) / MAX_MCS_NUM_SUPP; //0:20MHz, 1:40MHz
|
||||
sgi_enable = (i - 12) /
|
||||
(MAX_MCS_NUM_SUPP * 2); // 0:LGI,
|
||||
// 1:SGI
|
||||
bw = ((i - 12) % (MAX_MCS_NUM_SUPP * 2)) /
|
||||
MAX_MCS_NUM_SUPP; // 0:20MHz, 1:40MHz
|
||||
mcs_index = (i - 12) % MAX_MCS_NUM_SUPP;
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"rx_rate[%03d] = %d (MCS:%d HT BW:%dMHz%s)\n",
|
||||
i, value, mcs_index, (1 << bw) * 20,
|
||||
sgi_enable ? " SGI" : "");
|
||||
} else if (i <= 195) {
|
||||
sgi_enable = (i - 76) / (MAX_MCS_NUM_AC * 6); //0:LGI, 1:SGI
|
||||
bw = ((i - 76) % (MAX_MCS_NUM_AC * 6)) / (MAX_MCS_NUM_AC * 2); //0:20MHz, 1:40MHz, 2:80MHz
|
||||
nss = (((i - 76) % (MAX_MCS_NUM_AC * 6)) % (MAX_MCS_NUM_AC * 2)) / MAX_MCS_NUM_AC; //0:NSS1, 1:NSS2
|
||||
sgi_enable = (i - 76) /
|
||||
(MAX_MCS_NUM_AC * 6); // 0:LGI,
|
||||
// 1:SGI
|
||||
bw = ((i - 76) % (MAX_MCS_NUM_AC * 6)) /
|
||||
(MAX_MCS_NUM_AC * 2); // 0:20MHz, 1:40MHz,
|
||||
// 2:80MHz
|
||||
nss = (((i - 76) % (MAX_MCS_NUM_AC * 6)) %
|
||||
(MAX_MCS_NUM_AC * 2)) /
|
||||
MAX_MCS_NUM_AC; // 0:NSS1, 1:NSS2
|
||||
mcs_index = (i - 76) % MAX_MCS_NUM_AC;
|
||||
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"rx_rate[%03d] = %d (MCS:%d VHT BW:%dMHz NSS:%d%s)\n",
|
||||
i, value, mcs_index, (1 << bw) * 20,
|
||||
nss + 1, sgi_enable ? " SGI" : "");
|
||||
} else if (i <= 411) {
|
||||
gi = (i - 196) / (MAX_MCS_NUM_AX * 6); // 0,1,2
|
||||
bw = ((i - 196) % (MAX_MCS_NUM_AX * 6)) / (MAX_MCS_NUM_AX * 2); //0:20MHz, 1:40MHz, 2:80MHz
|
||||
nss = (((i - 196) % (MAX_MCS_NUM_AX * 6)) % (MAX_MCS_NUM_AX * 2)) / MAX_MCS_NUM_AX; //0:NSS1, 1:NSS2
|
||||
bw = ((i - 196) % (MAX_MCS_NUM_AX * 6)) /
|
||||
(MAX_MCS_NUM_AX * 2); // 0:20MHz, 1:40MHz,
|
||||
// 2:80MHz
|
||||
nss = (((i - 196) % (MAX_MCS_NUM_AX * 6)) %
|
||||
(MAX_MCS_NUM_AX * 2)) /
|
||||
MAX_MCS_NUM_AX; // 0:NSS1, 1:NSS2
|
||||
mcs_index = (i - 196) % MAX_MCS_NUM_AX;
|
||||
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"rx_rate[%03d] = %d (MCS:%d AX BW:%dMHz NSS:%d GI:%d)\n",
|
||||
i, value, mcs_index, (1 << bw) * 20,
|
||||
nss + 1, gi);
|
||||
|
@ -695,8 +720,7 @@ woal_histogram_info(struct seq_file *sfp, void *data)
|
|||
*
|
||||
* @return Number of output data or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static int
|
||||
woal_histogram_read(struct seq_file *sfp, void *data)
|
||||
static int woal_histogram_read(struct seq_file *sfp, void *data)
|
||||
{
|
||||
wlan_hist_proc_data *hist_data = (wlan_hist_proc_data *)sfp->private;
|
||||
moal_private *priv = (moal_private *)hist_data->priv;
|
||||
|
@ -707,10 +731,6 @@ woal_histogram_read(struct seq_file *sfp, void *data)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (!priv->hist_data) {
|
||||
LEAVE();
|
||||
return -EFAULT;
|
||||
}
|
||||
if (hist_data->ant_idx < priv->phandle->card_info->histogram_table_num)
|
||||
woal_histogram_info(sfp, priv->hist_data[hist_data->ant_idx]);
|
||||
|
||||
|
@ -718,8 +738,7 @@ woal_histogram_read(struct seq_file *sfp, void *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
woal_histogram_proc_open(struct inode *inode, struct file *file)
|
||||
static int woal_histogram_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_histogram_read, PDE_DATA(inode));
|
||||
|
@ -738,9 +757,8 @@ woal_histogram_proc_open(struct inode *inode, struct file *file)
|
|||
*
|
||||
* @return number of data
|
||||
*/
|
||||
static ssize_t
|
||||
woal_histogram_write(struct file *f, const char __user * buf, size_t count,
|
||||
loff_t * off)
|
||||
static ssize_t woal_histogram_write(struct file *f, const char __user *buf,
|
||||
size_t count, loff_t *off)
|
||||
{
|
||||
struct seq_file *sfp = f->private_data;
|
||||
wlan_hist_proc_data *hist_data = (wlan_hist_proc_data *)sfp->private;
|
||||
|
@ -757,8 +775,7 @@ woal_histogram_write(struct file *f, const char __user * buf, size_t count,
|
|||
*
|
||||
* @return Number of output data or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static int
|
||||
woal_log_read(struct seq_file *sfp, void *data)
|
||||
static int woal_log_read(struct seq_file *sfp, void *data)
|
||||
{
|
||||
moal_private *priv = (moal_private *)sfp->private;
|
||||
mlan_ds_get_stats stats;
|
||||
|
@ -868,7 +885,8 @@ woal_log_read(struct seq_file *sfp, void *data)
|
|||
for (i = 0; i < 8; i++) {
|
||||
seq_printf(sfp, "%u ", stats.qos_retries_rx_cnt[i]);
|
||||
}
|
||||
seq_printf(sfp, "\ndot11RSNAStatsCMACICVErrors = %u\n"
|
||||
seq_printf(sfp,
|
||||
"\ndot11RSNAStatsCMACICVErrors = %u\n"
|
||||
"dot11RSNAStatsCMACReplays = %u\n"
|
||||
"dot11RSNAStatsRobustMgmtCCMPReplays = %u\n"
|
||||
"dot11RSNAStatsTKIPICVErrors = %u\n"
|
||||
|
@ -890,29 +908,20 @@ woal_log_read(struct seq_file *sfp, void *data)
|
|||
"dot11MPDUInReceivedAMPDUCount = %u\n"
|
||||
"dot11ReceivedOctetsInAMPDUCount = %llu\n"
|
||||
"dot11AMPDUDelimiterCRCErrorCount = %u\n",
|
||||
stats.cmacicv_errors,
|
||||
stats.cmac_replays,
|
||||
stats.mgmt_ccmp_replays,
|
||||
stats.tkipicv_errors,
|
||||
stats.tkip_replays,
|
||||
stats.ccmp_decrypt_errors,
|
||||
stats.ccmp_replays,
|
||||
stats.tx_amsdu_cnt,
|
||||
stats.failed_amsdu_cnt,
|
||||
stats.retry_amsdu_cnt,
|
||||
stats.cmacicv_errors, stats.cmac_replays,
|
||||
stats.mgmt_ccmp_replays, stats.tkipicv_errors,
|
||||
stats.tkip_replays, stats.ccmp_decrypt_errors,
|
||||
stats.ccmp_replays, stats.tx_amsdu_cnt,
|
||||
stats.failed_amsdu_cnt, stats.retry_amsdu_cnt,
|
||||
stats.multi_retry_amsdu_cnt,
|
||||
stats.tx_octets_in_amsdu_cnt,
|
||||
stats.amsdu_ack_failure_cnt,
|
||||
stats.rx_amsdu_cnt,
|
||||
stats.rx_octets_in_amsdu_cnt,
|
||||
stats.tx_ampdu_cnt,
|
||||
stats.amsdu_ack_failure_cnt, stats.rx_amsdu_cnt,
|
||||
stats.rx_octets_in_amsdu_cnt, stats.tx_ampdu_cnt,
|
||||
stats.tx_mpdus_in_ampdu_cnt,
|
||||
stats.tx_octets_in_ampdu_cnt,
|
||||
stats.ampdu_rx_cnt,
|
||||
stats.tx_octets_in_ampdu_cnt, stats.ampdu_rx_cnt,
|
||||
stats.mpdu_in_rx_ampdu_cnt,
|
||||
stats.rx_octets_in_ampdu_cnt,
|
||||
stats.ampdu_delimiter_crc_error_cnt);
|
||||
|
||||
}
|
||||
|
||||
MODULE_PUT;
|
||||
|
@ -928,8 +937,7 @@ woal_log_read(struct seq_file *sfp, void *data)
|
|||
*
|
||||
* @return number of data
|
||||
*/
|
||||
static int
|
||||
woal_log_proc_open(struct inode *inode, struct file *file)
|
||||
static int woal_log_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_log_read, PDE_DATA(inode));
|
||||
|
@ -949,8 +957,7 @@ woal_log_proc_open(struct inode *inode, struct file *file)
|
|||
*
|
||||
* @return Number of output data or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static int
|
||||
woal_debug_read(struct seq_file *sfp, void *data)
|
||||
static int woal_debug_read(struct seq_file *sfp, void *data)
|
||||
{
|
||||
int val = 0;
|
||||
unsigned int i;
|
||||
|
@ -959,7 +966,7 @@ woal_debug_read(struct seq_file *sfp, void *data)
|
|||
(struct debug_data_priv *)sfp->private;
|
||||
struct debug_data *d = items_priv->items;
|
||||
moal_private *priv = items_priv->priv;
|
||||
mlan_debug_info *info = &(priv->phandle->debug_info);
|
||||
mlan_debug_info *info = NULL;
|
||||
t_u32 intf_mask = INTF_MASK << 8;
|
||||
#ifdef SDIO
|
||||
unsigned int j;
|
||||
|
@ -973,6 +980,8 @@ woal_debug_read(struct seq_file *sfp, void *data)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
info = &(priv->phandle->debug_info);
|
||||
|
||||
if (MODULE_GET == 0) {
|
||||
LEAVE();
|
||||
return -EFAULT;
|
||||
|
@ -984,10 +993,11 @@ woal_debug_read(struct seq_file *sfp, void *data)
|
|||
goto exit;
|
||||
|
||||
for (i = 0; i < (unsigned int)items_priv->num_of_items; i++) {
|
||||
/* If this item is interface specific but card interface is NOT correspond type, we will not count it. */
|
||||
/* If this item is interface specific but card interface is NOT
|
||||
* correspond type, we will not count it. */
|
||||
if ((d[i].attr & intf_mask) &&
|
||||
!((d[i].attr & intf_mask) & (priv->phandle->
|
||||
card_type & intf_mask)))
|
||||
!((d[i].attr & intf_mask) &
|
||||
(priv->phandle->card_type & intf_mask)))
|
||||
continue;
|
||||
|
||||
if (d[i].size == 1)
|
||||
|
@ -1006,8 +1016,7 @@ woal_debug_read(struct seq_file *sfp, void *data)
|
|||
seq_printf(sfp, "\n");
|
||||
continue;
|
||||
}
|
||||
if (strstr(d[i].name, "id")
|
||||
|| strstr(d[i].name, "bitmap")
|
||||
if (strstr(d[i].name, "id") || strstr(d[i].name, "bitmap")
|
||||
#ifdef PCIE
|
||||
|| strstr(d[i].name, "ptr")
|
||||
#endif
|
||||
|
@ -1022,7 +1031,8 @@ woal_debug_read(struct seq_file *sfp, void *data)
|
|||
seq_printf(sfp, "last_recv_wr_bitmap=0x%x last_mp_index=%d\n",
|
||||
info->last_recv_wr_bitmap, info->last_mp_index);
|
||||
for (i = 0; i < SDIO_MP_DBG_NUM; i++) {
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"mp_wr_bitmap: 0x%x mp_wr_ports=0x%x len=%d curr_wr_port=0x%x\n",
|
||||
info->last_mp_wr_bitmap[i],
|
||||
info->last_mp_wr_ports[i],
|
||||
|
@ -1030,9 +1040,8 @@ woal_debug_read(struct seq_file *sfp, void *data)
|
|||
info->last_curr_wr_port[i]);
|
||||
for (j = 0; j < mp_aggr_pkt_limit; j++) {
|
||||
seq_printf(sfp, "0x%02x ",
|
||||
info->last_mp_wr_info[i *
|
||||
mp_aggr_pkt_limit
|
||||
+ j]);
|
||||
info->last_mp_wr_info
|
||||
[i * mp_aggr_pkt_limit + j]);
|
||||
}
|
||||
seq_printf(sfp, "\n");
|
||||
}
|
||||
|
@ -1072,12 +1081,13 @@ woal_debug_read(struct seq_file *sfp, void *data)
|
|||
if (info->tx_tbl_num) {
|
||||
seq_printf(sfp, "Tx BA stream table:\n");
|
||||
for (i = 0; i < info->tx_tbl_num; i++) {
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"tid = %d, ra = %02x:%02x:%02x:%02x:%02x:%02x amsdu=%d\n",
|
||||
(int)info->tx_tbl[i].tid,
|
||||
info->tx_tbl[i].ra[0], info->tx_tbl[i].ra[1],
|
||||
info->tx_tbl[i].ra[2], info->tx_tbl[i].ra[3],
|
||||
info->tx_tbl[i].ra[4], info->tx_tbl[i].ra[5],
|
||||
(int)info->tx_tbl[i].tid, info->tx_tbl[i].ra[0],
|
||||
info->tx_tbl[i].ra[1], info->tx_tbl[i].ra[2],
|
||||
info->tx_tbl[i].ra[3], info->tx_tbl[i].ra[4],
|
||||
info->tx_tbl[i].ra[5],
|
||||
(int)info->tx_tbl[i].amsdu);
|
||||
}
|
||||
}
|
||||
|
@ -1086,13 +1096,14 @@ woal_debug_read(struct seq_file *sfp, void *data)
|
|||
for (i = 0; i < info->rx_tbl_num; i++) {
|
||||
unsigned int j;
|
||||
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"tid = %d, ta = %02x:%02x:%02x:%02x:%02x:%02x, start_win = %d, "
|
||||
"win_size = %d, amsdu=%d\n",
|
||||
(int)info->rx_tbl[i].tid,
|
||||
info->rx_tbl[i].ta[0], info->rx_tbl[i].ta[1],
|
||||
info->rx_tbl[i].ta[2], info->rx_tbl[i].ta[3],
|
||||
info->rx_tbl[i].ta[4], info->rx_tbl[i].ta[5],
|
||||
(int)info->rx_tbl[i].tid, info->rx_tbl[i].ta[0],
|
||||
info->rx_tbl[i].ta[1], info->rx_tbl[i].ta[2],
|
||||
info->rx_tbl[i].ta[3], info->rx_tbl[i].ta[4],
|
||||
info->rx_tbl[i].ta[5],
|
||||
(int)info->rx_tbl[i].start_win,
|
||||
(int)info->rx_tbl[i].win_size,
|
||||
(int)info->rx_tbl[i].amsdu);
|
||||
|
@ -1107,7 +1118,8 @@ woal_debug_read(struct seq_file *sfp, void *data)
|
|||
}
|
||||
}
|
||||
for (i = 0; i < info->ralist_num; i++) {
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"ralist ra: %02x:%02x:%02x:%02x:%02x:%02x tid=%d pkts=%d pause=%d\n",
|
||||
info->ralist[i].ra[0], info->ralist[i].ra[1],
|
||||
info->ralist[i].ra[2], info->ralist[i].ra[3],
|
||||
|
@ -1132,9 +1144,8 @@ exit:
|
|||
*
|
||||
* @return number of data
|
||||
*/
|
||||
static ssize_t
|
||||
woal_debug_write(struct file *f, const char __user * buf, size_t count,
|
||||
loff_t * off)
|
||||
static ssize_t woal_debug_write(struct file *f, const char __user *buf,
|
||||
size_t count, loff_t *off)
|
||||
{
|
||||
int r, i;
|
||||
char *pdata;
|
||||
|
@ -1174,6 +1185,7 @@ woal_debug_write(struct file *f, const char __user * buf, size_t count,
|
|||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
pdata[count] = '\0';
|
||||
|
||||
if (woal_get_debug_info(priv, MOAL_IOCTL_WAIT, info)) {
|
||||
kfree(pdata);
|
||||
|
@ -1218,8 +1230,7 @@ woal_debug_write(struct file *f, const char __user * buf, size_t count,
|
|||
return count;
|
||||
}
|
||||
|
||||
static int
|
||||
woal_debug_proc_open(struct inode *inode, struct file *file)
|
||||
static int woal_debug_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_debug_read, PDE_DATA(inode));
|
||||
|
@ -1264,8 +1275,7 @@ static const struct file_operations log_proc_fops = {
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_debug_entry(moal_private *priv)
|
||||
void woal_debug_entry(moal_private *priv)
|
||||
{
|
||||
struct proc_dir_entry *r;
|
||||
int i;
|
||||
|
@ -1278,6 +1288,7 @@ woal_debug_entry(moal_private *priv)
|
|||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) {
|
||||
priv->items_priv.items = kmalloc(sizeof(items), GFP_KERNEL);
|
||||
|
@ -1403,8 +1414,7 @@ woal_debug_entry(moal_private *priv)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_debug_remove(moal_private *priv)
|
||||
void woal_debug_remove(moal_private *priv)
|
||||
{
|
||||
char hist_entry[50];
|
||||
int i;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -213,6 +213,7 @@ typedef struct _chan_stats {
|
|||
#endif
|
||||
#define PRIV_CMD_SLEEP_PARAMS "sleepparams"
|
||||
#define PRIV_CMD_DFS_TESTING "dfstesting"
|
||||
#define PRIV_CMD_DFS53_CFG "dfs53cfg"
|
||||
#define PRIV_CMD_CFP_CODE "cfpcode"
|
||||
#define PRIV_CMD_CWMODE "cwmode"
|
||||
#define PRIV_CMD_ANT_CFG "antcfg"
|
||||
|
@ -331,7 +332,8 @@ typedef struct _ssu_params_cfg {
|
|||
t_u32 spec_pwr_enable;
|
||||
/* 0-1: Enable spectral packet rate reduction in DB output format */
|
||||
t_u32 rate_deduction;
|
||||
/* 0-7: Number of spectral packets over which spectral data is to be averaged. */
|
||||
/* 0-7: Number of spectral packets over which spectral data is to be
|
||||
* averaged. */
|
||||
t_u32 n_pkt_avg;
|
||||
} __attribute__((packed)) ssu_params_cfg;
|
||||
#endif
|
||||
|
@ -342,6 +344,10 @@ typedef struct _ssu_params_cfg {
|
|||
#define PRIV_CMD_11AXCFG "11axcfg"
|
||||
/** Private command: 11AX Cmd */
|
||||
#define PRIV_CMD_11AXCMDCFG "11axcmd"
|
||||
/** Private command: TWT Setup Cfg */
|
||||
#define PRIV_CMD_TWT_SETUP "twt_setup"
|
||||
/** Private command: TWT Teardown Cfg */
|
||||
#define PRIV_CMD_TWT_TEARDOWN "twt_teardown"
|
||||
|
||||
#define PRIV_CMD_LPM "lpm"
|
||||
|
||||
|
@ -363,8 +369,7 @@ typedef struct _android_wifi_priv_cmd {
|
|||
int used_len;
|
||||
/** buffer sent by application */
|
||||
int total_len;
|
||||
} __attribute__ ((packed))
|
||||
android_wifi_priv_cmd;
|
||||
} __attribute__((packed)) android_wifi_priv_cmd;
|
||||
#else
|
||||
typedef struct _android_wifi_priv_cmd {
|
||||
/** Buffer pointer */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -266,20 +266,14 @@ typedef enum _MOAL_HARDWARE_STATUS {
|
|||
#define FW_CAPINFO_80211BGA (MBIT(8) | MBIT(9) | MBIT(10))
|
||||
|
||||
/** moal_wait_option */
|
||||
enum {
|
||||
MOAL_NO_WAIT,
|
||||
MOAL_IOCTL_WAIT,
|
||||
MOAL_IOCTL_WAIT_TIMEOUT
|
||||
};
|
||||
enum { MOAL_NO_WAIT, MOAL_IOCTL_WAIT, MOAL_IOCTL_WAIT_TIMEOUT };
|
||||
|
||||
/** moal_main_state */
|
||||
enum {
|
||||
MOAL_STATE_IDLE,
|
||||
enum { MOAL_STATE_IDLE,
|
||||
MOAL_RECV_INT,
|
||||
MOAL_ENTER_WORK_QUEUE,
|
||||
MOAL_START_MAIN_PROCESS,
|
||||
MOAL_END_MAIN_PROCESS
|
||||
};
|
||||
MOAL_END_MAIN_PROCESS };
|
||||
|
||||
/** HostCmd_Header */
|
||||
typedef struct _HostCmd_Header {
|
||||
|
@ -317,13 +311,11 @@ typedef struct _moal_drv_timer {
|
|||
* @return N/A
|
||||
*/
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
static inline void
|
||||
woal_timer_handler(struct timer_list *t)
|
||||
static inline void woal_timer_handler(struct timer_list *t)
|
||||
{
|
||||
pmoal_drv_timer timer = from_timer(timer, t, tl);
|
||||
#else
|
||||
static inline void
|
||||
woal_timer_handler(unsigned long fcontext)
|
||||
static inline void woal_timer_handler(unsigned long fcontext)
|
||||
{
|
||||
pmoal_drv_timer timer = (pmoal_drv_timer)fcontext;
|
||||
#endif
|
||||
|
@ -348,8 +340,7 @@ woal_timer_handler(unsigned long fcontext)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
woal_initialize_timer(pmoal_drv_timer timer,
|
||||
static inline void woal_initialize_timer(pmoal_drv_timer timer,
|
||||
void (*TimerFunction)(void *context),
|
||||
void *FunctionContext)
|
||||
{
|
||||
|
@ -378,8 +369,8 @@ woal_initialize_timer(pmoal_drv_timer timer,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
woal_mod_timer(pmoal_drv_timer timer, t_u32 millisecondperiod)
|
||||
static inline void woal_mod_timer(pmoal_drv_timer timer,
|
||||
t_u32 millisecondperiod)
|
||||
{
|
||||
timer->time_period = millisecondperiod;
|
||||
mod_timer(&timer->tl, jiffies + (millisecondperiod * HZ) / 1000);
|
||||
|
@ -393,8 +384,7 @@ woal_mod_timer(pmoal_drv_timer timer, t_u32 millisecondperiod)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
woal_cancel_timer(moal_drv_timer *timer)
|
||||
static inline void woal_cancel_timer(moal_drv_timer *timer)
|
||||
{
|
||||
if (timer->timer_is_periodic || in_atomic() || irqs_disabled())
|
||||
del_timer(&timer->tl);
|
||||
|
@ -429,8 +419,7 @@ typedef struct _moal_thread {
|
|||
* @param thr Thread structure
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
woal_activate_thread(moal_thread *thr)
|
||||
static inline void woal_activate_thread(moal_thread *thr)
|
||||
{
|
||||
/** Initialize the wait queue */
|
||||
init_waitqueue_head(&thr->wait_q);
|
||||
|
@ -445,8 +434,7 @@ woal_activate_thread(moal_thread *thr)
|
|||
* @param thr Thread structure
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
woal_deactivate_thread(moal_thread *thr)
|
||||
static inline void woal_deactivate_thread(moal_thread *thr)
|
||||
{
|
||||
/* Reset the pid */
|
||||
thr->pid = 0;
|
||||
|
@ -460,8 +448,8 @@ woal_deactivate_thread(moal_thread *thr)
|
|||
* @param name Thread name
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
woal_create_thread(int (*threadfunc) (void *), moal_thread *thr, char *name)
|
||||
static inline void woal_create_thread(int (*threadfunc)(void *),
|
||||
moal_thread *thr, char *name)
|
||||
{
|
||||
/* Create and run the thread */
|
||||
thr->task = kthread_run(threadfunc, thr, "%s", name);
|
||||
|
@ -477,9 +465,11 @@ woal_create_thread(int (*threadfunc) (void *), moal_thread *thr, char *name)
|
|||
*/
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
|
||||
/** Work_queue work initialization */
|
||||
#define MLAN_INIT_WORK(_work, _fun) INIT_WORK(_work, ((void (*)(void *))_fun), _work)
|
||||
#define MLAN_INIT_WORK(_work, _fun) \
|
||||
INIT_WORK(_work, ((void (*)(void *))_fun), _work)
|
||||
/** Work_queue delayed work initialization */
|
||||
#define MLAN_INIT_DELAYED_WORK(_work, _fun) INIT_WORK(_work, ((void (*)(void *))_fun), _work)
|
||||
#define MLAN_INIT_DELAYED_WORK(_work, _fun) \
|
||||
INIT_WORK(_work, ((void (*)(void *))_fun), _work)
|
||||
/** Work_queue container parameter */
|
||||
#define MLAN_DELAYED_CONTAINER_OF(_ptr, _type, _m) container_of(_ptr, _type, _m)
|
||||
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) */
|
||||
|
@ -488,7 +478,8 @@ woal_create_thread(int (*threadfunc) (void *), moal_thread *thr, char *name)
|
|||
/** Work_queue delayed work initialization */
|
||||
#define MLAN_INIT_DELAYED_WORK INIT_DELAYED_WORK
|
||||
/** Work_queue container parameter */
|
||||
#define MLAN_DELAYED_CONTAINER_OF(_ptr, _type, _m) container_of(_ptr, _type, _m.work)
|
||||
#define MLAN_DELAYED_CONTAINER_OF(_ptr, _type, _m) \
|
||||
container_of(_ptr, _type, _m.work)
|
||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) */
|
||||
|
||||
/**
|
||||
|
@ -498,8 +489,7 @@ woal_create_thread(int (*threadfunc) (void *), moal_thread *thr, char *name)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
woal_sched_timeout(t_u32 millisec)
|
||||
static inline void woal_sched_timeout(t_u32 millisec)
|
||||
{
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
|
||||
|
@ -518,8 +508,7 @@ woal_sched_timeout(t_u32 millisec)
|
|||
#define IN6PTON_NULL 0x20000000 /* first/tail */
|
||||
#define IN6PTON_UNKNOWN 0x40000000
|
||||
|
||||
static inline int
|
||||
xdigit2bin(char c, int delim)
|
||||
static inline int xdigit2bin(char c, int delim)
|
||||
{
|
||||
if (c == delim || c == '\0')
|
||||
return IN6PTON_DELIM;
|
||||
|
@ -538,8 +527,8 @@ xdigit2bin(char c, int delim)
|
|||
return IN6PTON_UNKNOWN;
|
||||
}
|
||||
|
||||
static inline int
|
||||
in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end)
|
||||
static inline int in4_pton(const char *src, int srclen, u8 *dst, int delim,
|
||||
const char **end)
|
||||
{
|
||||
const char *s;
|
||||
u8 *d;
|
||||
|
@ -556,9 +545,7 @@ in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end)
|
|||
while (1) {
|
||||
int c;
|
||||
c = xdigit2bin(srclen > 0 ? *s : '\0', delim);
|
||||
if (!
|
||||
(c &
|
||||
(IN6PTON_DIGIT | IN6PTON_DOT | IN6PTON_DELIM |
|
||||
if (!(c & (IN6PTON_DIGIT | IN6PTON_DOT | IN6PTON_DELIM |
|
||||
IN6PTON_COLON_MASK))) {
|
||||
goto out;
|
||||
}
|
||||
|
@ -721,7 +708,8 @@ typedef enum {
|
|||
UCAST_DATA_MATCHED, // 3. Unicast data matched
|
||||
MASKTABLE_EVENT_MATCHED, // 4. Maskable event matched
|
||||
NON_MASKABLE_EVENT_MATCHED, // 5. Non-maskable event matched
|
||||
NON_MASKABLE_CONDITION_MATCHED, // 6. Non-maskable condition matched (EAPoL rekey)
|
||||
NON_MASKABLE_CONDITION_MATCHED, // 6. Non-maskable condition matched
|
||||
// (EAPoL rekey)
|
||||
MAGIC_PATTERN_MATCHED, // 7. Magic pattern matched
|
||||
CONTROL_FRAME_MATCHED, // 8. Control frame matched
|
||||
MANAGEMENT_FRAME_MATCHED, // 9. Management frame matched
|
||||
|
@ -1594,8 +1582,11 @@ typedef struct _moal_mod_para {
|
|||
int wakelock_timeout;
|
||||
#endif
|
||||
unsigned int dev_cap_mask;
|
||||
#if defined(SD8997) || defined(PCIE8997) || defined(USB8997) || defined(SD8977) || defined(SD8987)\
|
||||
||defined(SD9098) || defined(USB9098)|| defined(PCIE9098) || defined(SD9097) || defined(USB9097)|| defined(PCIE9097)||defined(SD8978)||defined(USB8978)
|
||||
#if defined(SD8997) || defined(PCIE8997) || defined(USB8997) || \
|
||||
defined(SD8977) || defined(SD8987) || defined(SD9098) || \
|
||||
defined(USB9098) || defined(PCIE9098) || defined(SD9097) || \
|
||||
defined(USB9097) || defined(PCIE9097) || defined(SD8978) || \
|
||||
defined(USB8978)
|
||||
int pmic;
|
||||
#endif
|
||||
int antcfg;
|
||||
|
@ -1610,6 +1601,7 @@ typedef struct _moal_mod_para {
|
|||
t_u16 multi_dtim;
|
||||
t_u16 inact_tmo;
|
||||
char *reg_alpha2;
|
||||
int dfs53cfg;
|
||||
} moal_mod_para;
|
||||
|
||||
/** Handle data structure for MOAL */
|
||||
|
@ -1960,8 +1952,7 @@ struct _moal_handle {
|
|||
* @param idx extended flags id
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
moal_extflg_set(moal_handle *handle, enum ext_mod_params idx)
|
||||
static inline void moal_extflg_set(moal_handle *handle, enum ext_mod_params idx)
|
||||
{
|
||||
t_u8 *ext_fbyte;
|
||||
ext_fbyte = &handle->params.ext_flgs[idx / 8];
|
||||
|
@ -1975,8 +1966,8 @@ moal_extflg_set(moal_handle *handle, enum ext_mod_params idx)
|
|||
* @param idx extended flags id
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
moal_extflg_clear(moal_handle *handle, enum ext_mod_params idx)
|
||||
static inline void moal_extflg_clear(moal_handle *handle,
|
||||
enum ext_mod_params idx)
|
||||
{
|
||||
t_u8 *ext_fbyte;
|
||||
ext_fbyte = &handle->params.ext_flgs[idx / 8];
|
||||
|
@ -1990,8 +1981,8 @@ moal_extflg_clear(moal_handle *handle, enum ext_mod_params idx)
|
|||
* @param idx extended flags id
|
||||
* @return value of extended flag
|
||||
*/
|
||||
static inline t_u8
|
||||
moal_extflg_isset(moal_handle *handle, enum ext_mod_params idx)
|
||||
static inline t_u8 moal_extflg_isset(moal_handle *handle,
|
||||
enum ext_mod_params idx)
|
||||
{
|
||||
t_u8 ext_fbyte;
|
||||
ext_fbyte = handle->params.ext_flgs[idx / 8];
|
||||
|
@ -2005,8 +1996,7 @@ moal_extflg_isset(moal_handle *handle, enum ext_mod_params idx)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
woal_set_trans_start(struct net_device *dev)
|
||||
static inline void woal_set_trans_start(struct net_device *dev)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
|
||||
unsigned int i;
|
||||
|
@ -2027,8 +2017,7 @@ woal_set_trans_start(struct net_device *dev)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
woal_start_queue(struct net_device *dev)
|
||||
static inline void woal_start_queue(struct net_device *dev)
|
||||
{
|
||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29)
|
||||
netif_start_queue(dev);
|
||||
|
@ -2047,8 +2036,7 @@ woal_start_queue(struct net_device *dev)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
woal_stop_queue(struct net_device *dev)
|
||||
static inline void woal_stop_queue(struct net_device *dev)
|
||||
{
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||
unsigned long flags;
|
||||
|
@ -2072,8 +2060,7 @@ woal_stop_queue(struct net_device *dev)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
woal_wake_queue(struct net_device *dev)
|
||||
static inline void woal_wake_queue(struct net_device *dev)
|
||||
{
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||
unsigned long flags;
|
||||
|
@ -2095,76 +2082,111 @@ extern t_u32 drvdbg;
|
|||
#define LOG_CTRL(level) (0)
|
||||
|
||||
#ifdef DEBUG_LEVEL2
|
||||
#define PRINTM_MINFO(level, msg...) do { \
|
||||
#define PRINTM_MINFO(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MINFO) printk(KERN_DEBUG msg); \
|
||||
if (drvdbg & MINFO) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MWARN(level, msg...) do { \
|
||||
#define PRINTM_MWARN(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MWARN) printk(KERN_DEBUG msg); \
|
||||
if (drvdbg & MWARN) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MENTRY(level, msg...) do { \
|
||||
#define PRINTM_MENTRY(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MENTRY) printk(KERN_DEBUG msg); \
|
||||
if (drvdbg & MENTRY) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#else
|
||||
#define PRINTM_MINFO(level, msg...) do {} while (0)
|
||||
#define PRINTM_MWARN(level, msg...) do {} while (0)
|
||||
#define PRINTM_MENTRY(level, msg...) do {} while (0)
|
||||
#define PRINTM_MINFO(level, msg...) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define PRINTM_MWARN(level, msg...) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define PRINTM_MENTRY(level, msg...) \
|
||||
do { \
|
||||
} while (0)
|
||||
#endif /* DEBUG_LEVEL2 */
|
||||
|
||||
#define PRINTM_MFW_D(level, msg...) do { \
|
||||
#define PRINTM_MFW_D(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MFW_D) printk(KERN_DEBUG msg); \
|
||||
if (drvdbg & MFW_D) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MCMD_D(level, msg...) do { \
|
||||
#define PRINTM_MCMD_D(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MCMD_D) printk(KERN_DEBUG msg); \
|
||||
if (drvdbg & MCMD_D) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MDAT_D(level, msg...) do { \
|
||||
#define PRINTM_MDAT_D(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MDAT_D) printk(KERN_DEBUG msg); \
|
||||
if (drvdbg & MDAT_D) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MIF_D(level, msg...) do { \
|
||||
#define PRINTM_MIF_D(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MIF_D) printk(KERN_DEBUG msg); \
|
||||
if (drvdbg & MIF_D) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
|
||||
#define PRINTM_MIOCTL(level, msg...) do { \
|
||||
#define PRINTM_MIOCTL(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MIOCTL) printk(KERN_DEBUG msg); \
|
||||
if (drvdbg & MIOCTL) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MINTR(level, msg...) do { \
|
||||
#define PRINTM_MINTR(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MINTR) printk(KERN_DEBUG msg); \
|
||||
if (drvdbg & MINTR) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MEVENT(level, msg...) do { \
|
||||
#define PRINTM_MEVENT(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MEVENT) printk(msg); \
|
||||
if (drvdbg & MEVENT) \
|
||||
printk(msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MCMND(level, msg...) do { \
|
||||
#define PRINTM_MCMND(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MCMND) printk(KERN_DEBUG msg); \
|
||||
if (drvdbg & MCMND) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MDATA(level, msg...) do { \
|
||||
#define PRINTM_MDATA(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MDATA) printk(KERN_DEBUG msg); \
|
||||
if (drvdbg & MDATA) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MERROR(level, msg...) do { \
|
||||
#define PRINTM_MERROR(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MERROR) printk(KERN_ERR msg); \
|
||||
if (drvdbg & MERROR) \
|
||||
printk(KERN_ERR msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MFATAL(level, msg...) do { \
|
||||
#define PRINTM_MFATAL(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MFATAL) printk(KERN_ERR msg); \
|
||||
if (drvdbg & MFATAL) \
|
||||
printk(KERN_ERR msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MMSG(level, msg...) do { \
|
||||
#define PRINTM_MMSG(level, msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
if (drvdbg & MMSG) printk(KERN_ALERT msg); \
|
||||
if (drvdbg & MMSG) \
|
||||
printk(KERN_ALERT msg); \
|
||||
} while (0)
|
||||
|
||||
static inline void
|
||||
woal_print(t_u32 level, char *fmt, ...)
|
||||
static inline void woal_print(t_u32 level, char *fmt, ...)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -2172,7 +2194,9 @@ woal_print(t_u32 level, char *fmt, ...)
|
|||
|
||||
#else
|
||||
|
||||
#define PRINTM(level, msg...) do {} while (0)
|
||||
#define PRINTM(level, msg...) \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
#endif /* DEBUG_LEVEL1 */
|
||||
|
||||
|
@ -2180,24 +2204,22 @@ woal_print(t_u32 level, char *fmt, ...)
|
|||
#define MASSERT(cond) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
PRINTM(MFATAL, "ASSERT: %s: %i\n", __func__, __LINE__); \
|
||||
PRINTM(MFATAL, "ASSERT: %s: %i\n", __func__, \
|
||||
__LINE__); \
|
||||
panic("Assert failed: Panic!"); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/** Log entry point for debugging */
|
||||
#define ENTER() PRINTM(MENTRY, "Enter: %s\n", \
|
||||
__func__)
|
||||
#define ENTER() PRINTM(MENTRY, "Enter: %s\n", __func__)
|
||||
/** Log exit point for debugging */
|
||||
#define LEAVE() PRINTM(MENTRY, "Leave: %s\n", \
|
||||
__func__)
|
||||
#define LEAVE() PRINTM(MENTRY, "Leave: %s\n", __func__)
|
||||
|
||||
#ifdef DEBUG_LEVEL1
|
||||
#define DBG_DUMP_BUF_LEN 64
|
||||
#define MAX_DUMP_PER_LINE 16
|
||||
|
||||
static inline void
|
||||
hexdump(t_u32 level, char *prompt, t_u8 *buf, int len)
|
||||
static inline void hexdump(t_u32 level, char *prompt, t_u8 *buf, int len)
|
||||
{
|
||||
int i;
|
||||
char dbgdumpbuf[DBG_DUMP_BUF_LEN];
|
||||
|
@ -2222,27 +2244,33 @@ hexdump(t_u32 level, char *prompt, t_u8 *buf, int len)
|
|||
}
|
||||
}
|
||||
|
||||
#define DBG_HEXDUMP_MERROR(x, y, z) do { \
|
||||
#define DBG_HEXDUMP_MERROR(x, y, z) \
|
||||
do { \
|
||||
if ((drvdbg & MERROR) || LOG_CTRL(MERROR)) \
|
||||
hexdump(MERROR, x, y, z); \
|
||||
} while (0)
|
||||
#define DBG_HEXDUMP_MCMD_D(x, y, z) do { \
|
||||
#define DBG_HEXDUMP_MCMD_D(x, y, z) \
|
||||
do { \
|
||||
if ((drvdbg & MCMD_D) || LOG_CTRL(MCMD_D)) \
|
||||
hexdump(MCMD_D, x, y, z); \
|
||||
} while (0)
|
||||
#define DBG_HEXDUMP_MDAT_D(x, y, z) do { \
|
||||
#define DBG_HEXDUMP_MDAT_D(x, y, z) \
|
||||
do { \
|
||||
if ((drvdbg & MDAT_D) || LOG_CTRL(MDAT_D)) \
|
||||
hexdump(MDAT_D, x, y, z); \
|
||||
} while (0)
|
||||
#define DBG_HEXDUMP_MIF_D(x, y, z) do { \
|
||||
#define DBG_HEXDUMP_MIF_D(x, y, z) \
|
||||
do { \
|
||||
if ((drvdbg & MIF_D) || LOG_CTRL(MIF_D)) \
|
||||
hexdump(MIF_D, x, y, z); \
|
||||
} while (0)
|
||||
#define DBG_HEXDUMP_MEVT_D(x, y, z) do { \
|
||||
#define DBG_HEXDUMP_MEVT_D(x, y, z) \
|
||||
do { \
|
||||
if ((drvdbg & MEVT_D) || LOG_CTRL(MEVT_D)) \
|
||||
hexdump(MEVT_D, x, y, z); \
|
||||
} while (0)
|
||||
#define DBG_HEXDUMP_MFW_D(x, y, z) do { \
|
||||
#define DBG_HEXDUMP_MFW_D(x, y, z) \
|
||||
do { \
|
||||
if ((drvdbg & MFW_D) || LOG_CTRL(MFW_D)) \
|
||||
hexdump(MFW_D, x, y, z); \
|
||||
} while (0)
|
||||
|
@ -2250,17 +2278,22 @@ hexdump(t_u32 level, char *prompt, t_u8 *buf, int len)
|
|||
|
||||
#else
|
||||
/** Do nothing since debugging is not turned on */
|
||||
#define DBG_HEXDUMP(level, x, y, z) do {} while (0)
|
||||
#define DBG_HEXDUMP(level, x, y, z) \
|
||||
do { \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_LEVEL2
|
||||
#define HEXDUMP(x, y, z) do { \
|
||||
#define HEXDUMP(x, y, z) \
|
||||
do { \
|
||||
if ((drvdbg & MINFO) || LOG_CTRL(MINFO)) \
|
||||
hexdump(MINFO, x, y, z); \
|
||||
} while (0)
|
||||
#else
|
||||
/** Do nothing since debugging is not turned on */
|
||||
#define HEXDUMP(x, y, z) do {} while (0)
|
||||
#define HEXDUMP(x, y, z) \
|
||||
do { \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
|
@ -2300,8 +2333,8 @@ hexdump(t_u32 level, char *prompt, t_u8 *buf, int len)
|
|||
*
|
||||
* @return Pointer to moal_private
|
||||
*/
|
||||
static inline moal_private *
|
||||
woal_get_priv(moal_handle *handle, mlan_bss_role bss_role)
|
||||
static inline moal_private *woal_get_priv(moal_handle *handle,
|
||||
mlan_bss_role bss_role)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -2324,8 +2357,8 @@ woal_get_priv(moal_handle *handle, mlan_bss_role bss_role)
|
|||
*
|
||||
* @return Pointer to moal_private
|
||||
*/
|
||||
static inline moal_private *
|
||||
woal_get_priv_bss_type(moal_handle *handle, mlan_bss_type bss_type)
|
||||
static inline moal_private *woal_get_priv_bss_type(moal_handle *handle,
|
||||
mlan_bss_type bss_type)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -2342,8 +2375,7 @@ woal_get_priv_bss_type(moal_handle *handle, mlan_bss_type bss_type)
|
|||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
woal_get_monotonic_time(struct timeval *tv)
|
||||
static inline void woal_get_monotonic_time(struct timeval *tv)
|
||||
{
|
||||
struct timespec ts;
|
||||
|
||||
|
@ -2494,8 +2526,8 @@ mlan_status woal_shutdown_fw(moal_private *priv, t_u8 wait_option);
|
|||
/* Functions in interface module */
|
||||
#ifdef ANDROID_KERNEL
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
|
||||
static inline void
|
||||
wakeup_source_init(struct wakeup_source *ws, const char *name)
|
||||
static inline void wakeup_source_init(struct wakeup_source *ws,
|
||||
const char *name)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -2508,8 +2540,7 @@ wakeup_source_init(struct wakeup_source *ws, const char *name)
|
|||
LEAVE();
|
||||
}
|
||||
|
||||
static inline void
|
||||
wakeup_source_trash(struct wakeup_source *ws)
|
||||
static inline void wakeup_source_trash(struct wakeup_source *ws)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -2597,9 +2628,8 @@ mlan_status woal_get_active_intf_channel(moal_private *priv,
|
|||
/** Request Exented Capability information */
|
||||
int woal_request_extcap(moal_private *priv, t_u8 *buf, t_u8 len);
|
||||
#endif
|
||||
mlan_status woal_set_get_dtim_period(moal_private *priv,
|
||||
t_u32 action, t_u8 wait_option,
|
||||
t_u8 *value);
|
||||
mlan_status woal_set_get_dtim_period(moal_private *priv, t_u32 action,
|
||||
t_u8 wait_option, t_u8 *value);
|
||||
/** Set/get Host Sleep parameters */
|
||||
mlan_status woal_set_get_hs_params(moal_private *priv, t_u16 action,
|
||||
t_u8 wait_option, mlan_ds_hs_cfg *hscfg);
|
||||
|
@ -2785,8 +2815,8 @@ int woal_get_bss_type(struct net_device *dev, struct ifreq *req);
|
|||
int woal_host_command(moal_private *priv, struct iwreq *wrq);
|
||||
#endif
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
mlan_status woal_bss_role_cfg(moal_private *priv, t_u8 action,
|
||||
t_u8 wait_option, t_u8 *bss_role);
|
||||
mlan_status woal_bss_role_cfg(moal_private *priv, t_u8 action, t_u8 wait_option,
|
||||
t_u8 *bss_role);
|
||||
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
||||
void woal_go_timer_func(void *context);
|
||||
#endif
|
||||
|
@ -2973,13 +3003,10 @@ int woal_start_mkeep_alive(moal_private *priv, t_u8 mkeep_alive_id,
|
|||
t_u32 retry_interval, t_u8 retry_cnt);
|
||||
int woal_stop_mkeep_alive(moal_private *priv, t_u8 mkeep_alive_id, t_u8 reset,
|
||||
t_u8 *ip_pkt, t_u8 *pkt_len);
|
||||
int woal_priv_save_cloud_keep_alive_params(moal_private *priv,
|
||||
t_u8 mkeep_alive_id, t_u8 enable,
|
||||
t_u16 ether_type, t_u8 *ip_pkt,
|
||||
t_u16 ip_pkt_len, t_u8 *src_mac,
|
||||
t_u8 *dst_mac, t_u32 period_msec,
|
||||
t_u32 retry_interval,
|
||||
t_u8 retry_cnt);
|
||||
int woal_priv_save_cloud_keep_alive_params(
|
||||
moal_private *priv, t_u8 mkeep_alive_id, t_u8 enable, t_u16 ether_type,
|
||||
t_u8 *ip_pkt, t_u16 ip_pkt_len, t_u8 *src_mac, t_u8 *dst_mac,
|
||||
t_u32 period_msec, t_u32 retry_interval, t_u8 retry_cnt);
|
||||
mlan_status woal_init_aggr_ctrl(moal_handle *handle, t_u8 wait_option);
|
||||
|
||||
#ifdef STA_CFG80211
|
||||
|
|
|
@ -49,39 +49,62 @@ extern moal_handle **m_handle;
|
|||
static const struct pci_device_id wlan_ids[] = {
|
||||
#ifdef PCIE8897
|
||||
{
|
||||
PCIE_VENDOR_ID_NXP, PCIE_DEVICE_ID_NXP_88W8897P,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
PCIE_VENDOR_ID_NXP,
|
||||
PCIE_DEVICE_ID_NXP_88W8897P,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
#endif
|
||||
#ifdef PCIE8997
|
||||
{
|
||||
PCIE_VENDOR_ID_NXP, PCIE_DEVICE_ID_NXP_88W8997P,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
PCIE_VENDOR_ID_NXP,
|
||||
PCIE_DEVICE_ID_NXP_88W8997P,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
{
|
||||
PCIE_VENDOR_ID_V2_NXP, PCIE_DEVICE_ID_NXP_88W8997P,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
PCIE_VENDOR_ID_V2_NXP,
|
||||
PCIE_DEVICE_ID_NXP_88W8997P,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
#endif
|
||||
#ifdef PCIE9097
|
||||
{
|
||||
PCIE_VENDOR_ID_V2_NXP, PCIE_DEVICE_ID_NXP_88W9097,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
PCIE_VENDOR_ID_V2_NXP,
|
||||
PCIE_DEVICE_ID_NXP_88W9097,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
#endif
|
||||
#ifdef PCIE9098
|
||||
{
|
||||
PCIE_VENDOR_ID_V2_NXP, PCIE_DEVICE_ID_NXP_88W9098P_FN0,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
PCIE_VENDOR_ID_V2_NXP,
|
||||
PCIE_DEVICE_ID_NXP_88W9098P_FN0,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
{
|
||||
PCIE_VENDOR_ID_V2_NXP, PCIE_DEVICE_ID_NXP_88W9098P_FN1,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
PCIE_VENDOR_ID_V2_NXP,
|
||||
PCIE_DEVICE_ID_NXP_88W9098P_FN1,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
#endif
|
||||
{},
|
||||
};
|
||||
|
||||
/* moal interface ops */
|
||||
static moal_if_ops pcie_ops;
|
||||
|
||||
|
@ -101,8 +124,7 @@ static mlan_status woal_pcie_preinit(struct pci_dev *pdev);
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static t_u16
|
||||
woal_update_card_type(t_void *card)
|
||||
static t_u16 woal_update_card_type(t_void *card)
|
||||
{
|
||||
pcie_service_card *cardp_pcie = (pcie_service_card *)card;
|
||||
t_u16 card_type = 0;
|
||||
|
@ -115,7 +137,8 @@ woal_update_card_type(t_void *card)
|
|||
strlen(CARD_PCIE8897), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V15, strlen(V15),
|
||||
strlen(KERN_VERSION),
|
||||
V15, strlen(V15),
|
||||
strlen(driver_version) - strlen(INTF_CARDTYPE) -
|
||||
strlen(KERN_VERSION));
|
||||
}
|
||||
|
@ -127,7 +150,8 @@ woal_update_card_type(t_void *card)
|
|||
strlen(CARD_PCIE8997), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V16, strlen(V16),
|
||||
strlen(KERN_VERSION),
|
||||
V16, strlen(V16),
|
||||
strlen(driver_version) - strlen(INTF_CARDTYPE) -
|
||||
strlen(KERN_VERSION));
|
||||
}
|
||||
|
@ -139,7 +163,8 @@ woal_update_card_type(t_void *card)
|
|||
strlen(CARD_PCIE9097), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V17, strlen(V17),
|
||||
strlen(KERN_VERSION),
|
||||
V17, strlen(V17),
|
||||
strlen(driver_version) - strlen(INTF_CARDTYPE) -
|
||||
strlen(KERN_VERSION));
|
||||
}
|
||||
|
@ -152,7 +177,8 @@ woal_update_card_type(t_void *card)
|
|||
strlen(CARD_PCIE9098), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V17, strlen(V17),
|
||||
strlen(KERN_VERSION),
|
||||
V17, strlen(V17),
|
||||
strlen(driver_version) - strlen(INTF_CARDTYPE) -
|
||||
strlen(KERN_VERSION));
|
||||
}
|
||||
|
@ -175,8 +201,7 @@ woal_update_card_type(t_void *card)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_do_flr(moal_handle *handle, bool prepare)
|
||||
mlan_status woal_do_flr(moal_handle *handle, bool prepare)
|
||||
{
|
||||
unsigned int i;
|
||||
int index = 0;
|
||||
|
@ -229,7 +254,6 @@ woal_do_flr(moal_handle *handle, bool prepare)
|
|||
if (atomic_read(&handle->rx_pending) ||
|
||||
atomic_read(&handle->tx_pending) ||
|
||||
atomic_read(&handle->ioctl_pending)) {
|
||||
|
||||
PRINTM(MERROR,
|
||||
"ERR: rx_pending=%d,tx_pending=%d,ioctl_pending=%d\n",
|
||||
atomic_read(&handle->rx_pending),
|
||||
|
@ -247,8 +271,8 @@ woal_do_flr(moal_handle *handle, bool prepare)
|
|||
if (atomic_read(&handle->lock_count) ||
|
||||
atomic_read(&handle->malloc_count) ||
|
||||
atomic_read(&handle->mbufalloc_count)) {
|
||||
|
||||
PRINTM(MERROR, "mlan has memory leak: lock_count=%d,"
|
||||
PRINTM(MERROR,
|
||||
"mlan has memory leak: lock_count=%d,"
|
||||
" malloc_count=%d, mbufalloc_count=%d\n",
|
||||
atomic_read(&handle->lock_count),
|
||||
atomic_read(&handle->malloc_count),
|
||||
|
@ -272,6 +296,7 @@ perform_init:
|
|||
PRINTM(MFATAL, "Software Init Failed\n");
|
||||
goto err_init_fw;
|
||||
}
|
||||
|
||||
#ifdef PCIE9098
|
||||
if (card->dev->device == PCIE_DEVICE_ID_NXP_88W9098P_FN1)
|
||||
mlan_set_int_mode(handle->pmlan_adapter, pcie_int_mode, 1);
|
||||
|
@ -357,8 +382,7 @@ err_init_fw:
|
|||
*
|
||||
* @return error code
|
||||
*/
|
||||
int
|
||||
woal_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
int woal_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
{
|
||||
pcie_service_card *card = NULL;
|
||||
t_u16 card_type = 0;
|
||||
|
@ -366,8 +390,8 @@ woal_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
|
||||
ENTER();
|
||||
|
||||
PRINTM(MINFO, "vendor=0x%4.04X device=0x%4.04X rev=%d\n",
|
||||
pdev->vendor, pdev->device, pdev->revision);
|
||||
PRINTM(MINFO, "vendor=0x%4.04X device=0x%4.04X rev=%d\n", pdev->vendor,
|
||||
pdev->device, pdev->revision);
|
||||
|
||||
/* Preinit PCIE device so allocate PCIE memory can be successful */
|
||||
if (woal_pcie_preinit(pdev)) {
|
||||
|
@ -393,7 +417,8 @@ woal_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
}
|
||||
woal_pcie_init(card);
|
||||
|
||||
if (woal_add_card(card, &card->dev->dev, &pcie_ops, card_type) == NULL) {
|
||||
if (woal_add_card(card, &card->dev->dev, &pcie_ops, card_type) ==
|
||||
NULL) {
|
||||
woal_pcie_cleanup(card);
|
||||
PRINTM(MERROR, "%s: failed\n", __func__);
|
||||
ret = -EFAULT;
|
||||
|
@ -418,8 +443,7 @@ err:
|
|||
*
|
||||
* @return error code
|
||||
*/
|
||||
static void
|
||||
woal_pcie_remove(struct pci_dev *dev)
|
||||
static void woal_pcie_remove(struct pci_dev *dev)
|
||||
{
|
||||
pcie_service_card *card;
|
||||
moal_handle *handle;
|
||||
|
@ -455,8 +479,7 @@ woal_pcie_remove(struct pci_dev *dev)
|
|||
*
|
||||
* @return error code
|
||||
*/
|
||||
static int
|
||||
woal_pcie_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
static int woal_pcie_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
{
|
||||
pcie_service_card *cardp;
|
||||
moal_handle *handle = NULL;
|
||||
|
@ -552,8 +575,7 @@ done:
|
|||
*
|
||||
* @return error code
|
||||
*/
|
||||
static int
|
||||
woal_pcie_resume(struct pci_dev *pdev)
|
||||
static int woal_pcie_resume(struct pci_dev *pdev)
|
||||
{
|
||||
moal_handle *handle;
|
||||
pcie_service_card *card;
|
||||
|
@ -611,8 +633,7 @@ done:
|
|||
*
|
||||
* @param pdev A pointer to pci_dev structure
|
||||
*/
|
||||
static void
|
||||
woal_pcie_reset_prepare(struct pci_dev *pdev)
|
||||
static void woal_pcie_reset_prepare(struct pci_dev *pdev)
|
||||
{
|
||||
pcie_service_card *card;
|
||||
moal_handle *handle;
|
||||
|
@ -661,14 +682,12 @@ woal_pcie_reset_prepare(struct pci_dev *pdev)
|
|||
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pcie reset done handler
|
||||
*
|
||||
* @param pdev A pointer to pci_dev structure
|
||||
*/
|
||||
static void
|
||||
woal_pcie_reset_done(struct pci_dev *pdev)
|
||||
static void woal_pcie_reset_done(struct pci_dev *pdev)
|
||||
{
|
||||
pcie_service_card *card;
|
||||
moal_handle *handle;
|
||||
|
@ -716,8 +735,7 @@ woal_pcie_reset_done(struct pci_dev *pdev)
|
|||
LEAVE();
|
||||
}
|
||||
#else
|
||||
void
|
||||
woal_pcie_reset_notify(struct pci_dev *pdev, bool prepare)
|
||||
void woal_pcie_reset_notify(struct pci_dev *pdev, bool prepare)
|
||||
{
|
||||
pcie_service_card *card;
|
||||
moal_handle *handle;
|
||||
|
@ -784,11 +802,14 @@ woal_pcie_reset_notify(struct pci_dev *pdev, bool prepare)
|
|||
|
||||
static const struct pci_error_handlers woal_pcie_err_handler[] = {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
|
||||
{.reset_prepare = woal_pcie_reset_prepare,
|
||||
{
|
||||
.reset_prepare = woal_pcie_reset_prepare,
|
||||
.reset_done = woal_pcie_reset_done,
|
||||
},
|
||||
#else
|
||||
{.reset_notify = woal_pcie_reset_notify,},
|
||||
{
|
||||
.reset_notify = woal_pcie_reset_notify,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
#endif // KERNEL_VERSION(3.18.0)
|
||||
|
@ -822,8 +843,8 @@ static struct pci_driver REFDATA wlan_pcie = {
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_pcie_write_reg(moal_handle *handle, t_u32 reg, t_u32 data)
|
||||
static mlan_status woal_pcie_write_reg(moal_handle *handle, t_u32 reg,
|
||||
t_u32 data)
|
||||
{
|
||||
pcie_service_card *card = (pcie_service_card *)handle->card;
|
||||
|
||||
|
@ -841,8 +862,8 @@ woal_pcie_write_reg(moal_handle *handle, t_u32 reg, t_u32 data)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_pcie_read_reg(moal_handle *handle, t_u32 reg, t_u32 *data)
|
||||
static mlan_status woal_pcie_read_reg(moal_handle *handle, t_u32 reg,
|
||||
t_u32 *data)
|
||||
{
|
||||
pcie_service_card *card = (pcie_service_card *)handle->card;
|
||||
*data = ioread32(card->pci_mmap1 + reg);
|
||||
|
@ -863,9 +884,8 @@ woal_pcie_read_reg(moal_handle *handle, t_u32 reg, t_u32 *data)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_pcie_write_data_sync(moal_handle *handle,
|
||||
mlan_buffer *pmbuf, t_u32 port, t_u32 timeout)
|
||||
mlan_status woal_pcie_write_data_sync(moal_handle *handle, mlan_buffer *pmbuf,
|
||||
t_u32 port, t_u32 timeout)
|
||||
{
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -880,9 +900,8 @@ woal_pcie_write_data_sync(moal_handle *handle,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_pcie_read_data_sync(moal_handle *handle,
|
||||
mlan_buffer *pmbuf, t_u32 port, t_u32 timeout)
|
||||
mlan_status woal_pcie_read_data_sync(moal_handle *handle, mlan_buffer *pmbuf,
|
||||
t_u32 port, t_u32 timeout)
|
||||
{
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -895,8 +914,7 @@ woal_pcie_read_data_sync(moal_handle *handle,
|
|||
*
|
||||
* @return IRQ_HANDLED
|
||||
*/
|
||||
static irqreturn_t
|
||||
woal_pcie_interrupt(int irq, void *dev_id)
|
||||
static irqreturn_t woal_pcie_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
struct pci_dev *pdev;
|
||||
pcie_service_card *card;
|
||||
|
@ -942,8 +960,7 @@ exit:
|
|||
*
|
||||
* @return IRQ_HANDLED
|
||||
*/
|
||||
static irqreturn_t
|
||||
woal_pcie_msix_interrupt(int irq, void *dev_id)
|
||||
static irqreturn_t woal_pcie_msix_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
struct pci_dev *pdev;
|
||||
pcie_service_card *card;
|
||||
|
@ -986,7 +1003,6 @@ exit:
|
|||
else
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function pre-initializes the PCI-E host
|
||||
* memory space, etc.
|
||||
|
@ -995,8 +1011,7 @@ exit:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_pcie_preinit(struct pci_dev *pdev)
|
||||
static mlan_status woal_pcie_preinit(struct pci_dev *pdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -1034,8 +1049,7 @@ err_enable_dev:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_pcie_init(pcie_service_card *card)
|
||||
mlan_status woal_pcie_init(pcie_service_card *card)
|
||||
{
|
||||
struct pci_dev *pdev = NULL;
|
||||
int ret;
|
||||
|
@ -1084,8 +1098,10 @@ woal_pcie_init(pcie_service_card *card)
|
|||
goto err_iomap2;
|
||||
}
|
||||
|
||||
PRINTM(MINFO, "PCI memory map Virt0: %p PCI memory map Virt2: "
|
||||
"%p\n", card->pci_mmap, card->pci_mmap1);
|
||||
PRINTM(MINFO,
|
||||
"PCI memory map Virt0: %p PCI memory map Virt2: "
|
||||
"%p\n",
|
||||
card->pci_mmap, card->pci_mmap1);
|
||||
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
|
||||
|
@ -1114,8 +1130,7 @@ err_enable_dev:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_pcie_register_dev(moal_handle *handle)
|
||||
static mlan_status woal_pcie_register_dev(moal_handle *handle)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pcie_service_card *card = NULL;
|
||||
|
@ -1166,26 +1181,25 @@ woal_pcie_register_dev(moal_handle *handle)
|
|||
"request_irq failed: ret=%d\n",
|
||||
ret);
|
||||
for (j = 0; j < i; j++)
|
||||
free_irq(card->msix_entries[j].
|
||||
vector,
|
||||
&(card->
|
||||
msix_contexts[i]));
|
||||
free_irq(card->msix_entries[j]
|
||||
.vector,
|
||||
&(card->msix_contexts
|
||||
[i]));
|
||||
pci_disable_msix(pdev);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if (i == nvec)
|
||||
break;
|
||||
}
|
||||
// follow through
|
||||
|
||||
/* fall through */
|
||||
case PCIE_INT_MODE_MSI:
|
||||
pcie_int_mode = PCIE_INT_MODE_MSI;
|
||||
ret = pci_enable_msi(pdev);
|
||||
if (ret == 0) {
|
||||
ret = request_irq(pdev->irq,
|
||||
woal_pcie_interrupt, 0,
|
||||
ret = request_irq(pdev->irq, woal_pcie_interrupt, 0,
|
||||
"mrvl_pcie_msi", pdev);
|
||||
if (ret) {
|
||||
PRINTM(MFATAL, "request_irq failed: ret=%d\n",
|
||||
|
@ -1197,10 +1211,10 @@ woal_pcie_register_dev(moal_handle *handle)
|
|||
}
|
||||
// follow through
|
||||
|
||||
/* fall through */
|
||||
case PCIE_INT_MODE_LEGACY:
|
||||
pcie_int_mode = PCIE_INT_MODE_LEGACY;
|
||||
ret = request_irq(pdev->irq,
|
||||
woal_pcie_interrupt, IRQF_SHARED,
|
||||
ret = request_irq(pdev->irq, woal_pcie_interrupt, IRQF_SHARED,
|
||||
"mrvl_pcie", pdev);
|
||||
if (ret) {
|
||||
PRINTM(MFATAL, "request_irq failed: ret=%d\n", ret);
|
||||
|
@ -1238,8 +1252,7 @@ done:
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_pcie_cleanup(pcie_service_card *card)
|
||||
void woal_pcie_cleanup(pcie_service_card *card)
|
||||
{
|
||||
struct pci_dev *pdev = NULL;
|
||||
pdev = card->dev;
|
||||
|
@ -1265,8 +1278,7 @@ woal_pcie_cleanup(pcie_service_card *card)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static void
|
||||
woal_pcie_unregister_dev(moal_handle *handle)
|
||||
static void woal_pcie_unregister_dev(moal_handle *handle)
|
||||
{
|
||||
pcie_service_card *card =
|
||||
handle ? (pcie_service_card *)handle->card : NULL;
|
||||
|
@ -1318,8 +1330,7 @@ woal_pcie_unregister_dev(moal_handle *handle)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_pcie_bus_register(void)
|
||||
mlan_status woal_pcie_bus_register(void)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
ENTER();
|
||||
|
@ -1339,8 +1350,7 @@ woal_pcie_bus_register(void)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_pcie_bus_unregister(void)
|
||||
void woal_pcie_bus_unregister(void)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -1384,42 +1394,39 @@ woal_pcie_bus_unregister(void)
|
|||
*
|
||||
* @return The length of this log
|
||||
*/
|
||||
int
|
||||
woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
||||
int woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
||||
{
|
||||
char *drv_ptr = (char *)buffer;
|
||||
t_u32 reg = 0, value = 0;
|
||||
t_u8 i;
|
||||
char buf[256], *ptr;
|
||||
pcie_service_card *card = (pcie_service_card *)phandle->card;
|
||||
int config_reg_table[] =
|
||||
{ 0x00, 0x04, 0x10, 0x18, 0x2c, 0x3c, 0x44, 0x80, 0x98, 0x170 };
|
||||
int config_reg_table[] = {0x00, 0x04, 0x10, 0x18, 0x2c,
|
||||
0x3c, 0x44, 0x80, 0x98, 0x170};
|
||||
t_u32 dump_start_reg = 0;
|
||||
t_u32 dump_end_reg = 0;
|
||||
t_u32 scratch_14_reg = 0;
|
||||
t_u32 scratch_15_reg = 0;
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
/* Tx/Rx/Event AMDA start address */
|
||||
t_u32 adma_reg_table[] =
|
||||
{ 0x10000, 0x10800, 0x10880, 0x11000, 0x11080 };
|
||||
t_u32 adma_reg_table[] = {0x10000, 0x10800, 0x10880, 0x11000, 0x11080};
|
||||
t_u8 j;
|
||||
#endif
|
||||
ENTER();
|
||||
mlan_pm_wakeup_card(phandle->pmlan_adapter, MTRUE);
|
||||
drv_ptr +=
|
||||
sprintf(drv_ptr,
|
||||
drv_ptr += sprintf(drv_ptr,
|
||||
"------------PCIe Registers dump-------------\n");
|
||||
drv_ptr += sprintf(drv_ptr, "Config Space Registers:\n");
|
||||
for (i = 0; i < ARRAY_SIZE(config_reg_table); i++) {
|
||||
pci_read_config_dword(card->dev, config_reg_table[i], &value);
|
||||
drv_ptr +=
|
||||
sprintf(drv_ptr, "reg:0x%02x value=0x%08x\n",
|
||||
drv_ptr += sprintf(drv_ptr, "reg:0x%02x value=0x%08x\n",
|
||||
config_reg_table[i], value);
|
||||
}
|
||||
drv_ptr += sprintf(drv_ptr, "FW Scrach Registers:\n");
|
||||
|
||||
#if defined(PCIE8897) || defined(PCIE8997)
|
||||
if (IS_PCIE8897(phandle->card_type) || IS_PCIE8997(phandle->card_type)) {
|
||||
if (IS_PCIE8897(phandle->card_type) ||
|
||||
IS_PCIE8997(phandle->card_type)) {
|
||||
reg = PCIE_SCRATCH_12_REG;
|
||||
dump_start_reg = PCIE_DUMP_START_REG;
|
||||
dump_end_reg = PCIE_DUMP_END_REG;
|
||||
|
@ -1429,7 +1436,8 @@ woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
|||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
if (IS_PCIE9098(phandle->card_type) || IS_PCIE9097(phandle->card_type)) {
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
reg = PCIE9098_SCRATCH_12_REG;
|
||||
dump_start_reg = PCIE9098_DUMP_REG_START;
|
||||
dump_end_reg = PCIE9098_DUMP_REG_END;
|
||||
|
@ -1471,9 +1479,10 @@ woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
|||
i++;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
if (IS_PCIE9098(phandle->card_type) || IS_PCIE9097(phandle->card_type)) {
|
||||
drv_ptr +=
|
||||
sprintf(drv_ptr,
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
drv_ptr += sprintf(
|
||||
drv_ptr,
|
||||
"PCIE registers from offset 0x1c20 to 0x1c9c:\n");
|
||||
memset(buf, 0, sizeof(buf));
|
||||
ptr = buf;
|
||||
|
@ -1490,16 +1499,15 @@ woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
|||
}
|
||||
drv_ptr += sprintf(drv_ptr, "%s\n", buf);
|
||||
}
|
||||
if (IS_PCIE9098(phandle->card_type) || IS_PCIE9097(phandle->card_type)) {
|
||||
drv_ptr +=
|
||||
sprintf(drv_ptr,
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
drv_ptr += sprintf(drv_ptr,
|
||||
"ADMA Tx/Rx/Event/Cmd/CmdResp registers:\n");
|
||||
for (j = 0; j < ARRAY_SIZE(adma_reg_table); j++) {
|
||||
drv_ptr +=
|
||||
sprintf(drv_ptr,
|
||||
drv_ptr += sprintf(
|
||||
drv_ptr,
|
||||
"ADMA registers dump from offset 0x%x to 0x%x\n",
|
||||
adma_reg_table[j],
|
||||
adma_reg_table[j] + 0x68);
|
||||
adma_reg_table[j], adma_reg_table[j] + 0x68);
|
||||
memset(buf, 0, sizeof(buf));
|
||||
ptr = buf;
|
||||
i = 1;
|
||||
|
@ -1519,8 +1527,7 @@ woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
drv_ptr +=
|
||||
sprintf(drv_ptr,
|
||||
drv_ptr += sprintf(drv_ptr,
|
||||
"-----------PCIe Registers dump End-----------\n");
|
||||
mlan_pm_wakeup_card(phandle->pmlan_adapter, MFALSE);
|
||||
LEAVE();
|
||||
|
@ -1534,23 +1541,21 @@ woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
woal_pcie_reg_dbg(moal_handle *phandle)
|
||||
static void woal_pcie_reg_dbg(moal_handle *phandle)
|
||||
{
|
||||
t_u32 reg = 0, value = 0;
|
||||
t_u8 i;
|
||||
char buf[256], *ptr;
|
||||
pcie_service_card *card = (pcie_service_card *)phandle->card;
|
||||
int config_reg_table[] =
|
||||
{ 0x00, 0x04, 0x10, 0x18, 0x2c, 0x3c, 0x44, 0x80, 0x98, 0x170 };
|
||||
int config_reg_table[] = {0x00, 0x04, 0x10, 0x18, 0x2c,
|
||||
0x3c, 0x44, 0x80, 0x98, 0x170};
|
||||
t_u32 dump_start_reg = 0;
|
||||
t_u32 dump_end_reg = 0;
|
||||
t_u32 scratch_14_reg = 0;
|
||||
t_u32 scratch_15_reg = 0;
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
/* Tx/Rx/Event AMDA start address */
|
||||
t_u32 adma_reg_table[] =
|
||||
{ 0x10000, 0x10800, 0x10880, 0x11000, 0x11080 };
|
||||
t_u32 adma_reg_table[] = {0x10000, 0x10800, 0x10880, 0x11000, 0x11080};
|
||||
t_u8 j;
|
||||
#endif
|
||||
mlan_pm_wakeup_card(phandle->pmlan_adapter, MTRUE);
|
||||
|
@ -1562,7 +1567,8 @@ woal_pcie_reg_dbg(moal_handle *phandle)
|
|||
}
|
||||
PRINTM(MMSG, "FW Scrach Registers:\n");
|
||||
#if defined(PCIE8897) || defined(PCIE8997)
|
||||
if (IS_PCIE8897(phandle->card_type) || IS_PCIE8997(phandle->card_type)) {
|
||||
if (IS_PCIE8897(phandle->card_type) ||
|
||||
IS_PCIE8997(phandle->card_type)) {
|
||||
reg = PCIE_SCRATCH_12_REG;
|
||||
dump_start_reg = PCIE_DUMP_START_REG;
|
||||
dump_end_reg = PCIE_DUMP_END_REG;
|
||||
|
@ -1572,7 +1578,8 @@ woal_pcie_reg_dbg(moal_handle *phandle)
|
|||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
if (IS_PCIE9098(phandle->card_type) || IS_PCIE9097(phandle->card_type)) {
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
reg = PCIE9098_SCRATCH_12_REG;
|
||||
dump_start_reg = PCIE9098_DUMP_START_REG;
|
||||
dump_end_reg = PCIE9098_DUMP_END_REG;
|
||||
|
@ -1609,7 +1616,8 @@ woal_pcie_reg_dbg(moal_handle *phandle)
|
|||
i++;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
if (IS_PCIE9098(phandle->card_type) || IS_PCIE9097(phandle->card_type)) {
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
PRINTM(MMSG, "PCIE registers from offset 0x1c20 to 0x1c9c:\n");
|
||||
memset(buf, 0, sizeof(buf));
|
||||
ptr = buf;
|
||||
|
@ -1626,7 +1634,8 @@ woal_pcie_reg_dbg(moal_handle *phandle)
|
|||
}
|
||||
PRINTM(MMSG, "%s\n", buf);
|
||||
}
|
||||
if (IS_PCIE9098(phandle->card_type) || IS_PCIE9097(phandle->card_type)) {
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
PRINTM(MMSG, "ADMA Tx/Rx/Event/Cmd/CmdResp registers:\n");
|
||||
for (j = 0; j < ARRAY_SIZE(adma_reg_table); j++) {
|
||||
PRINTM(MMSG,
|
||||
|
@ -1703,12 +1712,13 @@ memory_type_mapping mem_type_mapping_tbl_8897[] = {
|
|||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097)
|
||||
#define DEBUG_HOST_READY_8997 0xCC
|
||||
#define DEBUG_MEMDUMP_FINISH_8997 0xDD
|
||||
memory_type_mapping mem_type_mapping_tbl_8997 =
|
||||
{ "DUMP", NULL, NULL, 0xDD, 0x00 };
|
||||
memory_type_mapping mem_type_mapping_tbl_8997 = {"DUMP", NULL, NULL, 0xDD,
|
||||
0x00};
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(PCIE8897) || defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE8897) || defined(PCIE8997) || defined(PCIE9098) || \
|
||||
defined(PCIE9097)
|
||||
/**
|
||||
* @brief This function reads data by 8 bit from card register
|
||||
*
|
||||
|
@ -1718,8 +1728,7 @@ memory_type_mapping mem_type_mapping_tbl_8997 =
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_read_reg_eight_bit(moal_handle *handle, t_u32 reg, t_u8 *data)
|
||||
mlan_status woal_read_reg_eight_bit(moal_handle *handle, t_u32 reg, t_u8 *data)
|
||||
{
|
||||
pcie_service_card *card = (pcie_service_card *)handle->card;
|
||||
*data = ioread8(card->pci_mmap1 + reg);
|
||||
|
@ -1734,8 +1743,7 @@ woal_read_reg_eight_bit(moal_handle *handle, t_u32 reg, t_u8 *data)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
rdwr_status
|
||||
woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
||||
rdwr_status woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
||||
{
|
||||
int ret = 0;
|
||||
int tries = 0;
|
||||
|
@ -1758,7 +1766,8 @@ woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
|||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
if (IS_PCIE9098(phandle->card_type) || IS_PCIE9097(phandle->card_type)) {
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
debug_host_ready = DEBUG_HOST_READY_8997;
|
||||
dump_ctrl_reg = PCIE9098_DUMP_CTRL_REG;
|
||||
}
|
||||
|
@ -1812,10 +1821,8 @@ woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
||||
void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
||||
{
|
||||
|
||||
int ret = 0;
|
||||
unsigned int reg, reg_start, reg_end;
|
||||
t_u8 *dbg_ptr = NULL;
|
||||
|
@ -1890,9 +1897,9 @@ woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
|||
} else {
|
||||
PRINTM(MMSG, "%s_SIZE=0x%x\n",
|
||||
mem_type_mapping_tbl[idx].mem_name, memory_size);
|
||||
ret = moal_vmalloc(phandle, memory_size + 1,
|
||||
(t_u8 **)&mem_type_mapping_tbl[idx].
|
||||
mem_Ptr);
|
||||
ret = moal_vmalloc(
|
||||
phandle, memory_size + 1,
|
||||
(t_u8 **)&mem_type_mapping_tbl[idx].mem_Ptr);
|
||||
if ((ret != MLAN_STATUS_SUCCESS) ||
|
||||
!mem_type_mapping_tbl[idx].mem_Ptr) {
|
||||
PRINTM(MERROR,
|
||||
|
@ -1931,16 +1938,15 @@ woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
|||
PRINTM(MMSG, "%s done: size=0x%x\n",
|
||||
mem_type_mapping_tbl[idx].mem_name,
|
||||
(unsigned int)(dbg_ptr -
|
||||
mem_type_mapping_tbl[idx].
|
||||
mem_Ptr));
|
||||
mem_type_mapping_tbl[idx]
|
||||
.mem_Ptr));
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
sprintf(file_name, "%s%s", "file_pcie_",
|
||||
mem_type_mapping_tbl[idx].mem_name);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name,
|
||||
file_name,
|
||||
mem_type_mapping_tbl
|
||||
[idx].mem_Ptr,
|
||||
woal_save_dump_info_to_file(
|
||||
path_name, file_name,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr,
|
||||
memory_size))
|
||||
PRINTM(MMSG,
|
||||
"Can't save dump file %s in %s\n",
|
||||
|
@ -1983,10 +1989,8 @@ done:
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
||||
void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
||||
{
|
||||
|
||||
int ret = 0;
|
||||
unsigned int reg, reg_start, reg_end;
|
||||
t_u8 *dbg_ptr = NULL;
|
||||
|
@ -2007,6 +2011,7 @@ woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
PRINTM(MERROR, "Could not dump firmwware info\n");
|
||||
return;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directory*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
|
@ -2028,7 +2033,8 @@ woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
if (RDWR_STATUS_FAILURE == woal_pcie_rdwr_firmware(phandle, doneflag))
|
||||
goto done;
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
if (IS_PCIE9098(phandle->card_type) || IS_PCIE9097(phandle->card_type)) {
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
dump_start_reg = PCIE9098_DUMP_START_REG;
|
||||
dump_end_reg = PCIE9098_DUMP_END_REG;
|
||||
}
|
||||
|
@ -2037,7 +2043,6 @@ woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
if (IS_PCIE8997(phandle->card_type)) {
|
||||
dump_start_reg = DEBUG_DUMP_START_REG;
|
||||
dump_end_reg = DEBUG_DUMP_END_REG;
|
||||
|
||||
}
|
||||
#endif
|
||||
reg = dump_start_reg;
|
||||
|
@ -2095,17 +2100,16 @@ woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
mem_type_mapping_tbl->mem_Ptr);
|
||||
mem_type_mapping_tbl->mem_Ptr = tmp_ptr;
|
||||
tmp_ptr = NULL;
|
||||
dbg_ptr =
|
||||
mem_type_mapping_tbl->mem_Ptr +
|
||||
dbg_ptr = mem_type_mapping_tbl->mem_Ptr +
|
||||
memory_size;
|
||||
memory_size += 0x4000;
|
||||
end_ptr =
|
||||
mem_type_mapping_tbl->mem_Ptr +
|
||||
end_ptr = mem_type_mapping_tbl->mem_Ptr +
|
||||
memory_size;
|
||||
}
|
||||
}
|
||||
if (RDWR_STATUS_DONE == stat) {
|
||||
PRINTM(MMSG, "%s done:"
|
||||
PRINTM(MMSG,
|
||||
"%s done:"
|
||||
#ifdef MLAN_64BIT
|
||||
"size = 0x%lx\n",
|
||||
#else
|
||||
|
@ -2117,12 +2121,10 @@ woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
sprintf(file_name, "%s%s", "file_pcie_",
|
||||
mem_type_mapping_tbl->mem_name);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name, file_name,
|
||||
mem_type_mapping_tbl->
|
||||
mem_Ptr,
|
||||
dbg_ptr -
|
||||
mem_type_mapping_tbl->
|
||||
mem_Ptr))
|
||||
woal_save_dump_info_to_file(
|
||||
path_name, file_name,
|
||||
mem_type_mapping_tbl->mem_Ptr,
|
||||
dbg_ptr - mem_type_mapping_tbl->mem_Ptr))
|
||||
PRINTM(MMSG, "Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
moal_vfree(phandle, mem_type_mapping_tbl->mem_Ptr);
|
||||
|
@ -2156,8 +2158,7 @@ done:
|
|||
* @return MTRUE/MFALSE
|
||||
*
|
||||
*/
|
||||
static t_u8
|
||||
woal_pcie_is_second_mac(moal_handle *handle)
|
||||
static t_u8 woal_pcie_is_second_mac(moal_handle *handle)
|
||||
{
|
||||
#ifdef PCIE9098
|
||||
pcie_service_card *card = (pcie_service_card *)handle->card;
|
||||
|
@ -2167,8 +2168,7 @@ woal_pcie_is_second_mac(moal_handle *handle)
|
|||
return MFALSE;
|
||||
}
|
||||
|
||||
void
|
||||
woal_pcie_dump_fw_info(moal_handle *phandle)
|
||||
void woal_pcie_dump_fw_info(moal_handle *phandle)
|
||||
{
|
||||
mlan_pm_wakeup_card(phandle->pmlan_adapter, MTRUE);
|
||||
phandle->fw_dump = MTRUE;
|
||||
|
@ -2177,9 +2177,8 @@ woal_pcie_dump_fw_info(moal_handle *phandle)
|
|||
woal_pcie_dump_fw_info_v1(phandle);
|
||||
#endif
|
||||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097)
|
||||
if (IS_PCIE8997(phandle->card_type)
|
||||
|| IS_PCIE9098(phandle->card_type)
|
||||
|| IS_PCIE9097(phandle->card_type))
|
||||
if (IS_PCIE8997(phandle->card_type) ||
|
||||
IS_PCIE9098(phandle->card_type) || IS_PCIE9097(phandle->card_type))
|
||||
woal_pcie_dump_fw_info_v2(phandle);
|
||||
#endif
|
||||
phandle->fw_dump = MFALSE;
|
||||
|
@ -2187,8 +2186,7 @@ woal_pcie_dump_fw_info(moal_handle *phandle)
|
|||
queue_work(phandle->workqueue, &phandle->main_work);
|
||||
}
|
||||
|
||||
static mlan_status
|
||||
woal_pcie_get_fw_name(moal_handle *handle)
|
||||
static mlan_status woal_pcie_get_fw_name(moal_handle *handle)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#ifdef PCIE9098
|
||||
|
@ -2230,6 +2228,7 @@ woal_pcie_get_fw_name(moal_handle *handle)
|
|||
#endif
|
||||
goto done;
|
||||
}
|
||||
|
||||
#ifdef PCIE8997
|
||||
if (IS_PCIE8997(handle->card_type)) {
|
||||
woal_pcie_read_reg(handle, rev_id_reg, &revision_id);
|
||||
|
@ -2240,7 +2239,8 @@ woal_pcie_get_fw_name(moal_handle *handle)
|
|||
magic &= 0xff;
|
||||
PRINTM(MCMND, "magic=0x%x, strap=0x%x, revision_id=0x%x\n",
|
||||
magic, strap, revision_id);
|
||||
if ((revision_id == PCIE8997_A1) && (magic == CHIP_MAGIC_VALUE)) {
|
||||
if ((revision_id == PCIE8997_A1) &&
|
||||
(magic == CHIP_MAGIC_VALUE)) {
|
||||
if (strap == CARD_TYPE_PCIE_UART)
|
||||
strcpy(handle->card_info->fw_name,
|
||||
PCIEUART8997_DEFAULT_COMBO_FW_NAME);
|
||||
|
@ -2266,16 +2266,16 @@ woal_pcie_get_fw_name(moal_handle *handle)
|
|||
case PCIE9098_Z1Z2:
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_PCIE_UART)
|
||||
strcpy(handle->card_info->
|
||||
fw_name,
|
||||
strcpy(handle->card_info
|
||||
->fw_name,
|
||||
PCIEUART9098_DEFAULT_COMBO_FW_NAME);
|
||||
else if (strap == CARD_TYPE_PCIE_PCIE)
|
||||
strcpy(handle->card_info->
|
||||
fw_name,
|
||||
strcpy(handle->card_info
|
||||
->fw_name,
|
||||
PCIEPCIE9098_DEFAULT_COMBO_FW_NAME);
|
||||
else
|
||||
strcpy(handle->card_info->
|
||||
fw_name,
|
||||
strcpy(handle->card_info
|
||||
->fw_name,
|
||||
PCIEUSB9098_DEFAULT_COMBO_FW_NAME);
|
||||
}
|
||||
strcpy(handle->card_info->fw_name_wlan,
|
||||
|
@ -2283,18 +2283,19 @@ woal_pcie_get_fw_name(moal_handle *handle)
|
|||
break;
|
||||
case PCIE9098_A0:
|
||||
case PCIE9098_A1:
|
||||
case PCIE9098_A2:
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_PCIE_UART)
|
||||
strcpy(handle->card_info->
|
||||
fw_name,
|
||||
strcpy(handle->card_info
|
||||
->fw_name,
|
||||
PCIEUART9098_COMBO_V1_FW_NAME);
|
||||
else if (strap == CARD_TYPE_PCIE_PCIE)
|
||||
strcpy(handle->card_info->
|
||||
fw_name,
|
||||
strcpy(handle->card_info
|
||||
->fw_name,
|
||||
PCIEPCIE9098_COMBO_V1_FW_NAME);
|
||||
else
|
||||
strcpy(handle->card_info->
|
||||
fw_name,
|
||||
strcpy(handle->card_info
|
||||
->fw_name,
|
||||
PCIEUSB9098_COMBO_V1_FW_NAME);
|
||||
}
|
||||
strcpy(handle->card_info->fw_name_wlan,
|
||||
|
|
|
@ -81,6 +81,7 @@ Change log:
|
|||
#define PCIE9098_Z1Z2 0x00
|
||||
#define PCIE9098_A0 0x01
|
||||
#define PCIE9098_A1 0x02
|
||||
#define PCIE9098_A2 0x03
|
||||
#define PCIE9098_DEFAULT_COMBO_FW_NAME "nxp/pcieusb9098_combo.bin"
|
||||
#define PCIEUART9098_DEFAULT_COMBO_FW_NAME "nxp/pcieuart9098_combo.bin"
|
||||
#define PCIEUSB9098_DEFAULT_COMBO_FW_NAME "nxp/pcieusb9098_combo.bin"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -280,177 +280,71 @@ Change log:
|
|||
* iwpriv ioctl handlers
|
||||
*/
|
||||
static const struct iw_priv_args woal_private_args[] = {
|
||||
{
|
||||
WOAL_SETONEINT_GETWORDCHAR,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_CHAR | 128,
|
||||
""},
|
||||
{
|
||||
WOAL_VERSION,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_CHAR | 128,
|
||||
{WOAL_SETONEINT_GETWORDCHAR, IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_CHAR | 128, ""},
|
||||
{WOAL_VERSION, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_CHAR | 128,
|
||||
"version"},
|
||||
{
|
||||
WOAL_VEREXT,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_CHAR | 128,
|
||||
"verext"},
|
||||
{
|
||||
WOAL_SETNONE_GETNONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
""},
|
||||
{
|
||||
WOAL_WARMRESET,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
"warmreset"},
|
||||
{WOAL_VEREXT, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_CHAR | 128, "verext"},
|
||||
{WOAL_SETNONE_GETNONE, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, ""},
|
||||
{WOAL_WARMRESET, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "warmreset"},
|
||||
#ifdef CONFIG_USB_SUSPEND
|
||||
{
|
||||
WOAL_USB_SUSPEND,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
"usbsuspend"},
|
||||
{
|
||||
WOAL_USB_RESUME,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
"usbresume"},
|
||||
{WOAL_USB_SUSPEND, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "usbsuspend"},
|
||||
{WOAL_USB_RESUME, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "usbresume"},
|
||||
#endif /* CONFIG_USB_SUSPEND */
|
||||
{
|
||||
WOAL_SETONEINT_GETONEINT,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_SETONEINT_GETONEINT, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
""},
|
||||
{
|
||||
WOAL_SET_GET_TXRATE,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_SET_GET_TXRATE, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"txratecfg"},
|
||||
{
|
||||
WOAL_SET_GET_REGIONCODE,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_SET_GET_REGIONCODE, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"regioncode"},
|
||||
{
|
||||
WOAL_SET_RADIO,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_SET_RADIO, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"radioctrl"},
|
||||
{
|
||||
WOAL_WMM_ENABLE,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
"wmmcfg"},
|
||||
{
|
||||
WOAL_11D_ENABLE,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
"11dcfg"},
|
||||
{
|
||||
WOAL_11D_CLR_CHAN_TABLE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
{WOAL_WMM_ENABLE, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1, "wmmcfg"},
|
||||
{WOAL_11D_ENABLE, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1, "11dcfg"},
|
||||
{WOAL_11D_CLR_CHAN_TABLE, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE,
|
||||
"11dclrtbl"},
|
||||
{
|
||||
WOAL_SET_GET_QOS_CFG,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_SET_GET_QOS_CFG, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"qoscfg"},
|
||||
#ifndef OPCHAN
|
||||
{
|
||||
WOAL_SET_GET_WWS_CFG,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_SET_GET_WWS_CFG, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"wwscfg"},
|
||||
#endif
|
||||
#if defined(REASSOCIATION)
|
||||
{
|
||||
WOAL_SET_GET_REASSOC,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_SET_GET_REASSOC, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"reassoctrl"},
|
||||
#endif
|
||||
{
|
||||
WOAL_TXBUF_CFG,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_TXBUF_CFG, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"txbufcfg"},
|
||||
{
|
||||
WOAL_SLEEP_PD,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
"sleeppd"},
|
||||
{
|
||||
WOAL_AUTH_TYPE,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_SLEEP_PD, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1, "sleeppd"},
|
||||
{WOAL_AUTH_TYPE, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"authtype"},
|
||||
{
|
||||
WOAL_PORT_CTRL,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_PORT_CTRL, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"port_ctrl"},
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
{
|
||||
WOAL_SET_GET_BSS_ROLE,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_SET_GET_BSS_ROLE, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"bssrole"},
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
WOAL_SET_GET_11H_LOCAL_PWR_CONSTRAINT,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
"powercons"},
|
||||
{
|
||||
WOAL_HT_STREAM_CFG,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_SET_GET_11H_LOCAL_PWR_CONSTRAINT, IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1, "powercons"},
|
||||
{WOAL_HT_STREAM_CFG, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"htstreamcfg"},
|
||||
{
|
||||
WOAL_MAC_CONTROL,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_MAC_CONTROL, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"macctrl"},
|
||||
{
|
||||
WOAL_THERMAL,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
"thermal"},
|
||||
{
|
||||
WOAL_CFG_HOTSPOT,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_THERMAL, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1, "thermal"},
|
||||
{WOAL_CFG_HOTSPOT, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"hotspotcfg"},
|
||||
{
|
||||
WOAL_SET_GET_SIXTEEN_INT,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_SET_GET_SIXTEEN_INT, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
""},
|
||||
{
|
||||
WOAL_TX_POWERCFG,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_TX_POWERCFG, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"txpowercfg"},
|
||||
#ifdef DEBUG_LEVEL1
|
||||
{
|
||||
WOAL_DRV_DBG,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
"drvdbg"},
|
||||
{WOAL_DRV_DBG, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16, "drvdbg"},
|
||||
#endif
|
||||
{
|
||||
WOAL_BEACON_INTERVAL,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_BEACON_INTERVAL, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"bcninterval"},
|
||||
{
|
||||
WOAL_SIGNAL,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_SIGNAL, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"getsignal"},
|
||||
{
|
||||
WOAL_DEEP_SLEEP,
|
||||
|
@ -458,303 +352,121 @@ static const struct iw_priv_args woal_private_args[] = {
|
|||
IW_PRIV_TYPE_INT | 16,
|
||||
"deepsleep",
|
||||
},
|
||||
{
|
||||
WOAL_11N_TX_CFG,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_11N_TX_CFG, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"httxcfg"},
|
||||
{
|
||||
WOAL_11N_HTCAP_CFG,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_11N_HTCAP_CFG, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"htcapinfo"},
|
||||
{
|
||||
WOAL_PRIO_TBL,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_PRIO_TBL, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"aggrpriotbl"},
|
||||
{
|
||||
WOAL_11N_AMSDU_AGGR_CTRL,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_11N_AMSDU_AGGR_CTRL, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"amsduaggrctrl"},
|
||||
{
|
||||
WOAL_ADDBA_UPDT,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_ADDBA_UPDT, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"addbapara"},
|
||||
{
|
||||
WOAL_ADDBA_REJECT,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_ADDBA_REJECT, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"addbareject"},
|
||||
{
|
||||
WOAL_TX_BF_CAP,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_TX_BF_CAP, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"httxbfcap"},
|
||||
{
|
||||
WOAL_HS_CFG,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
"hscfg"},
|
||||
{
|
||||
WOAL_HS_SETPARA,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_HS_CFG, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16, "hscfg"},
|
||||
{WOAL_HS_SETPARA, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"hssetpara"},
|
||||
{
|
||||
WOAL_REG_READ_WRITE,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_REG_READ_WRITE, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"regrdwr"},
|
||||
{
|
||||
WOAL_BAND_CFG,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_BAND_CFG, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"bandcfg"},
|
||||
{
|
||||
WOAL_INACTIVITY_TIMEOUT_EXT,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
"inactivityto"},
|
||||
{WOAL_INACTIVITY_TIMEOUT_EXT, IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16, "inactivityto"},
|
||||
#ifdef SDIO
|
||||
{
|
||||
WOAL_SDIO_CLOCK,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_SDIO_CLOCK, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"sdioclock"},
|
||||
{
|
||||
WOAL_CMD_52RDWR,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_CMD_52RDWR, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"sdcmd52rw"},
|
||||
#endif
|
||||
{
|
||||
WOAL_SCAN_CFG,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_SCAN_CFG, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"scancfg"},
|
||||
{
|
||||
WOAL_PS_CFG,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
"pscfg"},
|
||||
{
|
||||
WOAL_MEM_READ_WRITE,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_PS_CFG, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16, "pscfg"},
|
||||
{WOAL_MEM_READ_WRITE, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"memrdwr"},
|
||||
#ifdef SDIO
|
||||
{
|
||||
WOAL_SDIO_MPA_CTRL,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_SDIO_MPA_CTRL, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"mpactrl"},
|
||||
#endif
|
||||
{
|
||||
WOAL_SLEEP_PARAMS,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_SLEEP_PARAMS, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"sleepparams"},
|
||||
{
|
||||
WOAL_DFS_TESTING,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_DFS_TESTING, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"dfstesting"},
|
||||
{
|
||||
WOAL_MGMT_FRAME_CTRL,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_MGMT_FRAME_CTRL, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"mgmtframectrl"},
|
||||
{
|
||||
WOAL_CFP_CODE,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_CFP_CODE, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"cfpcode"},
|
||||
{
|
||||
WOAL_SET_GET_TX_RX_ANT,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_SET_GET_TX_RX_ANT, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"antcfg"},
|
||||
{
|
||||
WOAL_IND_RST_CFG,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
{WOAL_IND_RST_CFG, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"indrstcfg"},
|
||||
{
|
||||
WOALGETLOG,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_CHAR | GETLOG_BUFSIZE,
|
||||
{WOALGETLOG, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_CHAR | GETLOG_BUFSIZE,
|
||||
"getlog"},
|
||||
{
|
||||
WOAL_SETADDR_GETNONE,
|
||||
IW_PRIV_TYPE_ADDR | 1,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
""},
|
||||
{
|
||||
WOAL_DEAUTH,
|
||||
IW_PRIV_TYPE_ADDR | 1,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
"deauth"},
|
||||
{
|
||||
WOAL_SET_GET_256_CHAR,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
""},
|
||||
{
|
||||
WOAL_PASSPHRASE,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
{WOAL_SETADDR_GETNONE, IW_PRIV_TYPE_ADDR | 1, IW_PRIV_TYPE_NONE, ""},
|
||||
{WOAL_DEAUTH, IW_PRIV_TYPE_ADDR | 1, IW_PRIV_TYPE_NONE, "deauth"},
|
||||
{WOAL_SET_GET_256_CHAR, IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256, ""},
|
||||
{WOAL_PASSPHRASE, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256,
|
||||
"passphrase"},
|
||||
{
|
||||
WOAL_GET_KEY,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
{WOAL_GET_KEY, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256,
|
||||
"getkey"},
|
||||
{
|
||||
WOAL_ASSOCIATE,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
{WOAL_ASSOCIATE, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256,
|
||||
"associate"},
|
||||
{
|
||||
WOAL_WMM_QUEUE_STATUS,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
"qstatus"},
|
||||
{
|
||||
WOAL_WMM_TS_STATUS,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
{WOAL_WMM_QUEUE_STATUS, IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256, "qstatus"},
|
||||
{WOAL_WMM_TS_STATUS, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256,
|
||||
"ts_status"},
|
||||
{
|
||||
WOAL_IP_ADDRESS,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
{WOAL_IP_ADDRESS, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256,
|
||||
"ipaddr"},
|
||||
{
|
||||
WOAL_TX_BF_CFG,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
{WOAL_TX_BF_CFG, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256,
|
||||
"httxbfcfg"},
|
||||
{
|
||||
WOAL_SETNONE_GETTWELVE_CHAR,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_CHAR | 12,
|
||||
{WOAL_SETNONE_GETTWELVE_CHAR, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_CHAR | 12,
|
||||
""},
|
||||
{
|
||||
WOAL_WPS_SESSION,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_CHAR | 12,
|
||||
{WOAL_WPS_SESSION, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_CHAR | 12,
|
||||
"wpssession"},
|
||||
{
|
||||
WOAL_SETNONE_GET_FOUR_INT,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_INT | 4,
|
||||
{WOAL_SETNONE_GET_FOUR_INT, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_INT | 4,
|
||||
""},
|
||||
{
|
||||
WOAL_DATA_RATE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_INT | 4,
|
||||
{WOAL_DATA_RATE, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_INT | 4,
|
||||
"getdatarate"},
|
||||
{
|
||||
WOAL_ESUPP_MODE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_INT | 4,
|
||||
"esuppmode"},
|
||||
{
|
||||
WOAL_SET_GET_64_INT,
|
||||
IW_PRIV_TYPE_INT | 64,
|
||||
IW_PRIV_TYPE_INT | 64,
|
||||
""},
|
||||
{
|
||||
WOAL_ECL_SYS_CLOCK,
|
||||
IW_PRIV_TYPE_INT | 64,
|
||||
IW_PRIV_TYPE_INT | 64,
|
||||
{WOAL_ESUPP_MODE, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_INT | 4, "esuppmode"},
|
||||
{WOAL_SET_GET_64_INT, IW_PRIV_TYPE_INT | 64, IW_PRIV_TYPE_INT | 64, ""},
|
||||
{WOAL_ECL_SYS_CLOCK, IW_PRIV_TYPE_INT | 64, IW_PRIV_TYPE_INT | 64,
|
||||
"sysclock"},
|
||||
{
|
||||
WOAL_HOST_CMD,
|
||||
IW_PRIV_TYPE_BYTE | 2047,
|
||||
IW_PRIV_TYPE_BYTE | 2047,
|
||||
{WOAL_HOST_CMD, IW_PRIV_TYPE_BYTE | 2047, IW_PRIV_TYPE_BYTE | 2047,
|
||||
"hostcmd"},
|
||||
{
|
||||
WOAL_SET_INTS_GET_CHARS,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_BYTE | 256,
|
||||
""},
|
||||
{
|
||||
WOAL_READ_EEPROM,
|
||||
IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_BYTE | 256,
|
||||
{WOAL_SET_INTS_GET_CHARS, IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_BYTE | 256, ""},
|
||||
{WOAL_READ_EEPROM, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_BYTE | 256,
|
||||
"rdeeprom"},
|
||||
{
|
||||
WOAL_SET_GET_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
""},
|
||||
{WOAL_SET_GET_2K_BYTES, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, ""},
|
||||
#if defined(SDIO)
|
||||
{
|
||||
WOAL_CMD_53RDWR,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
"sdcmd53rw"},
|
||||
{WOAL_CMD_53RDWR, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, "sdcmd53rw"},
|
||||
#endif
|
||||
{
|
||||
WOAL_SET_USER_SCAN,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
"setuserscan"},
|
||||
{
|
||||
WOAL_GET_SCAN_TABLE,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
"getscantable"},
|
||||
{
|
||||
WOAL_SET_USER_SCAN_EXT,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
"setuserscanext"},
|
||||
{
|
||||
WOAL_WMM_ADDTS,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
"addts"},
|
||||
{
|
||||
WOAL_WMM_DELTS,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
"delts"},
|
||||
{
|
||||
WOAL_WMM_QUEUE_CONFIG,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
"qconfig"},
|
||||
{
|
||||
WOAL_WMM_QUEUE_STATS,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
"qstats"},
|
||||
{
|
||||
WOAL_BYPASSED_PACKET,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
"pb_bypass"},
|
||||
{WOAL_SET_USER_SCAN, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, "setuserscan"},
|
||||
{WOAL_GET_SCAN_TABLE, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, "getscantable"},
|
||||
{WOAL_SET_USER_SCAN_EXT, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, "setuserscanext"},
|
||||
{WOAL_WMM_ADDTS, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, "addts"},
|
||||
{WOAL_WMM_DELTS, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, "delts"},
|
||||
{WOAL_WMM_QUEUE_CONFIG, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, "qconfig"},
|
||||
{WOAL_WMM_QUEUE_STATS, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, "qstats"},
|
||||
{WOAL_BYPASSED_PACKET, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, "pb_bypass"},
|
||||
#ifdef UAP_WEXT
|
||||
{
|
||||
WOAL_FROYO_START,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
"START"},
|
||||
{
|
||||
WOAL_FROYO_STOP,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
"STOP"},
|
||||
{
|
||||
WOAL_FROYO_WL_FW_RELOAD,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
"WL_FW_RELOAD"},
|
||||
{WOAL_FROYO_START, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "START"},
|
||||
{WOAL_FROYO_STOP, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "STOP"},
|
||||
{WOAL_FROYO_WL_FW_RELOAD, IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256, "WL_FW_RELOAD"},
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ static char *szModes[] = {
|
|||
/********************************************************
|
||||
Global Variables
|
||||
********************************************************/
|
||||
int wifi_status = 0;
|
||||
int wifi_status;
|
||||
|
||||
/********************************************************
|
||||
Local Functions
|
||||
|
@ -76,8 +76,7 @@ int wifi_status = 0;
|
|||
*
|
||||
* @return Number of output data
|
||||
*/
|
||||
static int
|
||||
woal_info_proc_read(struct seq_file *sfp, void *data)
|
||||
static int woal_info_proc_read(struct seq_file *sfp, void *data)
|
||||
{
|
||||
struct net_device *netdev = (struct net_device *)sfp->private;
|
||||
char fmt[MLAN_MAX_VER_STR_LEN];
|
||||
|
@ -121,7 +120,8 @@ woal_info_proc_read(struct seq_file *sfp, void *data)
|
|||
#ifdef UAP_SUPPORT
|
||||
memset(&ustats, 0, sizeof(ustats));
|
||||
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) {
|
||||
seq_printf(sfp, "driver_name = " "\"uap\"\n");
|
||||
seq_printf(sfp, "driver_name = "
|
||||
"\"uap\"\n");
|
||||
woal_uap_get_version(priv, fmt, sizeof(fmt) - 1);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_uap_get_stats(priv, MOAL_IOCTL_WAIT, &ustats)) {
|
||||
|
@ -141,7 +141,8 @@ woal_info_proc_read(struct seq_file *sfp, void *data)
|
|||
LEAVE();
|
||||
return -EFAULT;
|
||||
}
|
||||
seq_printf(sfp, "driver_name = " "\"wlan\"\n");
|
||||
seq_printf(sfp, "driver_name = "
|
||||
"\"wlan\"\n");
|
||||
}
|
||||
#endif
|
||||
seq_printf(sfp, "driver_version = %s", fmt);
|
||||
|
@ -159,8 +160,8 @@ woal_info_proc_read(struct seq_file *sfp, void *data)
|
|||
seq_printf(sfp, "bss_mode =\"%s\"\n", szModes[info.bss_mode]);
|
||||
#endif
|
||||
seq_printf(sfp, "media_state=\"%s\"\n",
|
||||
((priv->media_connected ==
|
||||
MFALSE) ? "Disconnected" : "Connected"));
|
||||
((priv->media_connected == MFALSE) ? "Disconnected" :
|
||||
"Connected"));
|
||||
seq_printf(sfp, "mac_address=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n",
|
||||
netdev->dev_addr[0], netdev->dev_addr[1],
|
||||
netdev->dev_addr[2], netdev->dev_addr[3],
|
||||
|
@ -170,9 +171,8 @@ woal_info_proc_read(struct seq_file *sfp, void *data)
|
|||
seq_printf(sfp, "multicast_count=\"%d\"\n", mc_count);
|
||||
seq_printf(sfp, "essid=\"%s\"\n", info.ssid.ssid);
|
||||
seq_printf(sfp, "bssid=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n",
|
||||
info.bssid[0], info.bssid[1],
|
||||
info.bssid[2], info.bssid[3],
|
||||
info.bssid[4], info.bssid[5]);
|
||||
info.bssid[0], info.bssid[1], info.bssid[2],
|
||||
info.bssid[3], info.bssid[4], info.bssid[5]);
|
||||
seq_printf(sfp, "channel=\"%d\"\n", (int)info.bss_chan);
|
||||
seq_printf(sfp, "region_code = \"%02x\"\n",
|
||||
(t_u8)info.region_code);
|
||||
|
@ -182,10 +182,10 @@ woal_info_proc_read(struct seq_file *sfp, void *data)
|
|||
*/
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
|
||||
for (i = 0; i < netdev->mc_count; i++) {
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"multicast_address[%d]=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n",
|
||||
i,
|
||||
mcptr->dmi_addr[0], mcptr->dmi_addr[1],
|
||||
i, mcptr->dmi_addr[0], mcptr->dmi_addr[1],
|
||||
mcptr->dmi_addr[2], mcptr->dmi_addr[3],
|
||||
mcptr->dmi_addr[4], mcptr->dmi_addr[5]);
|
||||
|
||||
|
@ -193,12 +193,12 @@ woal_info_proc_read(struct seq_file *sfp, void *data)
|
|||
}
|
||||
#else
|
||||
netdev_for_each_mc_addr (mcptr, netdev)
|
||||
seq_printf(sfp,
|
||||
seq_printf(
|
||||
sfp,
|
||||
"multicast_address[%d]=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n",
|
||||
i++,
|
||||
mcptr->addr[0], mcptr->addr[1],
|
||||
mcptr->addr[2], mcptr->addr[3],
|
||||
mcptr->addr[4], mcptr->addr[5]);
|
||||
i++, mcptr->addr[0], mcptr->addr[1],
|
||||
mcptr->addr[2], mcptr->addr[3], mcptr->addr[4],
|
||||
mcptr->addr[5]);
|
||||
#endif /* < 2.6.35 */
|
||||
}
|
||||
#endif
|
||||
|
@ -215,8 +215,9 @@ woal_info_proc_read(struct seq_file *sfp, void *data)
|
|||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||
for (i = 0; i < netdev->num_tx_queues; i++) {
|
||||
seq_printf(sfp, "tx queue %d: %s\n", i,
|
||||
((netif_tx_queue_stopped
|
||||
(netdev_get_tx_queue(netdev, 0))) ? "stopped" :
|
||||
((netif_tx_queue_stopped(
|
||||
netdev_get_tx_queue(netdev, 0))) ?
|
||||
"stopped" :
|
||||
"started"));
|
||||
}
|
||||
#else
|
||||
|
@ -268,8 +269,7 @@ exit:
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
woal_info_proc_open(struct inode *inode, struct file *file)
|
||||
static int woal_info_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_info_proc_read, PDE_DATA(inode));
|
||||
|
@ -298,9 +298,8 @@ static const struct file_operations info_proc_fops = {
|
|||
* @param val Parsed value to set
|
||||
* @return BT_STATUS_SUCCESS
|
||||
*/
|
||||
static int
|
||||
parse_cmd52_string(const char *buffer, size_t len, int *func, int *reg,
|
||||
int *val)
|
||||
static int parse_cmd52_string(const char *buffer, size_t len, int *func,
|
||||
int *reg, int *val)
|
||||
{
|
||||
int ret = MLAN_STATUS_SUCCESS;
|
||||
char *string = NULL;
|
||||
|
@ -351,9 +350,8 @@ parse_cmd52_string(const char *buffer, size_t len, int *func, int *reg,
|
|||
*
|
||||
* @return number of data
|
||||
*/
|
||||
static ssize_t
|
||||
woal_config_write(struct file *f, const char __user * buf, size_t count,
|
||||
loff_t * off)
|
||||
static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
||||
size_t count, loff_t *off)
|
||||
{
|
||||
char databuf[101];
|
||||
char *line = NULL;
|
||||
|
@ -410,8 +408,8 @@ woal_config_write(struct file *f, const char __user * buf, size_t count,
|
|||
if (IS_SD(handle->card_type)) {
|
||||
if (!strncmp(databuf, "sdcmd52rw=", strlen("sdcmd52rw=")) &&
|
||||
count > strlen("sdcmd52rw=")) {
|
||||
parse_cmd52_string((const char *)databuf,
|
||||
(size_t) count, &func, ®, &val);
|
||||
parse_cmd52_string((const char *)databuf, (size_t)count,
|
||||
&func, ®, &val);
|
||||
woal_sdio_read_write_cmd52(handle, func, reg, val);
|
||||
}
|
||||
}
|
||||
|
@ -445,14 +443,14 @@ woal_config_write(struct file *f, const char __user * buf, size_t count,
|
|||
gfp_t flag;
|
||||
if (len) {
|
||||
kfree(handle->fwdump_fname);
|
||||
flag = (in_atomic() ||
|
||||
irqs_disabled())? GFP_ATOMIC : GFP_KERNEL;
|
||||
flag = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC :
|
||||
GFP_KERNEL;
|
||||
handle->fwdump_fname = kzalloc(len, flag);
|
||||
if (handle->fwdump_fname)
|
||||
moal_memcpy_ext(handle, handle->fwdump_fname,
|
||||
databuf +
|
||||
strlen("fwdump_file="), len - 1,
|
||||
len - 1);
|
||||
strlen("fwdump_file="),
|
||||
len - 1, len - 1);
|
||||
}
|
||||
}
|
||||
if (!strncmp(databuf, "fw_reload", strlen("fw_reload"))) {
|
||||
|
@ -480,8 +478,7 @@ woal_config_write(struct file *f, const char __user * buf, size_t count,
|
|||
*
|
||||
* @return number of output data
|
||||
*/
|
||||
static int
|
||||
woal_config_read(struct seq_file *sfp, void *data)
|
||||
static int woal_config_read(struct seq_file *sfp, void *data)
|
||||
{
|
||||
moal_handle *handle = (moal_handle *)sfp->private;
|
||||
|
||||
|
@ -508,8 +505,7 @@ woal_config_read(struct seq_file *sfp, void *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
woal_config_proc_open(struct inode *inode, struct file *file)
|
||||
static int woal_config_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_config_read, PDE_DATA(inode));
|
||||
|
@ -535,8 +531,7 @@ static const struct file_operations config_proc_fops = {
|
|||
*
|
||||
* @return number of output data
|
||||
*/
|
||||
static int
|
||||
woal_wifi_status_read(struct seq_file *sfp, void *data)
|
||||
static int woal_wifi_status_read(struct seq_file *sfp, void *data)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -552,8 +547,7 @@ woal_wifi_status_read(struct seq_file *sfp, void *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
woal_wifi_status_proc_open(struct inode *inode, struct file *file)
|
||||
static int woal_wifi_status_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_wifi_status_read, PDE_DATA(inode));
|
||||
|
@ -580,8 +574,7 @@ static const struct file_operations wifi_status_proc_fops = {
|
|||
*
|
||||
* @return Converted number from string s
|
||||
*/
|
||||
int
|
||||
woal_string_to_number(char *s)
|
||||
int woal_string_to_number(char *s)
|
||||
{
|
||||
int r = 0;
|
||||
int base = 0;
|
||||
|
@ -617,8 +610,7 @@ woal_string_to_number(char *s)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_root_proc_init(void)
|
||||
mlan_status woal_root_proc_init(void)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -646,8 +638,7 @@ woal_root_proc_init(void)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_root_proc_remove(void)
|
||||
void woal_root_proc_remove(void)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -666,8 +657,7 @@ woal_root_proc_remove(void)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_proc_init(moal_handle *handle)
|
||||
void woal_proc_init(moal_handle *handle)
|
||||
{
|
||||
struct proc_dir_entry *r;
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
|
||||
|
@ -690,7 +680,8 @@ woal_proc_init(moal_handle *handle)
|
|||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
|
||||
/* Check if directory already exists */
|
||||
for (pde = pde->subdir; pde; pde = pde->next) {
|
||||
if (pde->namelen && !strcmp(handle->proc_wlan_name, pde->name)) {
|
||||
if (pde->namelen &&
|
||||
!strcmp(handle->proc_wlan_name, pde->name)) {
|
||||
/* Directory exists */
|
||||
PRINTM(MWARN, "proc interface already exists!\n");
|
||||
handle->proc_wlan = pde;
|
||||
|
@ -739,8 +730,7 @@ done:
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_proc_exit(moal_handle *handle)
|
||||
void woal_proc_exit(moal_handle *handle)
|
||||
{
|
||||
char config_proc_dir[20];
|
||||
|
||||
|
@ -777,8 +767,7 @@ woal_proc_exit(moal_handle *handle)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_create_proc_entry(moal_private *priv)
|
||||
void woal_create_proc_entry(moal_private *priv)
|
||||
{
|
||||
struct proc_dir_entry *r;
|
||||
struct net_device *dev = priv->netdev;
|
||||
|
@ -803,7 +792,8 @@ woal_create_proc_entry(moal_private *priv)
|
|||
return;
|
||||
}
|
||||
strcat(proc_dir_name, dev->name);
|
||||
/* Try to create adapterX/dev_name directory first under /proc/mwlan/ */
|
||||
/* Try to create adapterX/dev_name directory first under
|
||||
* /proc/mwlan/ */
|
||||
priv->proc_entry = proc_mkdir(proc_dir_name, proc_mwlan);
|
||||
if (priv->proc_entry) {
|
||||
/* Success. Continue normally */
|
||||
|
@ -815,10 +805,10 @@ woal_create_proc_entry(moal_private *priv)
|
|||
atomic_inc(&(priv->phandle->proc_wlan->count));
|
||||
#endif
|
||||
} else {
|
||||
/* Failure. adapterX/ may not exist. Try to create that first */
|
||||
priv->phandle->proc_wlan =
|
||||
proc_mkdir(priv->phandle->proc_wlan_name,
|
||||
proc_mwlan);
|
||||
/* Failure. adapterX/ may not exist. Try to create that
|
||||
* first */
|
||||
priv->phandle->proc_wlan = proc_mkdir(
|
||||
priv->phandle->proc_wlan_name, proc_mwlan);
|
||||
if (!priv->phandle->proc_wlan) {
|
||||
/* Failure. Something broken */
|
||||
LEAVE();
|
||||
|
@ -867,8 +857,7 @@ woal_create_proc_entry(moal_private *priv)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_proc_remove(moal_private *priv)
|
||||
void woal_proc_remove(moal_private *priv)
|
||||
{
|
||||
ENTER();
|
||||
if (priv->phandle->proc_wlan && priv->proc_entry) {
|
||||
|
|
|
@ -114,6 +114,7 @@ Change log:
|
|||
#define SD9098_Z1Z2 0x00
|
||||
#define SD9098_A0 0x01
|
||||
#define SD9098_A1 0x02
|
||||
#define SD9098_A2 0x03
|
||||
#define SD9098_DEFAULT_COMBO_FW_NAME "nxp/sdsd9098_combo.bin"
|
||||
#define SDUART9098_DEFAULT_COMBO_FW_NAME "nxp/sduart9098_combo.bin"
|
||||
#define SDSD9098_DEFAULT_COMBO_FW_NAME "nxp/sdsd9098_combo.bin"
|
||||
|
|
|
@ -130,6 +130,8 @@ static struct dev_pm_ops wlan_sdio_pm_ops = {
|
|||
void woal_sdio_shutdown(struct device *dev);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
static struct sdio_driver REFDATA wlan_sdio = {
|
||||
.name = "wlan_sdio",
|
||||
.id_table = wlan_ids,
|
||||
|
@ -157,6 +159,7 @@ static struct sdio_driver REFDATA wlan_sdio = {
|
|||
#endif
|
||||
#endif
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
/********************************************************
|
||||
Local Functions
|
||||
|
@ -168,8 +171,7 @@ static void woal_sdiommc_dump_fw_info(moal_handle *phandle);
|
|||
* @param handle A Pointer to the moal_handle structure
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_dump_sdio_reg(moal_handle *handle)
|
||||
void woal_dump_sdio_reg(moal_handle *handle)
|
||||
{
|
||||
int ret = 0;
|
||||
t_u8 data, i;
|
||||
|
@ -182,8 +184,9 @@ woal_dump_sdio_reg(moal_handle *handle)
|
|||
int *fun1_reg = NULL;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(fun0_reg); i++) {
|
||||
data = sdio_f0_readb(((struct sdio_mmc_card *)handle->card)->
|
||||
func, fun0_reg[i], &ret);
|
||||
data = sdio_f0_readb(
|
||||
((struct sdio_mmc_card *)handle->card)->func,
|
||||
fun0_reg[i], &ret);
|
||||
PRINTM(MMSG, "fun0: reg 0x%02x=0x%02x ret=%d\n", fun0_reg[i],
|
||||
data, ret);
|
||||
}
|
||||
|
@ -207,7 +210,6 @@ woal_dump_sdio_reg(moal_handle *handle)
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Global Functions
|
||||
********************************************************/
|
||||
|
@ -217,8 +219,7 @@ woal_dump_sdio_reg(moal_handle *handle)
|
|||
* @param func A pointer to the sdio_func structure
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
woal_sdio_interrupt(struct sdio_func *func)
|
||||
static void woal_sdio_interrupt(struct sdio_func *func)
|
||||
{
|
||||
moal_handle *handle;
|
||||
struct sdio_mmc_card *card;
|
||||
|
@ -265,8 +266,7 @@ woal_sdio_interrupt(struct sdio_func *func)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static t_u16
|
||||
woal_update_card_type(t_void *card)
|
||||
static t_u16 woal_update_card_type(t_void *card)
|
||||
{
|
||||
struct sdio_mmc_card *cardp_sd = (struct sdio_mmc_card *)card;
|
||||
t_u16 card_type = 0;
|
||||
|
@ -277,9 +277,11 @@ woal_update_card_type(t_void *card)
|
|||
card_type = CARD_TYPE_SD8887;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD8887,
|
||||
strlen(CARD_SD8887), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V15, strlen(V15),
|
||||
strlen(KERN_VERSION),
|
||||
V15, strlen(V15),
|
||||
strlen(driver_version) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
|
@ -289,9 +291,11 @@ woal_update_card_type(t_void *card)
|
|||
card_type = CARD_TYPE_SD8897;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD8897,
|
||||
strlen(CARD_SD8897), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V15, strlen(V15),
|
||||
strlen(KERN_VERSION),
|
||||
V15, strlen(V15),
|
||||
strlen(driver_version) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
|
@ -301,9 +305,11 @@ woal_update_card_type(t_void *card)
|
|||
card_type = CARD_TYPE_SD8977;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD8977,
|
||||
strlen(CARD_SD8977), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V16, strlen(V16),
|
||||
strlen(KERN_VERSION),
|
||||
V16, strlen(V16),
|
||||
strlen(driver_version) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
|
@ -313,9 +319,11 @@ woal_update_card_type(t_void *card)
|
|||
card_type = CARD_TYPE_SD8978;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD8978,
|
||||
strlen(CARD_SD8978), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V16, strlen(V16),
|
||||
strlen(KERN_VERSION),
|
||||
V16, strlen(V16),
|
||||
strlen(driver_version) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
|
@ -325,9 +333,11 @@ woal_update_card_type(t_void *card)
|
|||
card_type = CARD_TYPE_SD8997;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD8997,
|
||||
strlen(CARD_SD8997), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V16, strlen(V16),
|
||||
strlen(KERN_VERSION),
|
||||
V16, strlen(V16),
|
||||
strlen(driver_version) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
|
@ -337,9 +347,11 @@ woal_update_card_type(t_void *card)
|
|||
card_type = CARD_TYPE_SD8987;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD8987,
|
||||
strlen(CARD_SD8987), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V16, strlen(V16),
|
||||
strlen(KERN_VERSION),
|
||||
V16, strlen(V16),
|
||||
strlen(driver_version) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
|
@ -349,9 +361,11 @@ woal_update_card_type(t_void *card)
|
|||
card_type = CARD_TYPE_SD9097;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD9097,
|
||||
strlen(CARD_SD9097), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V17, strlen(V17),
|
||||
strlen(KERN_VERSION),
|
||||
V17, strlen(V17),
|
||||
strlen(driver_version) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
|
@ -362,9 +376,11 @@ woal_update_card_type(t_void *card)
|
|||
card_type = CARD_TYPE_SD9098;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD9098,
|
||||
strlen(CARD_SD9098), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V17, strlen(V17),
|
||||
strlen(KERN_VERSION),
|
||||
V17, strlen(V17),
|
||||
strlen(driver_version) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
|
@ -378,8 +394,7 @@ woal_update_card_type(t_void *card)
|
|||
* @param id A pointer to sdio_device_id structure.
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE/error code
|
||||
*/
|
||||
int
|
||||
woal_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id)
|
||||
int woal_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id)
|
||||
{
|
||||
int ret = MLAN_STATUS_SUCCESS;
|
||||
struct sdio_mmc_card *card = NULL;
|
||||
|
@ -457,8 +472,7 @@ err:
|
|||
* @param func A pointer to sdio_func structure.
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_sdio_remove(struct sdio_func *func)
|
||||
void woal_sdio_remove(struct sdio_func *func)
|
||||
{
|
||||
struct sdio_mmc_card *card;
|
||||
|
||||
|
@ -484,14 +498,13 @@ woal_sdio_remove(struct sdio_func *func)
|
|||
* @param handle A Pointer to the moal_handle structure
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_wlan_is_suspended(moal_handle *handle)
|
||||
void woal_wlan_is_suspended(moal_handle *handle)
|
||||
{
|
||||
ENTER();
|
||||
if (handle->suspend_notify_req == MTRUE) {
|
||||
handle->is_suspended = MTRUE;
|
||||
sdio_func_suspended(((struct sdio_mmc_card *)handle->card)->
|
||||
func);
|
||||
sdio_func_suspended(
|
||||
((struct sdio_mmc_card *)handle->card)->func);
|
||||
}
|
||||
LEAVE();
|
||||
}
|
||||
|
@ -506,8 +519,7 @@ woal_wlan_is_suspended(moal_handle *handle)
|
|||
* @param dev A pointer to device structure
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_sdio_shutdown(struct device *dev)
|
||||
void woal_sdio_shutdown(struct device *dev)
|
||||
{
|
||||
struct sdio_func *func = dev_to_sdio_func(dev);
|
||||
moal_handle *handle = NULL;
|
||||
|
@ -533,8 +545,8 @@ woal_sdio_shutdown(struct device *dev)
|
|||
memset(&pm_info, 0, sizeof(pm_info));
|
||||
for (i = 0; i < retry_num; i++) {
|
||||
if (MLAN_STATUS_SUCCESS ==
|
||||
woal_get_pm_info(woal_get_priv
|
||||
(handle, MLAN_BSS_ROLE_ANY),
|
||||
woal_get_pm_info(woal_get_priv(handle,
|
||||
MLAN_BSS_ROLE_ANY),
|
||||
&pm_info)) {
|
||||
if (pm_info.is_suspend_allowed == MTRUE)
|
||||
break;
|
||||
|
@ -550,12 +562,9 @@ woal_sdio_shutdown(struct device *dev)
|
|||
}
|
||||
woal_enable_hs(woal_get_priv(handle, MLAN_BSS_ROLE_ANY));
|
||||
|
||||
timeout =
|
||||
wait_event_interruptible_timeout(handle->
|
||||
hs_activate_wait_q,
|
||||
handle->
|
||||
hs_activate_wait_q_woken,
|
||||
HS_ACTIVE_TIMEOUT);
|
||||
timeout = wait_event_interruptible_timeout(
|
||||
handle->hs_activate_wait_q,
|
||||
handle->hs_activate_wait_q_woken, HS_ACTIVE_TIMEOUT);
|
||||
if (handle->hs_activated == MTRUE)
|
||||
PRINTM(MMSG, "HS actived in shutdown\n");
|
||||
else
|
||||
|
@ -590,8 +599,7 @@ done:
|
|||
* @param dev A pointer to device structure
|
||||
* @return MLAN_STATUS_SUCCESS or error code
|
||||
*/
|
||||
int
|
||||
woal_sdio_suspend(struct device *dev)
|
||||
int woal_sdio_suspend(struct device *dev)
|
||||
{
|
||||
struct sdio_func *func = dev_to_sdio_func(dev);
|
||||
mmc_pm_flag_t pm_flags = 0;
|
||||
|
@ -607,13 +615,13 @@ woal_sdio_suspend(struct device *dev)
|
|||
pm_flags = sdio_get_host_pm_caps(func);
|
||||
PRINTM(MCMND, "%s: suspend: PM flags = 0x%x\n", sdio_func_id(func),
|
||||
pm_flags);
|
||||
|
||||
cardp = sdio_get_drvdata(func);
|
||||
if (!cardp || !cardp->handle) {
|
||||
PRINTM(MERROR, "Card or moal_handle structure is not valid\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
handle = cardp->handle;
|
||||
|
||||
if (moal_extflg_isset(handle, EXT_PM_KEEP_POWER) &&
|
||||
|
@ -624,7 +632,6 @@ woal_sdio_suspend(struct device *dev)
|
|||
LEAVE();
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
if (handle->is_suspended == MTRUE) {
|
||||
PRINTM(MWARN, "Device already suspended\n");
|
||||
LEAVE();
|
||||
|
@ -670,9 +677,8 @@ woal_sdio_suspend(struct device *dev)
|
|||
#ifdef MMC_PM_FUNC_SUSPENDED
|
||||
handle->suspend_notify_req = MTRUE;
|
||||
#endif
|
||||
hs_actived =
|
||||
woal_enable_hs(woal_get_priv
|
||||
(handle, MLAN_BSS_ROLE_ANY));
|
||||
hs_actived = woal_enable_hs(
|
||||
woal_get_priv(handle, MLAN_BSS_ROLE_ANY));
|
||||
#ifdef MMC_PM_FUNC_SUSPENDED
|
||||
handle->suspend_notify_req = MFALSE;
|
||||
#endif
|
||||
|
@ -680,8 +686,9 @@ woal_sdio_suspend(struct device *dev)
|
|||
#ifdef MMC_PM_SKIP_RESUME_PROBE
|
||||
PRINTM(MCMND,
|
||||
"suspend with MMC_PM_KEEP_POWER and MMC_PM_SKIP_RESUME_PROBE\n");
|
||||
ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER |
|
||||
MMC_PM_SKIP_RESUME_PROBE);
|
||||
ret = sdio_set_host_pm_flags(
|
||||
func,
|
||||
MMC_PM_KEEP_POWER | MMC_PM_SKIP_RESUME_PROBE);
|
||||
#else
|
||||
PRINTM(MCMND, "suspend with MMC_PM_KEEP_POWER\n");
|
||||
ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
|
||||
|
@ -709,8 +716,7 @@ done:
|
|||
* @param dev A pointer to device structure
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
int
|
||||
woal_sdio_resume(struct device *dev)
|
||||
int woal_sdio_resume(struct device *dev)
|
||||
{
|
||||
struct sdio_func *func = dev_to_sdio_func(dev);
|
||||
mmc_pm_flag_t pm_flags = 0;
|
||||
|
@ -763,8 +769,8 @@ woal_sdio_resume(struct device *dev)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_sdiommc_write_reg(moal_handle *handle, t_u32 reg, t_u32 data)
|
||||
static mlan_status woal_sdiommc_write_reg(moal_handle *handle, t_u32 reg,
|
||||
t_u32 data)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func);
|
||||
|
@ -783,8 +789,8 @@ woal_sdiommc_write_reg(moal_handle *handle, t_u32 reg, t_u32 data)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_sdiommc_read_reg(moal_handle *handle, t_u32 reg, t_u32 *data)
|
||||
static mlan_status woal_sdiommc_read_reg(moal_handle *handle, t_u32 reg,
|
||||
t_u32 *data)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
t_u8 val;
|
||||
|
@ -806,8 +812,7 @@ woal_sdiommc_read_reg(moal_handle *handle, t_u32 reg, t_u32 *data)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_sdio_writeb(moal_handle *handle, t_u32 reg, t_u8 data)
|
||||
mlan_status woal_sdio_writeb(moal_handle *handle, t_u32 reg, t_u8 data)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func);
|
||||
|
@ -826,8 +831,7 @@ woal_sdio_writeb(moal_handle *handle, t_u32 reg, t_u8 data)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_sdio_readb(moal_handle *handle, t_u32 reg, t_u8 *data)
|
||||
mlan_status woal_sdio_readb(moal_handle *handle, t_u32 reg, t_u8 *data)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
t_u8 val;
|
||||
|
@ -849,8 +853,7 @@ woal_sdio_readb(moal_handle *handle, t_u32 reg, t_u8 *data)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_sdio_f0_readb(moal_handle *handle, t_u32 reg, t_u8 *data)
|
||||
mlan_status woal_sdio_f0_readb(moal_handle *handle, t_u32 reg, t_u8 *data)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
t_u8 val;
|
||||
|
@ -873,9 +876,8 @@ woal_sdio_f0_readb(moal_handle *handle, t_u32 reg, t_u8 *data)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_sdio_rw_mb(moal_handle *handle, pmlan_buffer pmbuf_list, t_u32 port,
|
||||
t_u8 write)
|
||||
mlan_status woal_sdio_rw_mb(moal_handle *handle, pmlan_buffer pmbuf_list,
|
||||
t_u32 port, t_u8 write)
|
||||
{
|
||||
struct scatterlist sg_list[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX];
|
||||
int num_sg = pmbuf_list->use_count;
|
||||
|
@ -927,11 +929,11 @@ woal_sdio_rw_mb(moal_handle *handle, pmlan_buffer pmbuf_list, t_u32 port,
|
|||
mmc_req.data = &mmc_dat;
|
||||
|
||||
sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func);
|
||||
mmc_set_data_timeout(&mmc_dat,
|
||||
((struct sdio_mmc_card *)handle->card)->func->
|
||||
card);
|
||||
mmc_wait_for_req(((struct sdio_mmc_card *)handle->card)->func->card->
|
||||
host, &mmc_req);
|
||||
mmc_set_data_timeout(
|
||||
&mmc_dat, ((struct sdio_mmc_card *)handle->card)->func->card);
|
||||
mmc_wait_for_req(
|
||||
((struct sdio_mmc_card *)handle->card)->func->card->host,
|
||||
&mmc_req);
|
||||
|
||||
if (mmc_cmd.error || mmc_dat.error) {
|
||||
PRINTM(MERROR, "CMD53 %s cmd_error = %d data_error=%d\n",
|
||||
|
@ -958,19 +960,18 @@ woal_sdio_rw_mb(moal_handle *handle, pmlan_buffer pmbuf_list, t_u32 port,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_sdiommc_write_data_sync(moal_handle *handle, mlan_buffer *pmbuf,
|
||||
t_u32 port, t_u32 timeout)
|
||||
static mlan_status woal_sdiommc_write_data_sync(moal_handle *handle,
|
||||
mlan_buffer *pmbuf, t_u32 port,
|
||||
t_u32 timeout)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
t_u8 *buffer = (t_u8 *)(pmbuf->pbuf + pmbuf->data_offset);
|
||||
t_u8 blkmode =
|
||||
(port & MLAN_SDIO_BYTE_MODE_MASK) ? BYTE_MODE : BLOCK_MODE;
|
||||
t_u32 blksz = (blkmode == BLOCK_MODE) ? MLAN_SDIO_BLOCK_SIZE : 1;
|
||||
t_u32 blkcnt =
|
||||
(blkmode ==
|
||||
BLOCK_MODE) ? (pmbuf->data_len /
|
||||
MLAN_SDIO_BLOCK_SIZE) : pmbuf->data_len;
|
||||
t_u32 blkcnt = (blkmode == BLOCK_MODE) ?
|
||||
(pmbuf->data_len / MLAN_SDIO_BLOCK_SIZE) :
|
||||
pmbuf->data_len;
|
||||
t_u32 ioport = (port & MLAN_SDIO_IO_PORT_MASK);
|
||||
int status = 0;
|
||||
if (pmbuf->use_count > 1)
|
||||
|
@ -1008,8 +1009,8 @@ woal_sdiommc_write_data_sync(moal_handle *handle, mlan_buffer *pmbuf,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_sdiommc_read_data_sync(moal_handle *handle, mlan_buffer *pmbuf, t_u32 port,
|
||||
static mlan_status woal_sdiommc_read_data_sync(moal_handle *handle,
|
||||
mlan_buffer *pmbuf, t_u32 port,
|
||||
t_u32 timeout)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
|
@ -1017,10 +1018,9 @@ woal_sdiommc_read_data_sync(moal_handle *handle, mlan_buffer *pmbuf, t_u32 port,
|
|||
t_u8 blkmode =
|
||||
(port & MLAN_SDIO_BYTE_MODE_MASK) ? BYTE_MODE : BLOCK_MODE;
|
||||
t_u32 blksz = (blkmode == BLOCK_MODE) ? MLAN_SDIO_BLOCK_SIZE : 1;
|
||||
t_u32 blkcnt =
|
||||
(blkmode ==
|
||||
BLOCK_MODE) ? (pmbuf->data_len /
|
||||
MLAN_SDIO_BLOCK_SIZE) : pmbuf->data_len;
|
||||
t_u32 blkcnt = (blkmode == BLOCK_MODE) ?
|
||||
(pmbuf->data_len / MLAN_SDIO_BLOCK_SIZE) :
|
||||
pmbuf->data_len;
|
||||
t_u32 ioport = (port & MLAN_SDIO_IO_PORT_MASK);
|
||||
int status = 0;
|
||||
if (pmbuf->use_count > 1)
|
||||
|
@ -1053,8 +1053,7 @@ woal_sdiommc_read_data_sync(moal_handle *handle, mlan_buffer *pmbuf, t_u32 port,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_sdiommc_bus_register(void)
|
||||
mlan_status woal_sdiommc_bus_register(void)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
|
@ -1076,8 +1075,7 @@ woal_sdiommc_bus_register(void)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_sdiommc_bus_unregister(void)
|
||||
void woal_sdiommc_bus_unregister(void)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -1093,8 +1091,7 @@ woal_sdiommc_bus_unregister(void)
|
|||
* @param handle A pointer to moal_handle structure
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
woal_sdiommc_unregister_dev(moal_handle *handle)
|
||||
static void woal_sdiommc_unregister_dev(moal_handle *handle)
|
||||
{
|
||||
ENTER();
|
||||
if (handle->card) {
|
||||
|
@ -1120,8 +1117,7 @@ woal_sdiommc_unregister_dev(moal_handle *handle)
|
|||
* @param handle A pointer to moal_handle structure
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_sdiommc_register_dev(moal_handle *handle)
|
||||
static mlan_status woal_sdiommc_register_dev(moal_handle *handle)
|
||||
{
|
||||
int ret = MLAN_STATUS_SUCCESS;
|
||||
struct sdio_mmc_card *card = handle->card;
|
||||
|
@ -1172,8 +1168,7 @@ release_host:
|
|||
* @param option TRUE--on , FALSE--off
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
int
|
||||
woal_sdio_set_bus_clock(moal_handle *handle, t_u8 option)
|
||||
int woal_sdio_set_bus_clock(moal_handle *handle, t_u8 option)
|
||||
{
|
||||
struct sdio_mmc_card *cardp = (struct sdio_mmc_card *)handle->card;
|
||||
struct mmc_host *host = cardp->func->card->host;
|
||||
|
@ -1196,7 +1191,8 @@ woal_sdio_set_bus_clock(moal_handle *handle, t_u8 option)
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief This function updates card reg based on the Cmd52 value in dev structure
|
||||
* @brief This function updates card reg based on the Cmd52 value in dev
|
||||
* structure
|
||||
*
|
||||
* @param handle A pointer to moal_handle structure
|
||||
* @param func A pointer to store func variable
|
||||
|
@ -1204,8 +1200,7 @@ woal_sdio_set_bus_clock(moal_handle *handle, t_u8 option)
|
|||
* @param val A pointer to store val variable
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
int
|
||||
woal_sdio_read_write_cmd52(moal_handle *handle, int func, int reg, int val)
|
||||
int woal_sdio_read_write_cmd52(moal_handle *handle, int func, int reg, int val)
|
||||
{
|
||||
int ret = MLAN_STATUS_SUCCESS;
|
||||
struct sdio_mmc_card *card = (struct sdio_mmc_card *)handle->card;
|
||||
|
@ -1258,8 +1253,7 @@ woal_sdio_read_write_cmd52(moal_handle *handle, int func, int reg, int val)
|
|||
* @return MTRUE/MFALSE
|
||||
*
|
||||
*/
|
||||
static t_u8
|
||||
woal_sdiommc_is_second_mac(moal_handle *handle)
|
||||
static t_u8 woal_sdiommc_is_second_mac(moal_handle *handle)
|
||||
{
|
||||
#ifdef SD9098
|
||||
struct sdio_mmc_card *card = (struct sdio_mmc_card *)handle->card;
|
||||
|
@ -1269,8 +1263,7 @@ woal_sdiommc_is_second_mac(moal_handle *handle)
|
|||
return MFALSE;
|
||||
}
|
||||
|
||||
static mlan_status
|
||||
woal_sdiommc_get_fw_name(moal_handle *handle)
|
||||
static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#ifdef SD9098
|
||||
|
@ -1279,7 +1272,8 @@ woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
t_u32 revision_id = 0;
|
||||
t_u32 rev_id_reg = handle->card_info->rev_id_reg;
|
||||
|
||||
#if defined(SD8987) || defined(SD8997) || defined(SD9098) || defined(SD9097) || defined(SD8978)
|
||||
#if defined(SD8987) || defined(SD8997) || defined(SD9098) || \
|
||||
defined(SD9097) || defined(SD8978)
|
||||
t_u32 magic_reg = handle->card_info->magic_reg;
|
||||
t_u32 magic = 0;
|
||||
t_u32 host_strap_reg = handle->card_info->host_strap_reg;
|
||||
|
@ -1294,7 +1288,8 @@ woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
woal_sdiommc_read_reg(handle, rev_id_reg, &revision_id);
|
||||
PRINTM(MCMND, "revision_id=0x%x\n", revision_id);
|
||||
|
||||
#if defined(SD8987) || defined(SD8997) || defined(SD9098) || defined(SD9097) || defined(SD8978)
|
||||
#if defined(SD8987) || defined(SD8997) || defined(SD9098) || \
|
||||
defined(SD9097) || defined(SD8978)
|
||||
/** Revision ID register */
|
||||
woal_sdiommc_read_reg(handle, magic_reg, &magic);
|
||||
/** Revision ID register */
|
||||
|
@ -1404,6 +1399,7 @@ woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
break;
|
||||
case SD9098_A0:
|
||||
case SD9098_A1:
|
||||
case SD9098_A2:
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_SD_UART)
|
||||
strcpy(handle->card_info->fw_name,
|
||||
|
@ -1498,8 +1494,8 @@ memory_type_mapping mem_type_mapping_tbl[] = {
|
|||
{"EXT13", NULL, NULL, 0xFD, 0},
|
||||
{"EXTLAST", NULL, NULL, 0xFE, 0},
|
||||
};
|
||||
memory_type_mapping mem_type_mapping_tbl_8977_8997 =
|
||||
{ "DUMP", NULL, NULL, 0xDD, 0 };
|
||||
memory_type_mapping mem_type_mapping_tbl_8977_8997 = {"DUMP", NULL, NULL, 0xDD,
|
||||
0};
|
||||
|
||||
typedef enum {
|
||||
RDWR_STATUS_SUCCESS = 0,
|
||||
|
@ -1515,8 +1511,7 @@ typedef enum {
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
rdwr_status
|
||||
woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
||||
rdwr_status woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
||||
{
|
||||
int ret = 0;
|
||||
int tries = 0;
|
||||
|
@ -1565,10 +1560,8 @@ woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_dump_firmware_info_v2(moal_handle *phandle)
|
||||
void woal_dump_firmware_info_v2(moal_handle *phandle)
|
||||
{
|
||||
|
||||
int ret = 0;
|
||||
unsigned int reg, reg_start, reg_end;
|
||||
t_u8 *dbg_ptr = NULL;
|
||||
|
@ -1582,14 +1575,19 @@ woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
t_u32 memory_size = 0;
|
||||
t_u8 path_name[64], file_name[32], firmware_dump_file[128];
|
||||
t_u8 *end_ptr = NULL;
|
||||
t_u8 dbg_dump_start_reg = phandle->card_info->dump_fw_start_reg;
|
||||
t_u8 dbg_dump_end_reg = phandle->card_info->dump_fw_end_reg;
|
||||
t_u8 dbg_dump_ctrl_reg = phandle->card_info->dump_fw_ctrl_reg;
|
||||
t_u8 dbg_dump_start_reg = 0;
|
||||
t_u8 dbg_dump_end_reg = 0;
|
||||
t_u8 dbg_dump_ctrl_reg = 0;
|
||||
|
||||
if (!phandle) {
|
||||
PRINTM(MERROR, "Could not dump firmwware info\n");
|
||||
return;
|
||||
}
|
||||
|
||||
dbg_dump_start_reg = phandle->card_info->dump_fw_start_reg;
|
||||
dbg_dump_end_reg = phandle->card_info->dump_fw_end_reg;
|
||||
dbg_dump_ctrl_reg = phandle->card_info->dump_fw_ctrl_reg;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directort*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
|
@ -1643,9 +1641,9 @@ woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
} else {
|
||||
PRINTM(MMSG, "%s_SIZE=0x%x\n",
|
||||
mem_type_mapping_tbl[idx].mem_name, memory_size);
|
||||
ret = moal_vmalloc(phandle, memory_size + 1,
|
||||
(t_u8 **)&mem_type_mapping_tbl[idx].
|
||||
mem_Ptr);
|
||||
ret = moal_vmalloc(
|
||||
phandle, memory_size + 1,
|
||||
(t_u8 **)&mem_type_mapping_tbl[idx].mem_Ptr);
|
||||
if ((ret != MLAN_STATUS_SUCCESS) ||
|
||||
!mem_type_mapping_tbl[idx].mem_Ptr) {
|
||||
PRINTM(MERROR,
|
||||
|
@ -1679,23 +1677,23 @@ woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
"pre-allocced buf is not enough\n");
|
||||
}
|
||||
if (RDWR_STATUS_DONE == stat) {
|
||||
PRINTM(MMSG, "%s done:"
|
||||
PRINTM(MMSG,
|
||||
"%s done:"
|
||||
#ifdef MLAN_64BIT
|
||||
"size = 0x%lx\n",
|
||||
#else
|
||||
"size = 0x%x\n",
|
||||
#endif
|
||||
mem_type_mapping_tbl[idx].mem_name,
|
||||
dbg_ptr -
|
||||
mem_type_mapping_tbl[idx].mem_Ptr);
|
||||
dbg_ptr - mem_type_mapping_tbl[idx]
|
||||
.mem_Ptr);
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
sprintf(file_name, "%s%s", "file_sdio_",
|
||||
mem_type_mapping_tbl[idx].mem_name);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name,
|
||||
file_name,
|
||||
mem_type_mapping_tbl
|
||||
[idx].mem_Ptr,
|
||||
woal_save_dump_info_to_file(
|
||||
path_name, file_name,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr,
|
||||
memory_size))
|
||||
PRINTM(MERROR,
|
||||
"Can't save dump file %s in %s\n",
|
||||
|
@ -1733,10 +1731,8 @@ done:
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_dump_firmware_info_v3(moal_handle *phandle)
|
||||
void woal_dump_firmware_info_v3(moal_handle *phandle)
|
||||
{
|
||||
|
||||
int ret = 0;
|
||||
int tries = 0;
|
||||
unsigned int reg, reg_start, reg_end;
|
||||
|
@ -1750,8 +1746,8 @@ woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
t_u8 path_name[64], file_name[32], firmware_dump_file[128];
|
||||
moal_handle *ref_handle;
|
||||
t_u8 *end_ptr = NULL;
|
||||
t_u8 dbg_dump_start_reg = phandle->card_info->dump_fw_start_reg;
|
||||
t_u8 dbg_dump_end_reg = phandle->card_info->dump_fw_end_reg;
|
||||
t_u8 dbg_dump_start_reg = 0;
|
||||
t_u8 dbg_dump_end_reg = 0;
|
||||
memory_type_mapping *pmem_type_mapping_tbl =
|
||||
&mem_type_mapping_tbl_8977_8997;
|
||||
|
||||
|
@ -1759,6 +1755,10 @@ woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
PRINTM(MERROR, "Could not dump firmwware info\n");
|
||||
return;
|
||||
}
|
||||
|
||||
dbg_dump_start_reg = phandle->card_info->dump_fw_start_reg;
|
||||
dbg_dump_end_reg = phandle->card_info->dump_fw_end_reg;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directort*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
|
@ -1796,7 +1796,6 @@ woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
PRINTM(MMSG, "FW not ready to dump\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
}
|
||||
memory_size = 0xF0000;
|
||||
PRINTM(MMSG, "%s_SIZE=0x%x\n", pmem_type_mapping_tbl->mem_name,
|
||||
|
@ -1846,17 +1845,16 @@ woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
pmem_type_mapping_tbl->mem_Ptr);
|
||||
pmem_type_mapping_tbl->mem_Ptr = temp_Ptr;
|
||||
temp_Ptr = NULL;
|
||||
dbg_ptr =
|
||||
pmem_type_mapping_tbl->mem_Ptr +
|
||||
dbg_ptr = pmem_type_mapping_tbl->mem_Ptr +
|
||||
memory_size;
|
||||
memory_size += 0x4000;
|
||||
end_ptr =
|
||||
pmem_type_mapping_tbl->mem_Ptr +
|
||||
end_ptr = pmem_type_mapping_tbl->mem_Ptr +
|
||||
memory_size;
|
||||
}
|
||||
}
|
||||
if (RDWR_STATUS_DONE == stat) {
|
||||
PRINTM(MMSG, "%s done:"
|
||||
PRINTM(MMSG,
|
||||
"%s done:"
|
||||
#ifdef MLAN_64BIT
|
||||
"size = 0x%lx\n",
|
||||
#else
|
||||
|
@ -1868,12 +1866,10 @@ woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
sprintf(file_name, "%s%s", "file_sdio_",
|
||||
pmem_type_mapping_tbl->mem_name);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name, file_name,
|
||||
pmem_type_mapping_tbl->
|
||||
mem_Ptr,
|
||||
dbg_ptr -
|
||||
pmem_type_mapping_tbl->
|
||||
mem_Ptr))
|
||||
woal_save_dump_info_to_file(
|
||||
path_name, file_name,
|
||||
pmem_type_mapping_tbl->mem_Ptr,
|
||||
dbg_ptr - pmem_type_mapping_tbl->mem_Ptr))
|
||||
PRINTM(MERROR,
|
||||
"Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
|
@ -1906,8 +1902,7 @@ done:
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
woal_sdiommc_reg_dbg(moal_handle *phandle)
|
||||
static void woal_sdiommc_reg_dbg(moal_handle *phandle)
|
||||
{
|
||||
int ret = 0;
|
||||
t_u8 loop, index = 0, func, data;
|
||||
|
@ -1980,8 +1975,7 @@ woal_sdiommc_reg_dbg(moal_handle *phandle)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
woal_sdiommc_dump_fw_info(moal_handle *phandle)
|
||||
static void woal_sdiommc_dump_fw_info(moal_handle *phandle)
|
||||
{
|
||||
if (!phandle) {
|
||||
PRINTM(MERROR, "Could not dump firmwware info\n");
|
||||
|
@ -2008,16 +2002,15 @@ woal_sdiommc_dump_fw_info(moal_handle *phandle)
|
|||
*
|
||||
* @return The length of this log
|
||||
*/
|
||||
static int
|
||||
woal_sdiommc_dump_reg_info(moal_handle *phandle, t_u8 *drv_buf)
|
||||
static int woal_sdiommc_dump_reg_info(moal_handle *phandle, t_u8 *drv_buf)
|
||||
{
|
||||
char *drv_ptr = (char *)drv_buf;
|
||||
int ret = 0;
|
||||
t_u8 loop, index = 0, func, data;
|
||||
unsigned int reg, reg_start, reg_end;
|
||||
unsigned int scratch_reg = phandle->card_info->scratch_reg;
|
||||
t_u8 *reg_table = phandle->card_info->dump_reg.reg_table;
|
||||
t_u8 reg_table_size = phandle->card_info->dump_reg.reg_table_size;
|
||||
unsigned int scratch_reg = 0;
|
||||
t_u8 *reg_table = NULL;
|
||||
t_u8 reg_table_size = 0;
|
||||
char buf[256], *ptr;
|
||||
|
||||
ENTER();
|
||||
|
@ -2027,6 +2020,11 @@ woal_sdiommc_dump_reg_info(moal_handle *phandle, t_u8 *drv_buf)
|
|||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
|
||||
scratch_reg = phandle->card_info->scratch_reg;
|
||||
reg_table = phandle->card_info->dump_reg.reg_table;
|
||||
reg_table_size = phandle->card_info->dump_reg.reg_table_size;
|
||||
|
||||
mlan_pm_wakeup_card(phandle->pmlan_adapter, MTRUE);
|
||||
|
||||
drv_ptr += sprintf(drv_ptr, "--------sdio_reg_debug_info---------\n");
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,17 +21,17 @@
|
|||
*
|
||||
*/
|
||||
/*************************************************************
|
||||
Change Log:
|
||||
10/21/2008: initial version
|
||||
* Change Log:
|
||||
* 10/21/2008: initial version
|
||||
************************************************************/
|
||||
|
||||
#ifndef _MOAL_H
|
||||
#define _MOAL_H
|
||||
|
||||
mlan_status moal_get_fw_data(IN t_void *pmoal_handle,
|
||||
IN t_u32 offset, IN t_u32 len, OUT t_u8 *pbuf);
|
||||
mlan_status moal_get_vdll_data(IN t_void *pmoal_handle,
|
||||
mlan_status moal_get_fw_data(IN t_void *pmoal_handle, IN t_u32 offset,
|
||||
IN t_u32 len, OUT t_u8 *pbuf);
|
||||
mlan_status moal_get_vdll_data(IN t_void *pmoal_handle, IN t_u32 len,
|
||||
OUT t_u8 *pbuf);
|
||||
mlan_status moal_get_hw_spec_complete(IN t_void *pmoal_handle,
|
||||
IN mlan_status status,
|
||||
IN mlan_hw_info *phw,
|
||||
|
@ -51,8 +51,7 @@ mlan_status moal_send_packet_complete(IN t_void *pmoal_handle,
|
|||
IN pmlan_buffer pmbuf,
|
||||
IN mlan_status status);
|
||||
#ifdef USB
|
||||
mlan_status moal_recv_complete(IN t_void *pmoal_handle,
|
||||
IN pmlan_buffer pmbuf,
|
||||
mlan_status moal_recv_complete(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf,
|
||||
IN t_u32 port, IN mlan_status status);
|
||||
mlan_status moal_write_data_async(IN t_void *pmoal_handle,
|
||||
IN pmlan_buffer pmbuf, IN t_u32 port);
|
||||
|
@ -60,53 +59,47 @@ mlan_status moal_write_data_async(IN t_void *pmoal_handle,
|
|||
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
/** moal_write_reg */
|
||||
mlan_status moal_write_reg(IN t_void *pmoal_handle,
|
||||
IN t_u32 reg, IN t_u32 data);
|
||||
mlan_status moal_write_reg(IN t_void *pmoal_handle, IN t_u32 reg,
|
||||
IN t_u32 data);
|
||||
/** moal_read_reg */
|
||||
mlan_status moal_read_reg(IN t_void *pmoal_handle,
|
||||
IN t_u32 reg, OUT t_u32 *data);
|
||||
mlan_status moal_read_reg(IN t_void *pmoal_handle, IN t_u32 reg,
|
||||
OUT t_u32 *data);
|
||||
#endif /* SDIO || PCIE */
|
||||
mlan_status moal_write_data_sync(IN t_void *pmoal_handle,
|
||||
IN pmlan_buffer pmbuf,
|
||||
mlan_status moal_write_data_sync(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf,
|
||||
IN t_u32 port, IN t_u32 timeout);
|
||||
mlan_status moal_read_data_sync(IN t_void *pmoal_handle,
|
||||
IN OUT pmlan_buffer pmbuf,
|
||||
IN t_u32 port, IN t_u32 timeout);
|
||||
IN OUT pmlan_buffer pmbuf, IN t_u32 port,
|
||||
IN t_u32 timeout);
|
||||
mlan_status moal_recv_packet(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf);
|
||||
mlan_status moal_recv_event(IN t_void *pmoal_handle, IN pmlan_event pmevent);
|
||||
mlan_status moal_malloc(IN t_void *pmoal_handle,
|
||||
IN t_u32 size, IN t_u32 flag, OUT t_u8 **ppbuf);
|
||||
mlan_status moal_malloc(IN t_void *pmoal_handle, IN t_u32 size, IN t_u32 flag,
|
||||
OUT t_u8 **ppbuf);
|
||||
mlan_status moal_mfree(IN t_void *pmoal_handle, IN t_u8 *pbuf);
|
||||
mlan_status moal_vmalloc(IN t_void *pmoal_handle,
|
||||
IN t_u32 size, OUT t_u8 **ppbuf);
|
||||
mlan_status moal_vmalloc(IN t_void *pmoal_handle, IN t_u32 size,
|
||||
OUT t_u8 **ppbuf);
|
||||
mlan_status moal_vfree(IN t_void *pmoal_handle, IN t_u8 *pbuf);
|
||||
#ifdef PCIE
|
||||
mlan_status moal_malloc_consistent(IN t_void *pmoal_handle,
|
||||
IN t_u32 size,
|
||||
mlan_status moal_malloc_consistent(IN t_void *pmoal_handle, IN t_u32 size,
|
||||
OUT t_u8 **ppbuf, OUT t_u64 *pbuf_pa);
|
||||
mlan_status moal_mfree_consistent(IN t_void *pmoal_handle,
|
||||
IN t_u32 size,
|
||||
mlan_status moal_mfree_consistent(IN t_void *pmoal_handle, IN t_u32 size,
|
||||
IN t_u8 *pbuf, IN t_u64 buf_pa);
|
||||
mlan_status moal_map_memory(IN t_void *pmoal_handle,
|
||||
IN t_u8 *pbuf,
|
||||
mlan_status moal_map_memory(IN t_void *pmoal_handle, IN t_u8 *pbuf,
|
||||
OUT t_u64 *pbuf_pa, IN t_u32 size, IN t_u32 flag);
|
||||
mlan_status moal_unmap_memory(IN t_void *pmoal_handle,
|
||||
IN t_u8 *pbuf,
|
||||
mlan_status moal_unmap_memory(IN t_void *pmoal_handle, IN t_u8 *pbuf,
|
||||
IN t_u64 buf_pa, IN t_u32 size, IN t_u32 flag);
|
||||
#endif /* PCIE */
|
||||
t_void *moal_memset(IN t_void *pmoal_handle,
|
||||
IN t_void *pmem, IN t_u8 byte, IN t_u32 num);
|
||||
t_void *moal_memcpy(IN t_void *pmoal_handle,
|
||||
IN t_void *pdest, IN const t_void *psrc, IN t_u32 num);
|
||||
t_void *moal_memcpy_ext(IN t_void *pmoal_handle,
|
||||
IN t_void *pdest,
|
||||
IN const t_void *psrc,
|
||||
IN t_u32 num, IN t_u32 dest_size);
|
||||
t_void *moal_memset(IN t_void *pmoal_handle, IN t_void *pmem, IN t_u8 byte,
|
||||
IN t_u32 num);
|
||||
t_void *moal_memcpy(IN t_void *pmoal_handle, IN t_void *pdest,
|
||||
IN const t_void *psrc, IN t_u32 num);
|
||||
t_void *moal_memcpy_ext(IN t_void *pmoal_handle, IN t_void *pdest,
|
||||
IN const t_void *psrc, IN t_u32 num,
|
||||
IN t_u32 dest_size);
|
||||
|
||||
t_void *moal_memmove(IN t_void *pmoal_handle,
|
||||
IN t_void *pdest, IN const t_void *psrc, IN t_u32 num);
|
||||
t_s32 moal_memcmp(IN t_void *pmoal_handle,
|
||||
IN const t_void *pmem1, IN const t_void *pmem2, IN t_u32 num);
|
||||
t_void *moal_memmove(IN t_void *pmoal_handle, IN t_void *pdest,
|
||||
IN const t_void *psrc, IN t_u32 num);
|
||||
t_s32 moal_memcmp(IN t_void *pmoal_handle, IN const t_void *pmem1,
|
||||
IN const t_void *pmem2, IN t_u32 num);
|
||||
/** moal_udelay */
|
||||
t_void moal_udelay(IN t_void *pmoal_handle, IN t_u32 udelay);
|
||||
mlan_status moal_get_boot_ktime(IN t_void *pmoal_handle, OUT t_u64 *pnsec);
|
||||
|
@ -133,13 +126,11 @@ t_void moal_hist_data_add(IN t_void *pmoal_handle, IN t_u32 bss_index,
|
|||
|
||||
t_u64 moal_do_div(IN t_u64 num, IN t_u32 base);
|
||||
|
||||
mlan_status moal_init_timer(IN t_void *pmoal_handle,
|
||||
OUT t_void **pptimer,
|
||||
mlan_status moal_init_timer(IN t_void *pmoal_handle, OUT t_void **pptimer,
|
||||
IN t_void (*callback)(t_void *pcontext),
|
||||
IN t_void *pcontext);
|
||||
mlan_status moal_free_timer(IN t_void *pmoal_handle, IN t_void *ptimer);
|
||||
mlan_status moal_start_timer(IN t_void *pmoal_handle,
|
||||
IN t_void *ptimer,
|
||||
mlan_status moal_start_timer(IN t_void *pmoal_handle, IN t_void *ptimer,
|
||||
IN t_u8 periodic, IN t_u32 msec);
|
||||
mlan_status moal_stop_timer(IN t_void *pmoal_handle, IN t_void *ptimer);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -28,16 +28,14 @@
|
|||
|
||||
mlan_status woal_register_sta_cfg80211(struct net_device *dev, t_u8 bss_type);
|
||||
|
||||
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,
|
||||
const t_u8 *seq, int seq_len, t_u8 key_index,
|
||||
const t_u8 *addr, int disable, t_u8 wait_option);
|
||||
const t_u8 *addr, int disable,
|
||||
t_u8 wait_option);
|
||||
|
||||
mlan_status
|
||||
|
||||
woal_cfg80211_set_wep_keys(moal_private *priv, const t_u8 *key, int key_len,
|
||||
t_u8 index, t_u8 wait_option);
|
||||
mlan_status woal_cfg80211_set_wep_keys(moal_private *priv, const t_u8 *key,
|
||||
int key_len, t_u8 index,
|
||||
t_u8 wait_option);
|
||||
|
||||
#endif /* _MOAL_STA_CFG80211_H_ */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -413,9 +413,11 @@ typedef struct _band_steer_para {
|
|||
t_u8 action;
|
||||
/** enable/disable band steering*/
|
||||
t_u8 state;
|
||||
/** Probe Response will be blocked to 2G channel for first block_2g_prb_req probe requests*/
|
||||
/** Probe Response will be blocked to 2G channel for first
|
||||
* block_2g_prb_req probe requests*/
|
||||
t_u8 block_2g_prb_req;
|
||||
/** When band steering is enabled, limit the btm request sent to STA at <max_btm_req_allowed>*/
|
||||
/** When band steering is enabled, limit the btm request sent to STA at
|
||||
* <max_btm_req_allowed>*/
|
||||
t_u8 max_btm_req_allowed;
|
||||
|
||||
} band_steer_para;
|
||||
|
@ -505,8 +507,8 @@ typedef struct _domain_info_param {
|
|||
#define MAX_SUB_BANDS 40
|
||||
|
||||
/** MAX domain TLV length */
|
||||
#define MAX_DOMAIN_TLV_LEN (TLV_HEADER_LEN + COUNTRY_CODE_LEN \
|
||||
+ (SUB_BAND_LEN * MAX_SUB_BANDS))
|
||||
#define MAX_DOMAIN_TLV_LEN \
|
||||
(TLV_HEADER_LEN + COUNTRY_CODE_LEN + (SUB_BAND_LEN * MAX_SUB_BANDS))
|
||||
|
||||
int woal_set_get_uap_power_mode(moal_private *priv, t_u32 action,
|
||||
mlan_ds_ps_mgmt *ps_mgmt);
|
||||
|
@ -536,8 +538,8 @@ int woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd);
|
|||
/** Set invalid data for each member of mlan_uap_bss_param */
|
||||
void woal_set_sys_config_invalid_data(mlan_uap_bss_param *config);
|
||||
/** Set/Get system configuration parameters */
|
||||
mlan_status woal_set_get_sys_config(moal_private *priv,
|
||||
t_u16 action, t_u8 wait_option,
|
||||
mlan_status woal_set_get_sys_config(moal_private *priv, t_u16 action,
|
||||
t_u8 wait_option,
|
||||
mlan_uap_bss_param *sys_cfg);
|
||||
/** Set get AP wmm parameter */
|
||||
mlan_status woal_set_get_ap_wmm_para(moal_private *priv, t_u16 action,
|
||||
|
@ -545,8 +547,7 @@ mlan_status woal_set_get_ap_wmm_para(moal_private *priv, t_u16 action,
|
|||
int woal_uap_set_ap_cfg(moal_private *priv, t_u8 *data, int len);
|
||||
int woal_uap_set_11ac_status(moal_private *priv, t_u8 action, t_u8 vht20_40,
|
||||
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);
|
||||
int woal_uap_set_11ax_status(moal_private *priv, t_u8 action, t_u8 band,
|
||||
IEEEtypes_HECap_t *hecap_ie);
|
||||
int woal_set_uap_ht_tx_cfg(moal_private *priv, Band_Config_t bandcfg, t_u8 en);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -54,8 +54,7 @@ Change log:
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
int
|
||||
woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
||||
int woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
||||
{
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
struct iwreq *wrq = (struct iwreq *)req;
|
||||
|
@ -162,8 +161,7 @@ woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_ioctl_get_uap_info_resp(moal_private *priv, mlan_ds_get_info *info)
|
||||
void woal_ioctl_get_uap_info_resp(moal_private *priv, mlan_ds_get_info *info)
|
||||
{
|
||||
ENTER();
|
||||
switch (info->sub_command) {
|
||||
|
|
|
@ -86,110 +86,43 @@ Change log:
|
|||
* iwpriv ioctl handlers
|
||||
*/
|
||||
static const struct iw_priv_args woal_uap_priv_args[] = {
|
||||
{
|
||||
WOAL_UAP_SETNONE_GETNONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
""},
|
||||
{
|
||||
WOAL_UAP_START,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
"start"},
|
||||
{
|
||||
WOAL_UAP_STOP,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
"stop"},
|
||||
{
|
||||
WOAL_AP_BSS_START,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
"bssstart"},
|
||||
{
|
||||
WOAL_AP_BSS_STOP,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
"bssstop"},
|
||||
{
|
||||
WOAL_UAP_SETONEINT_GETWORDCHAR,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_CHAR | 128,
|
||||
""},
|
||||
{
|
||||
WOAL_UAP_VERSION,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_CHAR | 128,
|
||||
{WOAL_UAP_SETNONE_GETNONE, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, ""},
|
||||
{WOAL_UAP_START, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "start"},
|
||||
{WOAL_UAP_STOP, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "stop"},
|
||||
{WOAL_AP_BSS_START, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "bssstart"},
|
||||
{WOAL_AP_BSS_STOP, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "bssstop"},
|
||||
{WOAL_UAP_SETONEINT_GETWORDCHAR, IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_CHAR | 128, ""},
|
||||
{WOAL_UAP_VERSION, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_CHAR | 128,
|
||||
"version"},
|
||||
{
|
||||
WOAL_UAP_VEREXT,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_CHAR | 128,
|
||||
{WOAL_UAP_VEREXT, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_CHAR | 128,
|
||||
"verext"},
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
{
|
||||
WOAL_UAP_SETONEINT_GETONEINT,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
""},
|
||||
{
|
||||
WOAL_UAP_SET_GET_BSS_ROLE,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1,
|
||||
{WOAL_UAP_SETONEINT_GETONEINT, IW_PRIV_TYPE_INT | 1,
|
||||
IW_PRIV_TYPE_INT | 1, ""},
|
||||
{WOAL_UAP_SET_GET_BSS_ROLE, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"bssrole"},
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
WOAL_UAP_SET_GET_256_CHAR,
|
||||
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_UAP_SET_GET_256_CHAR, IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256, ""},
|
||||
{WOAL_WL_FW_RELOAD, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256,
|
||||
"fwreload"},
|
||||
{
|
||||
WOAL_AP_SET_CFG,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
{WOAL_AP_SET_CFG, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256,
|
||||
"apcfg"},
|
||||
{
|
||||
WOAL_UAP_HOST_CMD,
|
||||
IW_PRIV_TYPE_BYTE | 2047,
|
||||
IW_PRIV_TYPE_BYTE | 2047,
|
||||
{WOAL_UAP_HOST_CMD, IW_PRIV_TYPE_BYTE | 2047, IW_PRIV_TYPE_BYTE | 2047,
|
||||
"hostcmd"},
|
||||
{
|
||||
WOAL_UAP_FROYO_START,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
"START"},
|
||||
{
|
||||
WOAL_UAP_FROYO_STOP,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
"STOP"},
|
||||
{
|
||||
WOAL_UAP_FROYO_AP_BSS_START,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
{WOAL_UAP_FROYO_START, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "START"},
|
||||
{WOAL_UAP_FROYO_STOP, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "STOP"},
|
||||
{WOAL_UAP_FROYO_AP_BSS_START, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE,
|
||||
"AP_BSS_START"},
|
||||
{
|
||||
WOAL_UAP_FROYO_AP_BSS_STOP,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
IW_PRIV_TYPE_NONE,
|
||||
{WOAL_UAP_FROYO_AP_BSS_STOP, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE,
|
||||
"AP_BSS_STOP"},
|
||||
{
|
||||
WOAL_UAP_FROYO_WL_FW_RELOAD,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
"WL_FW_RELOAD"},
|
||||
{
|
||||
WOAL_UAP_FROYO_AP_SET_CFG,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256,
|
||||
"AP_SET_CFG"},
|
||||
{WOAL_UAP_FROYO_WL_FW_RELOAD, IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256, "WL_FW_RELOAD"},
|
||||
{WOAL_UAP_FROYO_AP_SET_CFG, IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256, "AP_SET_CFG"},
|
||||
};
|
||||
|
||||
#endif /* _MOAL_UAP_PRIV_H_ */
|
||||
|
|
|
@ -43,62 +43,20 @@ typedef struct _chan_to_freq_t {
|
|||
} chan_to_freq_t;
|
||||
|
||||
const chan_to_freq_t chan_to_freq[] = {
|
||||
{1, 2412, 0},
|
||||
{2, 2417, 0},
|
||||
{3, 2422, 0},
|
||||
{4, 2427, 0},
|
||||
{5, 2432, 0},
|
||||
{6, 2437, 0},
|
||||
{7, 2442, 0},
|
||||
{8, 2447, 0},
|
||||
{9, 2452, 0},
|
||||
{10, 2457, 0},
|
||||
{11, 2462, 0},
|
||||
{12, 2467, 0},
|
||||
{13, 2472, 0},
|
||||
{14, 2484, 0},
|
||||
{183, 4915, 1},
|
||||
{184, 4920, 1},
|
||||
{185, 4925, 1},
|
||||
{187, 4935, 1},
|
||||
{188, 4940, 1},
|
||||
{189, 4945, 1},
|
||||
{192, 4960, 1},
|
||||
{196, 4980, 1},
|
||||
{7, 5035, 1},
|
||||
{8, 5040, 1},
|
||||
{9, 5045, 1},
|
||||
{11, 5055, 1},
|
||||
{12, 5060, 1},
|
||||
{16, 5080, 1},
|
||||
{34, 5170, 1},
|
||||
{36, 5180, 1},
|
||||
{38, 5190, 1},
|
||||
{40, 5200, 1},
|
||||
{42, 5210, 1},
|
||||
{44, 5220, 1},
|
||||
{46, 5230, 1},
|
||||
{48, 5240, 1},
|
||||
{52, 5260, 1},
|
||||
{56, 5280, 1},
|
||||
{60, 5300, 1},
|
||||
{64, 5320, 1},
|
||||
{100, 5500, 1},
|
||||
{104, 5520, 1},
|
||||
{108, 5540, 1},
|
||||
{112, 5560, 1},
|
||||
{116, 5580, 1},
|
||||
{120, 5600, 1},
|
||||
{124, 5620, 1},
|
||||
{128, 5640, 1},
|
||||
{132, 5660, 1},
|
||||
{136, 5680, 1},
|
||||
{140, 5700, 1},
|
||||
{144, 5720, 1},
|
||||
{149, 5745, 1},
|
||||
{153, 5765, 1},
|
||||
{157, 5785, 1},
|
||||
{161, 5805, 1},
|
||||
{1, 2412, 0}, {2, 2417, 0}, {3, 2422, 0}, {4, 2427, 0},
|
||||
{5, 2432, 0}, {6, 2437, 0}, {7, 2442, 0}, {8, 2447, 0},
|
||||
{9, 2452, 0}, {10, 2457, 0}, {11, 2462, 0}, {12, 2467, 0},
|
||||
{13, 2472, 0}, {14, 2484, 0}, {183, 4915, 1}, {184, 4920, 1},
|
||||
{185, 4925, 1}, {187, 4935, 1}, {188, 4940, 1}, {189, 4945, 1},
|
||||
{192, 4960, 1}, {196, 4980, 1}, {7, 5035, 1}, {8, 5040, 1},
|
||||
{9, 5045, 1}, {11, 5055, 1}, {12, 5060, 1}, {16, 5080, 1},
|
||||
{34, 5170, 1}, {36, 5180, 1}, {38, 5190, 1}, {40, 5200, 1},
|
||||
{42, 5210, 1}, {44, 5220, 1}, {46, 5230, 1}, {48, 5240, 1},
|
||||
{52, 5260, 1}, {56, 5280, 1}, {60, 5300, 1}, {64, 5320, 1},
|
||||
{100, 5500, 1}, {104, 5520, 1}, {108, 5540, 1}, {112, 5560, 1},
|
||||
{116, 5580, 1}, {120, 5600, 1}, {124, 5620, 1}, {128, 5640, 1},
|
||||
{132, 5660, 1}, {136, 5680, 1}, {140, 5700, 1}, {144, 5720, 1},
|
||||
{149, 5745, 1}, {153, 5765, 1}, {157, 5785, 1}, {161, 5805, 1},
|
||||
{165, 5825, 1},
|
||||
};
|
||||
|
||||
|
@ -117,8 +75,7 @@ const chan_to_freq_t chan_to_freq[] = {
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void
|
||||
woal_sort_channels(struct iw_freq *freq, int num)
|
||||
static inline void woal_sort_channels(struct iw_freq *freq, int num)
|
||||
{
|
||||
int i, j;
|
||||
struct iw_freq temp;
|
||||
|
@ -145,8 +102,7 @@ woal_sort_channels(struct iw_freq *freq, int num)
|
|||
*
|
||||
* @return freq
|
||||
*/
|
||||
static int
|
||||
channel_to_frequency(t_u16 channel, t_u8 band)
|
||||
static int channel_to_frequency(t_u16 channel, t_u8 band)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
|
@ -172,9 +128,9 @@ channel_to_frequency(t_u16 channel, t_u8 band)
|
|||
*
|
||||
* @return 0 --success
|
||||
*/
|
||||
static int
|
||||
woal_config_commit(struct net_device *dev,
|
||||
struct iw_request_info *info, char *cwrq, char *extra)
|
||||
static int woal_config_commit(struct net_device *dev,
|
||||
struct iw_request_info *info, char *cwrq,
|
||||
char *extra)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -192,8 +148,7 @@ woal_config_commit(struct net_device *dev,
|
|||
*
|
||||
* @return 0 --success
|
||||
*/
|
||||
static int
|
||||
woal_get_name(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_get_name(struct net_device *dev, struct iw_request_info *info,
|
||||
char *cwrq, char *extra)
|
||||
{
|
||||
ENTER();
|
||||
|
@ -212,8 +167,7 @@ woal_get_name(struct net_device *dev, struct iw_request_info *info,
|
|||
*
|
||||
* @return 0 --success
|
||||
*/
|
||||
static int
|
||||
woal_get_wap(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_get_wap(struct net_device *dev, struct iw_request_info *info,
|
||||
struct sockaddr *awrq, char *extra)
|
||||
{
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
|
@ -243,8 +197,7 @@ woal_get_wap(struct net_device *dev, struct iw_request_info *info,
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_set_wap(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_set_wap(struct net_device *dev, struct iw_request_info *info,
|
||||
struct sockaddr *awrq, char *extra)
|
||||
{
|
||||
int ret = 0;
|
||||
|
@ -295,8 +248,7 @@ done:
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_set_freq(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_set_freq(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_freq *fwrq, char *extra)
|
||||
{
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
|
@ -317,8 +269,7 @@ woal_set_freq(struct net_device *dev, struct iw_request_info *info,
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv,
|
||||
MLAN_ACT_GET,
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, MLAN_ACT_GET,
|
||||
MOAL_IOCTL_WAIT,
|
||||
ap_cfg)) {
|
||||
PRINTM(MERROR, "Error getting AP confiruration\n");
|
||||
|
@ -351,8 +302,7 @@ woal_set_freq(struct net_device *dev, struct iw_request_info *info,
|
|||
goto done;
|
||||
}
|
||||
|
||||
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,
|
||||
sys_cfg)) {
|
||||
PRINTM(MERROR, "Error setting AP confiruration\n");
|
||||
|
@ -377,8 +327,7 @@ done:
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_get_freq(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_get_freq(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_freq *fwrq, char *extra)
|
||||
{
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
|
@ -394,8 +343,7 @@ woal_get_freq(struct net_device *dev, struct iw_request_info *info,
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv,
|
||||
MLAN_ACT_GET,
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, MLAN_ACT_GET,
|
||||
MOAL_IOCTL_WAIT,
|
||||
ap_cfg)) {
|
||||
PRINTM(MERROR, "Error getting AP confiruration\n");
|
||||
|
@ -424,9 +372,9 @@ woal_get_freq(struct net_device *dev, struct iw_request_info *info,
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_set_bss_mode(struct net_device *dev, struct iw_request_info *info,
|
||||
t_u32 *uwrq, char *extra)
|
||||
static int woal_set_bss_mode(struct net_device *dev,
|
||||
struct iw_request_info *info, t_u32 *uwrq,
|
||||
char *extra)
|
||||
{
|
||||
int ret = 0;
|
||||
ENTER();
|
||||
|
@ -455,9 +403,9 @@ woal_set_bss_mode(struct net_device *dev, struct iw_request_info *info,
|
|||
*
|
||||
* @return 0 --success
|
||||
*/
|
||||
static int
|
||||
woal_get_bss_mode(struct net_device *dev, struct iw_request_info *info,
|
||||
t_u32 *uwrq, char *extra)
|
||||
static int woal_get_bss_mode(struct net_device *dev,
|
||||
struct iw_request_info *info, t_u32 *uwrq,
|
||||
char *extra)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
|
@ -477,8 +425,7 @@ woal_get_bss_mode(struct net_device *dev, struct iw_request_info *info,
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_set_encode(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_set_encode(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_point *dwrq, char *extra)
|
||||
{
|
||||
int ret = 0;
|
||||
|
@ -509,8 +456,7 @@ woal_set_encode(struct net_device *dev, struct iw_request_info *info,
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv,
|
||||
MLAN_ACT_GET,
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, MLAN_ACT_GET,
|
||||
MOAL_IOCTL_WAIT,
|
||||
ap_cfg)) {
|
||||
PRINTM(MERROR, "Error getting AP confiruration\n");
|
||||
|
@ -554,7 +500,8 @@ woal_set_encode(struct net_device *dev, struct iw_request_info *info,
|
|||
pkey = &sys_cfg->wep_cfg.key2;
|
||||
if (ap_cfg->wep_cfg.key3.is_default)
|
||||
pkey = &sys_cfg->wep_cfg.key3;
|
||||
else { /* Something wrong, select first key as default */
|
||||
else { /* Something wrong, select first key as default
|
||||
*/
|
||||
PRINTM(MERROR,
|
||||
"No default key set! Selecting first key.\n");
|
||||
pkey = &sys_cfg->wep_cfg.key0;
|
||||
|
@ -636,8 +583,7 @@ woal_set_encode(struct net_device *dev, struct iw_request_info *info,
|
|||
}
|
||||
}
|
||||
|
||||
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,
|
||||
sys_cfg)) {
|
||||
PRINTM(MERROR, "Error setting AP confiruration\n");
|
||||
|
@ -662,8 +608,7 @@ done:
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_get_encode(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_get_encode(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_point *dwrq, char *extra)
|
||||
{
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
|
@ -685,8 +630,7 @@ woal_get_encode(struct net_device *dev, struct iw_request_info *info,
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv,
|
||||
MLAN_ACT_GET,
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, MLAN_ACT_GET,
|
||||
MOAL_IOCTL_WAIT,
|
||||
ap_cfg)) {
|
||||
PRINTM(MERROR, "Error getting AP confiruration\n");
|
||||
|
@ -767,8 +711,7 @@ done:
|
|||
*
|
||||
* @return -EOPNOTSUPP
|
||||
*/
|
||||
static int
|
||||
woal_get_gen_ie(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_get_gen_ie(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_point *dwrq, char *extra)
|
||||
{
|
||||
ENTER();
|
||||
|
@ -790,8 +733,7 @@ woal_get_gen_ie(struct net_device *dev, struct iw_request_info *info,
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_point *dwrq, char *extra)
|
||||
{
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
|
@ -882,9 +824,8 @@ woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info,
|
|||
sys_cfg->key_mgmt_operation |= 0x03;
|
||||
|
||||
if (sys_cfg->protocol) {
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv,
|
||||
MLAN_ACT_SET,
|
||||
MOAL_IOCTL_WAIT,
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_set_get_sys_config(priv, MLAN_ACT_SET, MOAL_IOCTL_WAIT,
|
||||
sys_cfg)) {
|
||||
PRINTM(MERROR, "Error setting AP configuration\n");
|
||||
ret = -EFAULT;
|
||||
|
@ -928,8 +869,7 @@ done:
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_set_encode_ext(struct net_device *dev,
|
||||
static int woal_set_encode_ext(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
struct iw_point *dwrq, char *extra)
|
||||
{
|
||||
|
@ -1033,8 +973,9 @@ woal_set_encode_ext(struct net_device *dev,
|
|||
sec->param.encrypt_key.pn, SEQ_MAX_SIZE);
|
||||
}
|
||||
PRINTM(MIOCTL,
|
||||
"set uap wpa key key_index=%d, key_len=%d key_flags=0x%x "
|
||||
MACSTR "\n", key_index, ext->key_len,
|
||||
"set uap wpa key key_index=%d, key_len=%d key_flags=0x%x " MACSTR
|
||||
"\n",
|
||||
key_index, ext->key_len,
|
||||
sec->param.encrypt_key.key_flags,
|
||||
MAC2STR(sec->param.encrypt_key.mac_addr));
|
||||
DBG_HEXDUMP(MCMD_D, "uap wpa key", pkey_material, ext->key_len);
|
||||
|
@ -1051,8 +992,7 @@ woal_set_encode_ext(struct net_device *dev,
|
|||
priv->group_cipher = ext->alg;
|
||||
goto done; /* No AP configuration */
|
||||
}
|
||||
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,
|
||||
sys_cfg)) {
|
||||
PRINTM(MERROR, "Error setting AP confiruration\n");
|
||||
|
@ -1078,8 +1018,7 @@ done:
|
|||
*
|
||||
* @return -EOPNOTSUPP
|
||||
*/
|
||||
static int
|
||||
woal_get_encode_ext(struct net_device *dev,
|
||||
static int woal_get_encode_ext(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
struct iw_point *dwrq, char *extra)
|
||||
{
|
||||
|
@ -1098,9 +1037,8 @@ woal_get_encode_ext(struct net_device *dev,
|
|||
*
|
||||
* @return 0--success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_set_mlme(struct net_device *dev,
|
||||
struct iw_request_info *info, struct iw_point *dwrq, char *extra)
|
||||
static int woal_set_mlme(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_point *dwrq, char *extra)
|
||||
{
|
||||
struct iw_mlme *mlme = (struct iw_mlme *)extra;
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
|
@ -1130,8 +1068,8 @@ woal_set_mlme(struct net_device *dev,
|
|||
/* If deauth all station, get the connected STA list first */
|
||||
if (!memcmp(bc_addr, sta_addr, ETH_ALEN)) {
|
||||
PRINTM(MIOCTL, "Deauth all stations\n");
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof
|
||||
(mlan_ds_get_info));
|
||||
req = woal_alloc_mlan_ioctl_req(
|
||||
sizeof(mlan_ds_get_info));
|
||||
if (req == NULL) {
|
||||
LEAVE();
|
||||
return -ENOMEM;
|
||||
|
@ -1171,13 +1109,12 @@ woal_set_mlme(struct net_device *dev,
|
|||
|
||||
if (sta_list && !memcmp(bc_addr, sta_addr, ETH_ALEN)) {
|
||||
for (i = 0; i < sta_list->sta_count; i++) {
|
||||
moal_memcpy_ext(priv->phandle,
|
||||
bss->param.deauth_param.
|
||||
mac_addr,
|
||||
sta_list->info[i].mac_address,
|
||||
ETH_ALEN,
|
||||
sizeof(bss->param.deauth_param.
|
||||
mac_addr));
|
||||
moal_memcpy_ext(
|
||||
priv->phandle,
|
||||
bss->param.deauth_param.mac_addr,
|
||||
sta_list->info[i].mac_address, ETH_ALEN,
|
||||
sizeof(bss->param.deauth_param
|
||||
.mac_addr));
|
||||
bss->param.deauth_param.reason_code =
|
||||
mlme->reason_code;
|
||||
|
||||
|
@ -1189,11 +1126,10 @@ woal_set_mlme(struct net_device *dev,
|
|||
}
|
||||
}
|
||||
} else {
|
||||
moal_memcpy_ext(priv->phandle,
|
||||
bss->param.deauth_param.mac_addr,
|
||||
moal_memcpy_ext(
|
||||
priv->phandle, bss->param.deauth_param.mac_addr,
|
||||
sta_addr, ETH_ALEN,
|
||||
sizeof(bss->param.deauth_param.
|
||||
mac_addr));
|
||||
sizeof(bss->param.deauth_param.mac_addr));
|
||||
bss->param.deauth_param.reason_code = mlme->reason_code;
|
||||
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
|
@ -1221,8 +1157,7 @@ done:
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_set_auth(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_set_auth(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_param *vwrq, char *extra)
|
||||
{
|
||||
int ret = 0;
|
||||
|
@ -1375,8 +1310,7 @@ woal_set_auth(struct net_device *dev, struct iw_request_info *info,
|
|||
sys_cfg->protocol = priv->uap_protocol;
|
||||
|
||||
/* Set AP configuration */
|
||||
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,
|
||||
sys_cfg)) {
|
||||
PRINTM(MERROR, "Error setting AP confiruration\n");
|
||||
|
@ -1400,8 +1334,7 @@ done:
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_get_auth(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_get_auth(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_param *vwrq, char *extra)
|
||||
{
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
|
@ -1416,8 +1349,7 @@ woal_get_auth(struct net_device *dev, struct iw_request_info *info,
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv,
|
||||
MLAN_ACT_GET,
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, MLAN_ACT_GET,
|
||||
MOAL_IOCTL_WAIT,
|
||||
ap_cfg)) {
|
||||
PRINTM(MERROR, "Error getting AP confiruration\n");
|
||||
|
@ -1430,8 +1362,9 @@ woal_get_auth(struct net_device *dev, struct iw_request_info *info,
|
|||
if (ap_cfg->wpa_cfg.pairwise_cipher_wpa == CIPHER_TKIP ||
|
||||
ap_cfg->wpa_cfg.pairwise_cipher_wpa2 == CIPHER_TKIP)
|
||||
vwrq->value = IW_AUTH_CIPHER_TKIP;
|
||||
else if (ap_cfg->wpa_cfg.pairwise_cipher_wpa == CIPHER_AES_CCMP
|
||||
|| ap_cfg->wpa_cfg.pairwise_cipher_wpa2 ==
|
||||
else if (ap_cfg->wpa_cfg.pairwise_cipher_wpa ==
|
||||
CIPHER_AES_CCMP ||
|
||||
ap_cfg->wpa_cfg.pairwise_cipher_wpa2 ==
|
||||
CIPHER_AES_CCMP)
|
||||
vwrq->value = IW_AUTH_CIPHER_CCMP;
|
||||
else
|
||||
|
@ -1504,8 +1437,7 @@ woal_get_auth(struct net_device *dev, struct iw_request_info *info,
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_get_range(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_get_range(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_point *dwrq, char *extra)
|
||||
{
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
|
@ -1523,8 +1455,7 @@ woal_get_range(struct net_device *dev, struct iw_request_info *info,
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv,
|
||||
MLAN_ACT_GET,
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, MLAN_ACT_GET,
|
||||
MOAL_IOCTL_WAIT,
|
||||
ap_cfg)) {
|
||||
PRINTM(MERROR, "Error getting AP confiruration\n");
|
||||
|
@ -1539,13 +1470,14 @@ woal_get_range(struct net_device *dev, struct iw_request_info *info,
|
|||
range->max_nwid = 0;
|
||||
|
||||
range->num_bitrates = MAX_DATA_RATES;
|
||||
for (i = 0; i < MIN(MAX_DATA_RATES, IW_MAX_BITRATES) &&
|
||||
ap_cfg->rates[i]; i++) {
|
||||
for (i = 0;
|
||||
i < MIN(MAX_DATA_RATES, IW_MAX_BITRATES) && ap_cfg->rates[i];
|
||||
i++) {
|
||||
range->bitrate[i] = (ap_cfg->rates[i] & 0x7f) * 500000;
|
||||
}
|
||||
range->num_bitrates = i;
|
||||
PRINTM(MINFO, "IW_MAX_BITRATES=%d num_bitrates=%d\n",
|
||||
IW_MAX_BITRATES, range->num_bitrates);
|
||||
PRINTM(MINFO, "IW_MAX_BITRATES=%d num_bitrates=%d\n", IW_MAX_BITRATES,
|
||||
range->num_bitrates);
|
||||
|
||||
range->num_frequency = MIN(ap_cfg->num_of_chan, IW_MAX_FREQUENCIES);
|
||||
|
||||
|
@ -1553,8 +1485,9 @@ woal_get_range(struct net_device *dev, struct iw_request_info *info,
|
|||
range->freq[i].i = (long)ap_cfg->chan_list[i].chan_number;
|
||||
band = (ap_cfg->chan_list[i].bandcfg.chanBand == BAND_5GHZ);
|
||||
range->freq[i].m =
|
||||
(long)channel_to_frequency(ap_cfg->chan_list[i].
|
||||
chan_number, band) * 100000;
|
||||
(long)channel_to_frequency(
|
||||
ap_cfg->chan_list[i].chan_number, band) *
|
||||
100000;
|
||||
range->freq[i].e = 1;
|
||||
}
|
||||
|
||||
|
@ -1647,8 +1580,7 @@ woal_get_range(struct net_device *dev, struct iw_request_info *info,
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_set_priv(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_set_priv(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_point *dwrq, char *extra)
|
||||
{
|
||||
ENTER();
|
||||
|
@ -1666,8 +1598,7 @@ woal_set_priv(struct net_device *dev, struct iw_request_info *info,
|
|||
*
|
||||
* @return 0--success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_set_essid(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_set_essid(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_point *dwrq, char *extra)
|
||||
{
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
|
@ -1707,12 +1638,11 @@ woal_set_essid(struct net_device *dev, struct iw_request_info *info,
|
|||
goto done;
|
||||
}
|
||||
PRINTM(MINFO, "Requested new SSID = %s\n",
|
||||
(sys_cfg->ssid.ssid_len > 0) ?
|
||||
(char *)sys_cfg->ssid.ssid : "NULL");
|
||||
(sys_cfg->ssid.ssid_len > 0) ? (char *)sys_cfg->ssid.ssid :
|
||||
"NULL");
|
||||
|
||||
/* Set AP configuration */
|
||||
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,
|
||||
sys_cfg)) {
|
||||
PRINTM(MERROR, "Error setting AP confiruration\n");
|
||||
|
@ -1736,8 +1666,7 @@ done:
|
|||
*
|
||||
* @return 0--success, otherwise fail
|
||||
*/
|
||||
static int
|
||||
woal_get_essid(struct net_device *dev, struct iw_request_info *info,
|
||||
static int woal_get_essid(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_point *dwrq, char *extra)
|
||||
{
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
|
@ -1751,8 +1680,7 @@ woal_get_essid(struct net_device *dev, struct iw_request_info *info,
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv,
|
||||
MLAN_ACT_GET,
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, MLAN_ACT_GET,
|
||||
MOAL_IOCTL_WAIT,
|
||||
ap_cfg)) {
|
||||
PRINTM(MERROR, "Error getting AP confiruration\n");
|
||||
|
@ -1871,6 +1799,7 @@ static const iw_handler woal_private_handler[] = {
|
|||
Global Functions
|
||||
********************************************************/
|
||||
|
||||
// clang-format off
|
||||
/** wlan_handler_def */
|
||||
struct iw_handler_def woal_uap_handler_def = {
|
||||
num_standard: ARRAY_SIZE(woal_handler),
|
||||
|
@ -1883,6 +1812,7 @@ private_args:(struct iw_priv_args *)woal_uap_priv_args,
|
|||
get_wireless_stats : woal_get_uap_wireless_stats,
|
||||
#endif
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* @brief Get wireless statistics
|
||||
|
@ -1891,8 +1821,7 @@ get_wireless_stats:woal_get_uap_wireless_stats,
|
|||
*
|
||||
* @return A pointer to iw_statistics buf
|
||||
*/
|
||||
struct iw_statistics *
|
||||
woal_get_uap_wireless_stats(struct net_device *dev)
|
||||
struct iw_statistics *woal_get_uap_wireless_stats(struct net_device *dev)
|
||||
{
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
t_u16 wait_option = MOAL_IOCTL_WAIT;
|
||||
|
|
|
@ -52,8 +52,7 @@ typedef struct {
|
|||
|
||||
/** NXP USB device */
|
||||
#define NXP_USB_DEVICE(vid, pid, name) \
|
||||
USB_DEVICE(vid, pid), \
|
||||
.driver_info = (t_ptr)name
|
||||
USB_DEVICE(vid, pid), .driver_info = (t_ptr)name
|
||||
|
||||
/** Name of the USB driver */
|
||||
const char usbdriver_name[] = "usbxxx";
|
||||
|
@ -67,8 +66,8 @@ struct usb_device_id woal_usb_table[] = {
|
|||
#endif
|
||||
#ifdef USB8997
|
||||
{NXP_USB_DEVICE(USB8997_VID_1, USB8997_PID_1, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE
|
||||
(USB8997_VID_1, USB8997V2_PID_1, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE(USB8997_VID_1, USB8997V2_PID_1,
|
||||
"NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE(USB8997_VID_1, USB8997_PID_2, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE(USB8997_VID_1, USB8997_PID_3, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE(USB8997_VID_1, USB8997_PID_4, "NXP WLAN USB Adapter")},
|
||||
|
@ -77,11 +76,11 @@ struct usb_device_id woal_usb_table[] = {
|
|||
#endif
|
||||
#ifdef USB8978
|
||||
{NXP_USB_DEVICE(USB8978_VID_1, USB8978_PID_1, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE
|
||||
(USB8978_VID_1, USB8978_PID_1_BT, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE(USB8978_VID_1, USB8978_PID_1_BT,
|
||||
"NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE(USB8978_VID_1, USB8978_PID_2, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE
|
||||
(USB8978_VID_1, USB8978_PID_2_BT, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE(USB8978_VID_1, USB8978_PID_2_BT,
|
||||
"NXP WLAN USB Adapter")},
|
||||
#endif
|
||||
#ifdef USB9098
|
||||
{NXP_USB_DEVICE(USB9098_VID_1, USB9098_PID_1, "NXP WLAN USB Adapter")},
|
||||
|
@ -106,8 +105,8 @@ struct usb_device_id woal_usb_table_skip_fwdnld[] = {
|
|||
#endif
|
||||
#ifdef USB8978
|
||||
{NXP_USB_DEVICE(USB8978_VID_1, USB8978_PID_2, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE
|
||||
(USB8978_VID_1, USB8978_PID_2_BT, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE(USB8978_VID_1, USB8978_PID_2_BT,
|
||||
"NXP WLAN USB Adapter")},
|
||||
#endif
|
||||
#ifdef USB9098
|
||||
{NXP_USB_DEVICE(USB9098_VID_1, USB9098_PID_2, "NXP WLAN USB Adapter")},
|
||||
|
@ -191,8 +190,7 @@ extern int max_tx_buf;
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
woal_usb_receive(struct urb *urb, struct pt_regs *regs)
|
||||
static void woal_usb_receive(struct urb *urb, struct pt_regs *regs)
|
||||
#else
|
||||
/**
|
||||
* @brief This function receive packet of the data/cmd/event packet
|
||||
|
@ -202,8 +200,7 @@ woal_usb_receive(struct urb *urb, struct pt_regs *regs)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
woal_usb_receive(struct urb *urb)
|
||||
static void woal_usb_receive(struct urb *urb)
|
||||
#endif
|
||||
{
|
||||
urb_context *context = NULL;
|
||||
|
@ -248,7 +245,8 @@ woal_usb_receive(struct urb *urb)
|
|||
PRINTM(MERROR,
|
||||
"EP %d Rx URB status failure: %d\n",
|
||||
context->ep, urb->status);
|
||||
/* Do not free mlan_buffer in case of command ep */
|
||||
/* Do not free mlan_buffer in case of command ep
|
||||
*/
|
||||
if (cardp->rx_cmd_ep != context->ep)
|
||||
woal_free_mlan_buffer(handle, pmbuf);
|
||||
goto setup_for_next;
|
||||
|
@ -263,8 +261,10 @@ woal_usb_receive(struct urb *urb)
|
|||
status);
|
||||
if (status == MLAN_STATUS_PENDING) {
|
||||
queue_work(handle->workqueue, &handle->main_work);
|
||||
/* urb for data_ep is re-submitted now, unless we reach HIGH_RX_PENDING */
|
||||
/* urb for cmd_ep will be re-submitted in callback moal_recv_complete */
|
||||
/* urb for data_ep is re-submitted now, unless we reach
|
||||
* HIGH_RX_PENDING */
|
||||
/* urb for cmd_ep will be re-submitted in callback
|
||||
* moal_recv_complete */
|
||||
if (cardp->rx_cmd_ep == context->ep)
|
||||
goto rx_exit;
|
||||
else if (atomic_read(&handle->rx_pending) >=
|
||||
|
@ -278,8 +278,8 @@ woal_usb_receive(struct urb *urb)
|
|||
PRINTM(MERROR,
|
||||
"MLAN fail to process the receive data\n");
|
||||
} else if ((status == MLAN_STATUS_SUCCESS) &&
|
||||
(pmbuf->
|
||||
flags & MLAN_BUF_FLAG_SLEEPCFM_RESP)) {
|
||||
(pmbuf->flags &
|
||||
MLAN_BUF_FLAG_SLEEPCFM_RESP)) {
|
||||
pmbuf->flags &= ~MLAN_BUF_FLAG_SLEEPCFM_RESP;
|
||||
queue_work(handle->workqueue,
|
||||
&handle->main_work);
|
||||
|
@ -289,8 +289,7 @@ woal_usb_receive(struct urb *urb)
|
|||
woal_free_mlan_buffer(handle, pmbuf);
|
||||
}
|
||||
} else if (urb->status) {
|
||||
if (!
|
||||
((cardp->rx_data_ep == context->ep) &&
|
||||
if (!((cardp->rx_data_ep == context->ep) &&
|
||||
(cardp->resubmit_urbs == 1))) {
|
||||
if (!handle->is_suspended) {
|
||||
PRINTM(MMSG, "Card is removed: %d\n",
|
||||
|
@ -339,8 +338,7 @@ rx_exit:
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
woal_usb_tx_complete(struct urb *urb, struct pt_regs *regs)
|
||||
static void woal_usb_tx_complete(struct urb *urb, struct pt_regs *regs)
|
||||
#else
|
||||
/**
|
||||
* @brief Call back function to handle the status of the Tx data URB
|
||||
|
@ -349,8 +347,7 @@ woal_usb_tx_complete(struct urb *urb, struct pt_regs *regs)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
woal_usb_tx_complete(struct urb *urb)
|
||||
static void woal_usb_tx_complete(struct urb *urb)
|
||||
#endif
|
||||
{
|
||||
urb_context *context = NULL;
|
||||
|
@ -409,8 +406,7 @@ woal_usb_tx_complete(struct urb *urb)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_usb_submit_rx_urb(urb_context *ctx, int size)
|
||||
static mlan_status woal_usb_submit_rx_urb(urb_context *ctx, int size)
|
||||
{
|
||||
moal_handle *handle = ctx->handle;
|
||||
struct usb_card_rec *cardp = (struct usb_card_rec *)handle->card;
|
||||
|
@ -453,8 +449,7 @@ woal_usb_submit_rx_urb(urb_context *ctx, int size)
|
|||
cardp->rx_cmd_interval);
|
||||
else
|
||||
usb_fill_bulk_urb(ctx->urb, cardp->udev,
|
||||
usb_rcvbulkpipe(cardp->udev, ctx->ep),
|
||||
data,
|
||||
usb_rcvbulkpipe(cardp->udev, ctx->ep), data,
|
||||
size - ctx->pmbuf->data_offset,
|
||||
woal_usb_receive, (void *)ctx);
|
||||
if (cardp->rx_cmd_ep == ctx->ep)
|
||||
|
@ -494,9 +489,8 @@ rx_ret:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_check_chip_revision(moal_handle *handle,
|
||||
t_u32 *usb_chip_rev, t_u32 *usb_strap)
|
||||
mlan_status woal_check_chip_revision(moal_handle *handle, t_u32 *usb_chip_rev,
|
||||
t_u32 *usb_strap)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_buffer mbuf;
|
||||
|
@ -536,8 +530,7 @@ woal_check_chip_revision(moal_handle *handle,
|
|||
mbuf.data_len = tx_size;
|
||||
|
||||
/* Send the chip revision check frame */
|
||||
ret = woal_usb_write_data_sync(handle,
|
||||
&mbuf, cardp->tx_cmd_ep,
|
||||
ret = woal_usb_write_data_sync(handle, &mbuf, cardp->tx_cmd_ep,
|
||||
MLAN_USB_BULK_MSG_TIMEOUT);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
|
@ -552,8 +545,7 @@ woal_check_chip_revision(moal_handle *handle,
|
|||
mbuf.data_len = CHIP_REV_RX_BUF_SIZE;
|
||||
|
||||
/* Receive the chip revision check frame response */
|
||||
ret = woal_usb_read_data_sync(handle,
|
||||
&mbuf, cardp->rx_cmd_ep,
|
||||
ret = woal_usb_read_data_sync(handle, &mbuf, cardp->rx_cmd_ep,
|
||||
MLAN_USB_BULK_MSG_TIMEOUT);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
|
@ -579,7 +571,6 @@ woal_check_chip_revision(moal_handle *handle,
|
|||
*usb_strap = ack_pkt.strap & 0x7;
|
||||
} else
|
||||
PRINTM(MINFO, "chip_rev=0x%x\n", *usb_chip_rev);
|
||||
|
||||
}
|
||||
cleanup:
|
||||
kfree(recv_buff);
|
||||
|
@ -596,8 +587,7 @@ cleanup:
|
|||
* @param handle A pointer to moal_handle structure
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
woal_usb_unlink_urb(void *card_desc)
|
||||
static void woal_usb_unlink_urb(void *card_desc)
|
||||
{
|
||||
struct usb_card_rec *cardp = (struct usb_card_rec *)card_desc;
|
||||
int i;
|
||||
|
@ -612,8 +602,8 @@ woal_usb_unlink_urb(void *card_desc)
|
|||
if (atomic_read(&cardp->rx_data_urb_pending)) {
|
||||
for (i = 0; i < MVUSB_RX_DATA_URB; i++) {
|
||||
if (cardp->rx_data_list[i].urb)
|
||||
usb_kill_urb(cardp->rx_data_list[i].
|
||||
urb);
|
||||
usb_kill_urb(
|
||||
cardp->rx_data_list[i].urb);
|
||||
}
|
||||
}
|
||||
/* Unlink Tx cmd URB */
|
||||
|
@ -625,12 +615,11 @@ woal_usb_unlink_urb(void *card_desc)
|
|||
if (atomic_read(&cardp->tx_data_urb_pending)) {
|
||||
for (i = 0; i < MVUSB_TX_HIGH_WMARK; i++) {
|
||||
if (cardp->tx_data_list[i].urb) {
|
||||
usb_kill_urb(cardp->tx_data_list[i].
|
||||
urb);
|
||||
usb_kill_urb(
|
||||
cardp->tx_data_list[i].urb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
LEAVE();
|
||||
}
|
||||
|
@ -642,8 +631,7 @@ woal_usb_unlink_urb(void *card_desc)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_usb_free(struct usb_card_rec *cardp)
|
||||
void woal_usb_free(struct usb_card_rec *cardp)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -680,8 +668,7 @@ woal_usb_free(struct usb_card_rec *cardp)
|
|||
return;
|
||||
}
|
||||
|
||||
static t_u16
|
||||
woal_update_card_type(t_void *card)
|
||||
static t_u16 woal_update_card_type(t_void *card)
|
||||
{
|
||||
struct usb_card_rec *cardp_usb = (struct usb_card_rec *)card;
|
||||
t_u16 card_type = 0;
|
||||
|
@ -697,7 +684,8 @@ woal_update_card_type(t_void *card)
|
|||
strlen(CARD_USB8897), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V15, strlen(V15),
|
||||
strlen(KERN_VERSION),
|
||||
V15, strlen(V15),
|
||||
strlen(driver_version) - strlen(INTF_CARDTYPE) -
|
||||
strlen(KERN_VERSION));
|
||||
}
|
||||
|
@ -722,7 +710,8 @@ woal_update_card_type(t_void *card)
|
|||
strlen(CARD_USB8997), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V16, strlen(V16),
|
||||
strlen(KERN_VERSION),
|
||||
V16, strlen(V16),
|
||||
strlen(driver_version) - strlen(INTF_CARDTYPE) -
|
||||
strlen(KERN_VERSION));
|
||||
}
|
||||
|
@ -737,7 +726,8 @@ woal_update_card_type(t_void *card)
|
|||
strlen(CARD_USB8978), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V16, strlen(V16),
|
||||
strlen(KERN_VERSION),
|
||||
V16, strlen(V16),
|
||||
strlen(driver_version) - strlen(INTF_CARDTYPE) -
|
||||
strlen(KERN_VERSION));
|
||||
}
|
||||
|
@ -752,7 +742,8 @@ woal_update_card_type(t_void *card)
|
|||
strlen(CARD_USB9098), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V17, strlen(V17),
|
||||
strlen(KERN_VERSION),
|
||||
V17, strlen(V17),
|
||||
strlen(driver_version) - strlen(INTF_CARDTYPE) -
|
||||
strlen(KERN_VERSION));
|
||||
}
|
||||
|
@ -767,7 +758,8 @@ woal_update_card_type(t_void *card)
|
|||
strlen(CARD_USB9097), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION), V17, strlen(V17),
|
||||
strlen(KERN_VERSION),
|
||||
V17, strlen(V17),
|
||||
strlen(driver_version) - strlen(INTF_CARDTYPE) -
|
||||
strlen(KERN_VERSION));
|
||||
}
|
||||
|
@ -783,8 +775,8 @@ woal_update_card_type(t_void *card)
|
|||
*
|
||||
* @return Address of variable usb_cardp, error code otherwise
|
||||
*/
|
||||
static int
|
||||
woal_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||
static int woal_usb_probe(struct usb_interface *intf,
|
||||
const struct usb_device_id *id)
|
||||
{
|
||||
struct usb_device *udev;
|
||||
struct usb_host_interface *iface_desc;
|
||||
|
@ -836,7 +828,8 @@ woal_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||
#ifdef USB9097
|
||||
case USB9097_PID_1:
|
||||
#endif /* USB9097 */
|
||||
/* If skip FW is set, we must return error so the next driver can download the FW */
|
||||
/* If skip FW is set, we must return error so
|
||||
* the next driver can download the FW */
|
||||
if (skip_fwdnld)
|
||||
goto error;
|
||||
else
|
||||
|
@ -862,10 +855,13 @@ woal_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||
break;
|
||||
}
|
||||
/*To do, get card type*/
|
||||
/* if (woal_cpu_to_le16(udev->descriptor.idProduct) == USB8897_PID_2)
|
||||
usb_cardp->card_type = CARD_TYPE_USB8897;
|
||||
else if (woal_cpu_to_le16(udev->descriptor.idProduct) == USB8997_PID_2)
|
||||
usb_cardp->card_type = CARD_TYPE_USB997;
|
||||
/* if
|
||||
(woal_cpu_to_le16(udev->descriptor.idProduct) ==
|
||||
USB8897_PID_2) usb_cardp->card_type =
|
||||
CARD_TYPE_USB8897; else if
|
||||
(woal_cpu_to_le16(udev->descriptor.idProduct) ==
|
||||
USB8997_PID_2) usb_cardp->card_type =
|
||||
CARD_TYPE_USB997;
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
@ -876,7 +872,8 @@ woal_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||
iface_desc = intf->cur_altsetting;
|
||||
usb_cardp->intf = intf;
|
||||
|
||||
PRINTM(MINFO, "bcdUSB = 0x%X bDeviceClass = 0x%X"
|
||||
PRINTM(MINFO,
|
||||
"bcdUSB = 0x%X bDeviceClass = 0x%X"
|
||||
" bDeviceSubClass = 0x%X, bDeviceProtocol = 0x%X\n",
|
||||
woal_cpu_to_le16(udev->descriptor.bcdUSB),
|
||||
udev->descriptor.bDeviceClass,
|
||||
|
@ -886,12 +883,11 @@ woal_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||
for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
|
||||
endpoint = &iface_desc->endpoint[i].desc;
|
||||
if ((usb_endpoint_is_bulk_in(endpoint) ||
|
||||
usb_endpoint_is_int_in(endpoint))
|
||||
&& (usb_endpoint_num(endpoint) ==
|
||||
usb_endpoint_is_int_in(endpoint)) &&
|
||||
(usb_endpoint_num(endpoint) ==
|
||||
MLAN_USB_EP_CMD_EVENT ||
|
||||
usb_endpoint_num(endpoint) ==
|
||||
MLAN_USB_EP_CMD_EVENT_IF2)
|
||||
) {
|
||||
MLAN_USB_EP_CMD_EVENT_IF2)) {
|
||||
usb_cardp->rx_cmd_ep_type =
|
||||
usb_endpoint_type(endpoint);
|
||||
usb_cardp->rx_cmd_interval =
|
||||
|
@ -899,13 +895,12 @@ woal_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||
/* We found a bulk in command/event endpoint */
|
||||
PRINTM(MCMND,
|
||||
"Rx CMD/EVT: max packet size = %d, address = %d ep_type=%d\n",
|
||||
woal_le16_to_cpu(endpoint->
|
||||
wMaxPacketSize),
|
||||
woal_le16_to_cpu(
|
||||
endpoint->wMaxPacketSize),
|
||||
endpoint->bEndpointAddress,
|
||||
usb_cardp->rx_cmd_ep_type);
|
||||
usb_cardp->rx_cmd_ep =
|
||||
(endpoint->
|
||||
bEndpointAddress &
|
||||
(endpoint->bEndpointAddress &
|
||||
USB_ENDPOINT_NUMBER_MASK);
|
||||
|
||||
atomic_set(&usb_cardp->rx_cmd_urb_pending, 0);
|
||||
|
@ -914,48 +909,44 @@ woal_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||
usb_cardp->second_mac = MTRUE;
|
||||
}
|
||||
if (usb_endpoint_is_bulk_in(endpoint) &&
|
||||
(usb_endpoint_num(endpoint) == MLAN_USB_EP_DATA
|
||||
|| usb_endpoint_num(endpoint) ==
|
||||
MLAN_USB_EP_DATA_IF2)
|
||||
) {
|
||||
(usb_endpoint_num(endpoint) == MLAN_USB_EP_DATA ||
|
||||
usb_endpoint_num(endpoint) ==
|
||||
MLAN_USB_EP_DATA_IF2)) {
|
||||
/* We found a bulk in data endpoint */
|
||||
PRINTM(MINFO,
|
||||
"Bulk IN: max packet size = %d, address = %d\n",
|
||||
woal_le16_to_cpu(endpoint->
|
||||
wMaxPacketSize),
|
||||
woal_le16_to_cpu(
|
||||
endpoint->wMaxPacketSize),
|
||||
endpoint->bEndpointAddress);
|
||||
usb_cardp->rx_data_ep =
|
||||
(endpoint->
|
||||
bEndpointAddress &
|
||||
(endpoint->bEndpointAddress &
|
||||
USB_ENDPOINT_NUMBER_MASK);
|
||||
atomic_set(&usb_cardp->rx_data_urb_pending, 0);
|
||||
}
|
||||
if (usb_endpoint_is_bulk_out(endpoint) &&
|
||||
(usb_endpoint_num(endpoint) == MLAN_USB_EP_DATA
|
||||
|| usb_endpoint_num(endpoint) ==
|
||||
MLAN_USB_EP_DATA_IF2)
|
||||
) {
|
||||
(usb_endpoint_num(endpoint) == MLAN_USB_EP_DATA ||
|
||||
usb_endpoint_num(endpoint) ==
|
||||
MLAN_USB_EP_DATA_IF2)) {
|
||||
/* We found a bulk out data endpoint */
|
||||
PRINTM(MCMND,
|
||||
"Bulk OUT: max packet size = %d, address = %d\n",
|
||||
woal_le16_to_cpu(endpoint->
|
||||
wMaxPacketSize),
|
||||
woal_le16_to_cpu(
|
||||
endpoint->wMaxPacketSize),
|
||||
endpoint->bEndpointAddress);
|
||||
usb_cardp->tx_data_ep =
|
||||
endpoint->bEndpointAddress;
|
||||
atomic_set(&usb_cardp->tx_data_urb_pending, 0);
|
||||
usb_cardp->tx_data_maxpktsize =
|
||||
woal_le16_to_cpu(endpoint->
|
||||
wMaxPacketSize);
|
||||
woal_le16_to_cpu(
|
||||
endpoint->wMaxPacketSize);
|
||||
}
|
||||
|
||||
if ((usb_endpoint_is_bulk_out(endpoint) ||
|
||||
usb_endpoint_is_int_out(endpoint))
|
||||
&& (usb_endpoint_num(endpoint) ==
|
||||
usb_endpoint_is_int_out(endpoint)) &&
|
||||
(usb_endpoint_num(endpoint) ==
|
||||
MLAN_USB_EP_CMD_EVENT ||
|
||||
usb_endpoint_num(endpoint) ==
|
||||
MLAN_USB_EP_CMD_EVENT_IF2)
|
||||
) {
|
||||
MLAN_USB_EP_CMD_EVENT_IF2)) {
|
||||
usb_cardp->tx_cmd_ep_type =
|
||||
usb_endpoint_type(endpoint);
|
||||
usb_cardp->tx_cmd_interval =
|
||||
|
@ -963,16 +954,15 @@ woal_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||
/* We found a bulk out command/event endpoint */
|
||||
PRINTM(MCMND,
|
||||
"Tx CMD: max packet size = %d, address = %d ep_type=%d\n",
|
||||
woal_le16_to_cpu(endpoint->
|
||||
wMaxPacketSize),
|
||||
woal_le16_to_cpu(
|
||||
endpoint->wMaxPacketSize),
|
||||
endpoint->bEndpointAddress,
|
||||
usb_cardp->tx_cmd_ep_type);
|
||||
usb_cardp->tx_cmd_ep =
|
||||
endpoint->bEndpointAddress;
|
||||
atomic_set(&usb_cardp->tx_cmd_urb_pending, 0);
|
||||
usb_cardp->tx_cmd_maxpktsize =
|
||||
woal_le16_to_cpu(endpoint->
|
||||
wMaxPacketSize);
|
||||
usb_cardp->tx_cmd_maxpktsize = woal_le16_to_cpu(
|
||||
endpoint->wMaxPacketSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1012,9 +1002,8 @@ woal_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||
}
|
||||
|
||||
/* At this point wlan_add_card() will be called */
|
||||
if (!
|
||||
(woal_add_card
|
||||
(usb_cardp, &usb_cardp->udev->dev, &usb_ops, card_type))) {
|
||||
if (!(woal_add_card(usb_cardp, &usb_cardp->udev->dev, &usb_ops,
|
||||
card_type))) {
|
||||
PRINTM(MERROR, "%s: woal_add_card failed\n",
|
||||
__FUNCTION__);
|
||||
goto error;
|
||||
|
@ -1024,16 +1013,16 @@ woal_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||
* default. So drivers wanting remote wakeup will have to enable
|
||||
* this using -
|
||||
* device_set_wakeup_enable(&udev->dev, 1);
|
||||
* It has been observed that some cards having device attr = 0xa0
|
||||
* do not support remote wakeup. These cards come immediately out
|
||||
* of the suspend when power/wakeup file is set to 'enabled'.
|
||||
* To support all types of cards i.e. with/without remote wakeup,
|
||||
* we are NOT setting the 'power/wakeup' file from here.
|
||||
* Also in principle, we are not supposed to change the wakeup
|
||||
* policy, which is purely a userspace decision.
|
||||
* It has been observed that some cards having device attr =
|
||||
* 0xa0 do not support remote wakeup. These cards come
|
||||
* immediately out of the suspend when power/wakeup file is set
|
||||
* to 'enabled'. To support all types of cards i.e. with/without
|
||||
* remote wakeup, we are NOT setting the 'power/wakeup' file
|
||||
* from here. Also in principle, we are not supposed to change
|
||||
* the wakeup policy, which is purely a userspace decision.
|
||||
*/
|
||||
/* if (udev->actconfig->desc.bmAttributes & USB_CONFIG_ATT_WAKEUP)
|
||||
intf->needs_remote_wakeup = 1; */
|
||||
/* if (udev->actconfig->desc.bmAttributes &
|
||||
USB_CONFIG_ATT_WAKEUP) intf->needs_remote_wakeup = 1; */
|
||||
#endif
|
||||
usb_get_dev(udev);
|
||||
LEAVE();
|
||||
|
@ -1058,8 +1047,7 @@ error:
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void
|
||||
woal_usb_disconnect(struct usb_interface *intf)
|
||||
static void woal_usb_disconnect(struct usb_interface *intf)
|
||||
{
|
||||
struct usb_card_rec *cardp = usb_get_intfdata(intf);
|
||||
moal_handle *phandle = NULL;
|
||||
|
@ -1096,8 +1084,7 @@ woal_usb_disconnect(struct usb_interface *intf)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_kill_urbs(moal_handle *handle)
|
||||
void woal_kill_urbs(moal_handle *handle)
|
||||
{
|
||||
ENTER();
|
||||
handle->is_suspended = MTRUE;
|
||||
|
@ -1113,8 +1100,7 @@ woal_kill_urbs(moal_handle *handle)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_resubmit_urbs(moal_handle *handle)
|
||||
void woal_resubmit_urbs(moal_handle *handle)
|
||||
{
|
||||
struct usb_card_rec *cardp = handle->card;
|
||||
|
||||
|
@ -1144,8 +1130,7 @@ woal_resubmit_urbs(moal_handle *handle)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static int
|
||||
woal_usb_suspend(struct usb_interface *intf, pm_message_t message)
|
||||
static int woal_usb_suspend(struct usb_interface *intf, pm_message_t message)
|
||||
{
|
||||
struct usb_card_rec *cardp = usb_get_intfdata(intf);
|
||||
moal_handle *handle = NULL;
|
||||
|
@ -1227,8 +1212,7 @@ done:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static int
|
||||
woal_usb_resume(struct usb_interface *intf)
|
||||
static int woal_usb_resume(struct usb_interface *intf)
|
||||
{
|
||||
struct usb_card_rec *cardp = usb_get_intfdata(intf);
|
||||
moal_handle *handle = NULL;
|
||||
|
@ -1311,8 +1295,7 @@ done:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_usb_tx_init(moal_handle *handle)
|
||||
mlan_status woal_usb_tx_init(moal_handle *handle)
|
||||
{
|
||||
struct usb_card_rec *cardp = (struct usb_card_rec *)handle->card;
|
||||
int i;
|
||||
|
@ -1355,8 +1338,7 @@ init_exit:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_usb_submit_rx_data_urbs(moal_handle *handle)
|
||||
mlan_status woal_usb_submit_rx_data_urbs(moal_handle *handle)
|
||||
{
|
||||
struct usb_card_rec *cardp = (struct usb_card_rec *)handle->card;
|
||||
int i;
|
||||
|
@ -1368,8 +1350,7 @@ woal_usb_submit_rx_data_urbs(moal_handle *handle)
|
|||
if (cardp->rx_deaggr_ctrl.enable) {
|
||||
buffer_len = cardp->rx_deaggr_ctrl.aggr_max;
|
||||
if (cardp->rx_deaggr_ctrl.aggr_mode == MLAN_USB_AGGR_MODE_NUM) {
|
||||
buffer_len *=
|
||||
MAX(MLAN_USB_MAX_PKT_SIZE,
|
||||
buffer_len *= MAX(MLAN_USB_MAX_PKT_SIZE,
|
||||
cardp->rx_deaggr_ctrl.aggr_align);
|
||||
buffer_len = MAX(buffer_len, MLAN_RX_DATA_BUF_SIZE);
|
||||
}
|
||||
|
@ -1378,8 +1359,8 @@ woal_usb_submit_rx_data_urbs(moal_handle *handle)
|
|||
for (i = 0; i < MVUSB_RX_DATA_URB; i++) {
|
||||
/* Submit Rx data URB */
|
||||
if (!cardp->rx_data_list[i].pmbuf) {
|
||||
if (woal_usb_submit_rx_urb
|
||||
(&cardp->rx_data_list[i], buffer_len))
|
||||
if (woal_usb_submit_rx_urb(&cardp->rx_data_list[i],
|
||||
buffer_len))
|
||||
continue;
|
||||
}
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -1395,8 +1376,7 @@ woal_usb_submit_rx_data_urbs(moal_handle *handle)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_usb_rx_init(moal_handle *handle)
|
||||
mlan_status woal_usb_rx_init(moal_handle *handle)
|
||||
{
|
||||
struct usb_card_rec *cardp = (struct usb_card_rec *)handle->card;
|
||||
int i;
|
||||
|
@ -1418,8 +1398,8 @@ woal_usb_rx_init(moal_handle *handle)
|
|||
woal_alloc_mlan_buffer(handle, MLAN_RX_CMD_BUF_SIZE);
|
||||
if (cardp->rx_cmd.pmbuf) {
|
||||
/* Submit Rx command URB */
|
||||
if (woal_usb_submit_rx_urb
|
||||
(&cardp->rx_cmd, MLAN_RX_CMD_BUF_SIZE)) {
|
||||
if (woal_usb_submit_rx_urb(&cardp->rx_cmd,
|
||||
MLAN_RX_CMD_BUF_SIZE)) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto init_exit;
|
||||
}
|
||||
|
@ -1456,9 +1436,9 @@ init_exit:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_usb_write_data_sync(moal_handle *handle, mlan_buffer *pmbuf,
|
||||
t_u32 endpoint, t_u32 timeout)
|
||||
static mlan_status woal_usb_write_data_sync(moal_handle *handle,
|
||||
mlan_buffer *pmbuf, t_u32 endpoint,
|
||||
t_u32 timeout)
|
||||
{
|
||||
struct usb_card_rec *cardp = handle->card;
|
||||
t_u8 *data = (t_u8 *)(pmbuf->pbuf + pmbuf->data_offset);
|
||||
|
@ -1500,8 +1480,8 @@ woal_usb_write_data_sync(moal_handle *handle, mlan_buffer *pmbuf,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_usb_read_data_sync(moal_handle *handle, mlan_buffer *pmbuf, t_u32 endpoint,
|
||||
static mlan_status woal_usb_read_data_sync(moal_handle *handle,
|
||||
mlan_buffer *pmbuf, t_u32 endpoint,
|
||||
t_u32 timeout)
|
||||
{
|
||||
struct usb_card_rec *cardp = handle->card;
|
||||
|
@ -1531,10 +1511,11 @@ woal_usb_read_data_sync(moal_handle *handle, mlan_buffer *pmbuf, t_u32 endpoint,
|
|||
* @param pmbuf Pointer to mlan_buffer structure
|
||||
* @param ep Endpoint to send
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE or MLAN_STATUS_RESOURCE
|
||||
* @return MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE or
|
||||
* MLAN_STATUS_RESOURCE
|
||||
*/
|
||||
mlan_status
|
||||
woal_write_data_async(moal_handle *handle, mlan_buffer *pmbuf, t_u8 ep)
|
||||
mlan_status woal_write_data_async(moal_handle *handle, mlan_buffer *pmbuf,
|
||||
t_u8 ep)
|
||||
{
|
||||
struct usb_card_rec *cardp = handle->card;
|
||||
urb_context *context = NULL;
|
||||
|
@ -1600,9 +1581,9 @@ woal_write_data_async(moal_handle *handle, mlan_buffer *pmbuf, t_u8 ep)
|
|||
(void *)context, cardp->tx_cmd_interval);
|
||||
} else
|
||||
usb_fill_bulk_urb(tx_urb, cardp->udev,
|
||||
usb_sndbulkpipe(cardp->udev, ep),
|
||||
data, data_len,
|
||||
woal_usb_tx_complete, (void *)context);
|
||||
usb_sndbulkpipe(cardp->udev, ep), data,
|
||||
data_len, woal_usb_tx_complete,
|
||||
(void *)context);
|
||||
/* We find on Ubuntu 12.10 this flag does not work */
|
||||
// tx_urb->transfer_flags |= URB_ZERO_PACKET;
|
||||
|
||||
|
@ -1650,8 +1631,7 @@ tx_ret:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_usb_register_dev(moal_handle *handle)
|
||||
static mlan_status woal_usb_register_dev(moal_handle *handle)
|
||||
{
|
||||
struct usb_card_rec *cardp = (struct usb_card_rec *)handle->card;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
@ -1663,8 +1643,7 @@ woal_usb_register_dev(moal_handle *handle)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
woal_usb_unregister_dev(moal_handle *handle)
|
||||
static void woal_usb_unregister_dev(moal_handle *handle)
|
||||
{
|
||||
struct usb_card_rec *cardp = (struct usb_card_rec *)handle->card;
|
||||
PRINTM(MMSG, "USB: unregister device\n");
|
||||
|
@ -1678,8 +1657,7 @@ woal_usb_unregister_dev(moal_handle *handle)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status
|
||||
woal_usb_bus_register(void)
|
||||
mlan_status woal_usb_bus_register(void)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
ENTER();
|
||||
|
@ -1704,8 +1682,7 @@ woal_usb_bus_register(void)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_usb_bus_unregister(void)
|
||||
void woal_usb_bus_unregister(void)
|
||||
{
|
||||
ENTER();
|
||||
/* API unregisters the driver from USB subsystem */
|
||||
|
@ -1721,8 +1698,7 @@ woal_usb_bus_unregister(void)
|
|||
* @return MTRUE/MFALSE
|
||||
*
|
||||
*/
|
||||
static t_u8
|
||||
woal_usb_is_second_mac(moal_handle *handle)
|
||||
static t_u8 woal_usb_is_second_mac(moal_handle *handle)
|
||||
{
|
||||
return ((struct usb_card_rec *)(handle->card))->second_mac;
|
||||
}
|
||||
|
@ -1735,8 +1711,7 @@ woal_usb_is_second_mac(moal_handle *handle)
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
int
|
||||
woal_enter_usb_suspend(moal_handle *handle)
|
||||
int woal_enter_usb_suspend(moal_handle *handle)
|
||||
{
|
||||
struct usb_device *udev = ((struct usb_card_rec *)(handle->card))->udev;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
|
||||
|
@ -1764,10 +1739,12 @@ woal_enter_usb_suspend(moal_handle *handle)
|
|||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38)
|
||||
udev->autosuspend_delay = 0; /* Autosuspend delay in jiffies */
|
||||
#else
|
||||
pm_runtime_set_autosuspend_delay(&udev->dev, 0); /* Autosuspend delay in jiffies */
|
||||
pm_runtime_set_autosuspend_delay(&udev->dev, 0); /* Autosuspend delay in
|
||||
jiffies */
|
||||
#endif /* < 2.6.38 */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
|
||||
udev->autosuspend_disabled = 0; /* /sys/bus/usb/devices/.../power/level < auto */
|
||||
udev->autosuspend_disabled = 0; /* /sys/bus/usb/devices/.../power/level
|
||||
< auto */
|
||||
#endif /* < 2.6.34 */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
|
||||
udev->autoresume_disabled = 0;
|
||||
|
@ -1803,8 +1780,7 @@ woal_enter_usb_suspend(moal_handle *handle)
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
int
|
||||
woal_exit_usb_suspend(moal_handle *handle)
|
||||
int woal_exit_usb_suspend(moal_handle *handle)
|
||||
{
|
||||
struct usb_device *udev = ((struct usb_card_rec *)(handle->card))->udev;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
|
||||
|
@ -1824,11 +1800,13 @@ woal_exit_usb_suspend(moal_handle *handle)
|
|||
LEAVE();
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
|
||||
/* Exit from USB suspend */
|
||||
usb_lock_device(udev);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
|
||||
udev->autosuspend_disabled = 1; /* /sys/bus/usb/devices/.../power/level < on */
|
||||
udev->autosuspend_disabled = 1; /* /sys/bus/usb/devices/.../power/level
|
||||
< on */
|
||||
#endif /* < 2.6.34 */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
|
||||
udev->autoresume_disabled = 0;
|
||||
|
@ -1862,8 +1840,7 @@ woal_exit_usb_suspend(moal_handle *handle)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_submit_rx_urb(moal_handle *handle, t_u8 ep)
|
||||
void woal_submit_rx_urb(moal_handle *handle, t_u8 ep)
|
||||
{
|
||||
struct usb_card_rec *cardp = (struct usb_card_rec *)handle->card;
|
||||
|
||||
|
@ -1885,8 +1862,7 @@ woal_submit_rx_urb(moal_handle *handle, t_u8 ep)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void
|
||||
woal_usb_dump_fw_info(moal_handle *phandle)
|
||||
void woal_usb_dump_fw_info(moal_handle *phandle)
|
||||
{
|
||||
moal_private *priv = NULL;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
|
@ -1924,8 +1900,7 @@ done:
|
|||
return;
|
||||
}
|
||||
|
||||
static mlan_status
|
||||
woal_usb_get_fw_name(moal_handle *handle)
|
||||
static mlan_status woal_usb_get_fw_name(moal_handle *handle)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#if defined(USB8997) || defined(USB9098) || defined(USB9097) || defined(USB8978)
|
||||
|
@ -2001,6 +1976,7 @@ woal_usb_get_fw_name(moal_handle *handle)
|
|||
break;
|
||||
case USB9098_A0:
|
||||
case USB9098_A1:
|
||||
case USB9098_A2:
|
||||
if (strap != 0) {
|
||||
if (strap == CARD_TYPE_USB_UART)
|
||||
strcpy(handle->card_info->fw_name,
|
||||
|
@ -2013,7 +1989,6 @@ woal_usb_get_fw_name(moal_handle *handle)
|
|||
USB9098_WLAN_V1_FW_NAME);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
#ifdef USB9097
|
||||
|
@ -2033,7 +2008,6 @@ woal_usb_get_fw_name(moal_handle *handle)
|
|||
USB9097_WLAN_V1_FW_NAME);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
done:
|
||||
|
|
|
@ -130,6 +130,7 @@ Change Log:
|
|||
#define USB9098_Z1Z2 0x00
|
||||
#define USB9098_A0 0x01
|
||||
#define USB9098_A1 0x02
|
||||
#define USB9098_A2 0x03
|
||||
#define USB9098_DEFAULT_COMBO_FW_NAME "nxp/usbusb9098_combo.bin"
|
||||
#define USB9098_DEFAULT_WLAN_FW_NAME "nxp/usb9098_wlan.bin"
|
||||
#define USBUART9098_DEFAULT_COMBO_FW_NAME "nxp/usbuart9098_combo.bin"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -33,18 +33,24 @@ Change log:
|
|||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
|
||||
/** Add event */
|
||||
#define IWE_STREAM_ADD_EVENT(i, c, e, w, l) iwe_stream_add_event((i), (c), (e), (w), (l))
|
||||
#define IWE_STREAM_ADD_EVENT(i, c, e, w, l) \
|
||||
iwe_stream_add_event((i), (c), (e), (w), (l))
|
||||
/** Add point */
|
||||
#define IWE_STREAM_ADD_POINT(i, c, e, w, p) iwe_stream_add_point((i), (c), (e), (w), (p))
|
||||
#define IWE_STREAM_ADD_POINT(i, c, e, w, p) \
|
||||
iwe_stream_add_point((i), (c), (e), (w), (p))
|
||||
/** Add value */
|
||||
#define IWE_STREAM_ADD_VALUE(i, c, v, e, w, l) iwe_stream_add_value((i), (c), (v), (e), (w), (l))
|
||||
#define IWE_STREAM_ADD_VALUE(i, c, v, e, w, l) \
|
||||
iwe_stream_add_value((i), (c), (v), (e), (w), (l))
|
||||
#else
|
||||
/** Add event */
|
||||
#define IWE_STREAM_ADD_EVENT(i, c, e, w, l) iwe_stream_add_event((c), (e), (w), (l))
|
||||
#define IWE_STREAM_ADD_EVENT(i, c, e, w, l) \
|
||||
iwe_stream_add_event((c), (e), (w), (l))
|
||||
/** Add point */
|
||||
#define IWE_STREAM_ADD_POINT(i, c, e, w, p) iwe_stream_add_point((c), (e), (w), (p))
|
||||
#define IWE_STREAM_ADD_POINT(i, c, e, w, p) \
|
||||
iwe_stream_add_point((c), (e), (w), (p))
|
||||
/** Add value */
|
||||
#define IWE_STREAM_ADD_VALUE(i, c, v, e, w, l) iwe_stream_add_value((c), (v), (e), (w), (l))
|
||||
#define IWE_STREAM_ADD_VALUE(i, c, v, e, w, l) \
|
||||
iwe_stream_add_value((c), (v), (e), (w), (l))
|
||||
#endif
|
||||
|
||||
extern struct iw_handler_def woal_handler_def;
|
||||
|
|
Loading…
Reference in New Issue