1
0
Fork 0

MLK-24669 net: wireless: nxp: mxm_wifiex: upgrade to mxm4x17186.p4 release

The MxM wifi driver upgrade to:
ssh://git@bitbucket.sw.nxp.com/wcswrel/
rel-nxp-wifi-fp92-bt-fp92-linux-android-mxm4x17186.p4-mgpl.git

Driver changes mxm4x17186.p2 -> mxm4x17186.p4:
- Fixed issue of P2P Client not able to connect with P2P Group Owner in 5GHz.
- Fixed kernel warning "Unable to handle kernel paging request"
  which was seen due to redundant disconnect indication from AP.
- Fixed kernel warning which was seen due to return type as int.
  instead of expected "netdev_tx_t".
- Fixed firmware initialization failure when using uAP only mode.
- Added fix to avoid downloading commands to firmware after getting
  command timeout.

Reviewed-by: yang.tian <yang.tian@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit: c2d7d9f654c56ca52aea85eebecd6a37540d680b)
5.4-rM2-2.2.x-imx-squashed
Fugang Duan 2020-09-01 11:08:39 +08:00
parent b6c24461eb
commit 8393c56b2d
14 changed files with 46 additions and 28 deletions

View File

@ -2310,10 +2310,11 @@ mlan_status wlan_cancel_pending_scan_cmd(pmlan_adapter pmadapter,
* @brief Cancel all pending cmd.
*
* @param pmadapter A pointer to mlan_adapter
* @param flag MTRUE/MFALSE
*
* @return N/A
*/
t_void wlan_cancel_all_pending_cmd(pmlan_adapter pmadapter)
t_void wlan_cancel_all_pending_cmd(pmlan_adapter pmadapter, t_u8 flag)
{
cmd_ctrl_node *pcmd_node = MNULL;
pmlan_callbacks pcb = &pmadapter->callbacks;
@ -2338,7 +2339,6 @@ t_void wlan_cancel_all_pending_cmd(pmlan_adapter pmadapter)
#endif
if (pmadapter->curr_cmd) {
pcmd_node = pmadapter->curr_cmd;
pmadapter->curr_cmd = MNULL;
if (pcmd_node->pioctl_buf) {
pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf;
pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL;
@ -2347,7 +2347,10 @@ t_void wlan_cancel_all_pending_cmd(pmlan_adapter pmadapter)
MLAN_STATUS_FAILURE);
pcmd_node->pioctl_buf = MNULL;
}
wlan_insert_cmd_to_free_q(pmadapter, pcmd_node);
if (flag) {
pmadapter->curr_cmd = MNULL;
wlan_insert_cmd_to_free_q(pmadapter, pcmd_node);
}
}
/* Cancel all pending command */

View File

@ -24,7 +24,7 @@
#define _MLAN_DECL_H_
/** MLAN release version */
#define MLAN_RELEASE_VERSION "186.p2"
#define MLAN_RELEASE_VERSION "186.p4"
/** Re-define generic data types for MLAN/MOAL */
/** Signed char (1-byte) */

View File

@ -1584,7 +1584,7 @@ t_void wlan_free_adapter(pmlan_adapter pmadapter)
return;
}
wlan_cancel_all_pending_cmd(pmadapter);
wlan_cancel_all_pending_cmd(pmadapter, MTRUE);
/* Free command buffer */
PRINTM(MINFO, "Free Command buffer\n");
wlan_free_cmd_buffer(pmadapter);
@ -1912,6 +1912,7 @@ mlan_status wlan_init_fw_complete(pmlan_adapter pmadapter)
mlan_status status = MLAN_STATUS_SUCCESS;
mlan_status ret = MLAN_STATUS_SUCCESS;
pmlan_callbacks pcb = &pmadapter->callbacks;
mlan_private *pmpriv = MNULL;
ENTER();
@ -1921,10 +1922,12 @@ mlan_status wlan_init_fw_complete(pmlan_adapter pmadapter)
/* Reconfigure wmm parameter*/
if (status == MLAN_STATUS_SUCCESS) {
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);
pmpriv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_STA);
if (pmpriv)
status = wlan_prepare_cmd(pmpriv,
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);

View File

@ -2784,7 +2784,7 @@ mlan_status wlan_cancel_pending_scan_cmd(pmlan_adapter pmadapter,
pmlan_ioctl_req pioctl_req);
#endif
/**Cancel pending command */
t_void wlan_cancel_all_pending_cmd(pmlan_adapter pmadapter);
t_void wlan_cancel_all_pending_cmd(pmlan_adapter pmadapter, t_u8 flag);
/**Cancel pending ioctl */
t_void wlan_cancel_pending_ioctl(pmlan_adapter pmadapter,
pmlan_ioctl_req pioctl_req);

View File

@ -757,7 +757,7 @@ mlan_status mlan_shutdown_fw(t_void *pmlan_adapter)
PRINTM(MINFO, "Shutdown MLAN...\n");
/* Cancel all pending commands and complete ioctls */
wlan_cancel_all_pending_cmd(pmadapter);
wlan_cancel_all_pending_cmd(pmadapter, MTRUE);
/* Clean up priv structures */
for (i = 0; i < pmadapter->priv_num; i++) {
@ -1342,7 +1342,7 @@ mlan_status mlan_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
if (pioctl_req == MNULL) {
PRINTM(MMSG, "Cancel all pending cmd!\n");
wlan_cancel_all_pending_cmd(pmadapter);
wlan_cancel_all_pending_cmd(pmadapter, MFALSE);
goto exit;
}
if (pioctl_req->action == MLAN_ACT_CANCEL) {

View File

@ -3970,7 +3970,7 @@ mlan_status wlan_misc_ioctl_warm_reset(pmlan_adapter pmadapter,
/* Cancel all pending commands and complete ioctls */
if (misc->param.fw_reload)
wlan_cancel_all_pending_cmd(pmadapter);
wlan_cancel_all_pending_cmd(pmadapter, MTRUE);
/** Init all the head nodes and free all the locks here */
for (i = 0; i < pmadapter->priv_num; i++)

View File

@ -24,7 +24,7 @@
#define _MLAN_DECL_H_
/** MLAN release version */
#define MLAN_RELEASE_VERSION "186"
#define MLAN_RELEASE_VERSION "186.p4"
/** Re-define generic data types for MLAN/MOAL */
/** Signed char (1-byte) */
@ -556,6 +556,8 @@ typedef enum {
#define MREG_D MBIT(9)
#define MLOG_D MBIT(10)
#define MMPA_D MBIT(15)
#define MDAT_D MBIT(16)
#define MCMD_D MBIT(17)

View File

@ -2621,14 +2621,11 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
->priv[priv->phandle->remain_bss_index];
/** cancel previous remain on channel */
if (priv->phandle->remain_on_channel && remain_priv) {
if ((priv->phandle->chan.center_freq !=
chan->center_freq)) {
if (woal_cfg80211_remain_on_channel_cfg(
remain_priv, MOAL_IOCTL_WAIT, MTRUE,
&channel_status, NULL, 0, 0))
PRINTM(MERROR,
"mgmt_tx:Fail to cancel remain on channel\n");
}
if (woal_cfg80211_remain_on_channel_cfg(
remain_priv, MOAL_IOCTL_WAIT, MTRUE,
&channel_status, NULL, 0, 0))
PRINTM(MERROR,
"mgmt_tx:Fail to cancel remain on channel\n");
if (priv->phandle->cookie) {
cfg80211_remain_on_channel_expired(
#if KERNEL_VERSION(3, 6, 0) > CFG80211_VERSION_CODE
@ -2782,7 +2779,8 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
tx_info->tx_cookie = *cookie;
tx_info->tx_skb = skb;
tx_info->tx_seq_num = pmbuf->tx_seq_num;
if (priv->phandle->remain_on_channel && !wait)
if ((priv->bss_role == MLAN_BSS_ROLE_UAP) &&
(priv->phandle->remain_on_channel && !wait))
tx_info->cancel_remain_on_channel =
MTRUE;
INIT_LIST_HEAD(&tx_info->link);

View File

@ -2739,6 +2739,11 @@ static int woal_cfg80211_subcmd_link_statistic_get(struct wiphy *wiphy,
t_u64 max_msec = (t_u64)24 * (t_u64)24 * (t_u64)3600 * (t_u64)1000;
moal_handle *handle = priv->phandle;
/*Sending this command frequently causes TP to drop.*/
/*ToDo : Check in vendor HAL if this callback is needed so frequently
* during normal run*/
if (!(drvdbg & MLOG_D))
return 0;
/* Allocate an IOCTL request buffer */
req = woal_alloc_mlan_ioctl_req(sizeof(t_u32) + BUF_MAXLEN);
if (req == NULL) {

View File

@ -6883,6 +6883,12 @@ mlan_status woal_process_rf_test_mode_cmd(moal_handle *handle, t_u32 cmd,
break;
case MFG_CMD_RF_BAND_AG:
handle->rf_data->band = misc->param.mfg_generic_cfg.data1;
/* set fw default bw and channel config on band change */
handle->rf_data->bandwidth = CHANNEL_BW_20MHZ;
if (handle->rf_data->band == BAND_2GHZ)
handle->rf_data->channel = 6;
else if (handle->rf_data->band == BAND_5GHZ)
handle->rf_data->channel = 36;
break;
case MFG_CMD_RF_CHANNELBW:
handle->rf_data->bandwidth = misc->param.mfg_generic_cfg.data1;

View File

@ -5371,7 +5371,7 @@ done:
*
* @return 0 --success
*/
int woal_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
netdev_tx_t woal_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
moal_private *priv = (moal_private *)netdev_priv(dev);
mlan_buffer *pmbuf = NULL;

View File

@ -2924,7 +2924,7 @@ t_void woal_main_work_queue(struct work_struct *work);
t_void woal_rx_work_queue(struct work_struct *work);
t_void woal_evt_work_queue(struct work_struct *work);
int woal_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
netdev_tx_t woal_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
#ifdef STA_SUPPORT
mlan_status woal_init_sta_dev(struct net_device *dev, moal_private *priv);
#endif

View File

@ -502,8 +502,8 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
config_data = (t_u32)woal_string_to_number(line);
cmd = MFG_CMD_RF_BAND_AG;
}
if (!strncmp(databuf, "bandwidth", strlen("bandwidth"))) {
line += strlen("bandwidth") + 1;
if (!strncmp(databuf, "bw", strlen("bw"))) {
line += strlen("bw") + 1;
config_data = (t_u32)woal_string_to_number(line);
cmd = MFG_CMD_RF_CHANNELBW;
}
@ -567,7 +567,7 @@ static int woal_config_read(struct seq_file *sfp, void *data)
seq_printf(sfp, "tx_antenna=%u\n", handle->rf_data->tx_antenna);
seq_printf(sfp, "rx_antenna=%u\n", handle->rf_data->rx_antenna);
seq_printf(sfp, "band=%u\n", handle->rf_data->band);
seq_printf(sfp, "bandwidth=%u\n", handle->rf_data->bandwidth);
seq_printf(sfp, "bw=%u\n", handle->rf_data->bandwidth);
if (handle->rf_data->channel)
seq_printf(sfp, "channel=%u\n",
handle->rf_data->channel);

View File

@ -2635,6 +2635,7 @@ mlan_status moal_recv_event(t_void *pmoal_handle, pmlan_event pmevent)
PRINTM(MEVENT,
"HostMlme %s: Receive deauth/disassociate\n",
priv->netdev->name);
priv->cfg_disconnect = MTRUE;
woal_mgmt_frame_register(
priv,
IEEE80211_STYPE_DEAUTH,