Skip to content

Commit 0c82aea

Browse files
MaochenWang1mmahadevan108
authored andcommitted
mcux: wifi_nxp: upgrade version to r52.p4
Fix several bugs and upgrade wifi driver version to r52.p4 Signed-off-by: Maochen Wang <[email protected]>
1 parent c1b4d66 commit 0c82aea

File tree

22 files changed

+121
-157
lines changed

22 files changed

+121
-157
lines changed

mcux/middleware/wifi_nxp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ zephyr_code_relocate(FILES
345345
wifidriver/wifi-sdio.c
346346
wifidriver/sdio.c
347347
${ZEPHYR_BASE}/subsys/sd/sdio.c
348-
LOCATION ${QUICK_ACCESS_CODE_AREA} NOKEEP)
348+
LOCATION ${QUICK_ACCESS_CODE_AREA_2} NOKEEP)
349349

350350
zephyr_code_relocate(FILES ${ZEPHYR_BASE}/drivers/wifi/nxp/nxp_wifi_drv.c
351351
FILTER ".*\\.nxp_wifi_send|.*\\.nxp_wifi_recv"

mcux/middleware/wifi_nxp/incl/nxp_wifi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ extern "C" {
268268
#elif defined(CONFIG_WLAN_CALDATA_2ANT_LO_ISO)
269269
#define OVERRIDE_CALIBRATION_DATA "wifi_cal_data_iw612_2ant_lo_iso.h"
270270
#else
271-
#define OVERRIDE_CALIBRATION_DATA "wifi_cal_data_rw61x_override.h"
271+
#define OVERRIDE_CALIBRATION_DATA "wifi_cal_data_override.h"
272272
#endif
273273
#endif
274274

mcux/middleware/wifi_nxp/incl/port/net/zephyr/wm_net.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ void rx_mgmt_register_callback(int (*rx_mgmt_cb_fn)(const enum wlan_bss_type bss
650650
void rx_mgmt_deregister_callback(void);
651651
#endif
652652

653-
int nxp_wifi_internal_tx(const struct device *dev, struct net_pkt *pkt);
653+
int nxp_wifi_internal_tx(const struct device *dev, struct net_pkt *pkt, bool pkt_fwd);
654654
void nxp_wifi_internal_register_rx_cb(int (*rx_cb_fn)(struct net_if *iface, struct net_pkt *pkt));
655655
const struct netif *net_if_get_binding(const char *ifname);
656656
#endif /* _WM_NET_H_ */

mcux/middleware/wifi_nxp/incl/wifidriver/wifi-decl.h

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,7 +1667,23 @@ typedef PACK_START struct _wifi_mfg_cmd_tx_frame
16671667
/** STBC */
16681668
t_u32 stbc;
16691669
/** power id */
1670-
t_u32 rsvd[2];
1670+
t_u32 rsvd[1];
1671+
/**signal bw*/
1672+
t_u32 signal_bw;
1673+
/** NumPkt */
1674+
t_u32 NumPkt;
1675+
/** MaxPE */
1676+
t_u32 MaxPE;
1677+
/** BeamChange */
1678+
t_u32 BeamChange;
1679+
/** Dcm */
1680+
t_u32 Dcm;
1681+
/** Doppler */
1682+
t_u32 Doppler;
1683+
/** MidP */
1684+
t_u32 MidP;
1685+
/** QNum */
1686+
t_u32 QNum;
16711687
} PACK_END wifi_mfg_cmd_tx_frame_t;
16721688

16731689
/** Configuration for Manufacturing command Tx Continuous */
@@ -1879,7 +1895,7 @@ typedef struct _wifi_dot1as_info_t
18791895

18801896
#if CONFIG_SUBSCRIBE_EVENT_SUPPORT
18811897
/** Type definition of mlan_ds_subscribe_evt for subscribe events */
1882-
typedef struct _wifi_ds_subscribe_evt
1898+
typedef PACK_START struct _wifi_ds_subscribe_evt
18831899
{
18841900
/** bitmap for subscribe event */
18851901
t_u16 evt_bitmap;
@@ -1932,12 +1948,12 @@ typedef struct _wifi_ds_subscribe_evt
19321948
/* Second minimum rate frequency */
19331949
t_u16 link_rate_freq;
19341950
/* Tx latency value (us) */
1935-
t_u16 link_tx_latency;
1951+
t_u32 link_tx_latency;
19361952
/* Tx latency frequency */
1937-
t_u16 link_tx_lantency_freq;
1953+
t_u32 link_tx_lantency_freq;
19381954
/* Number of pre missed beacons */
19391955
t_u8 pre_beacon_miss;
1940-
} wifi_ds_subscribe_evt;
1956+
} PACK_END wifi_ds_subscribe_evt;
19411957
#endif
19421958

19431959
#if CONFIG_CSI

mcux/middleware/wifi_nxp/incl/wifidriver/wifi.h

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#if defined(SD9177)
2525
#define CONFIG_TCP_ACK_ENH 1
2626
#endif
27-
#if defined(SD9177) || defined(IW610)
27+
#if defined(SD9177) || defined(IW610) || defined(SD8978)
2828
#define CONFIG_FW_VDLL 1
2929
#if !CONFIG_WIFI_CAPA
3030
#undef CONFIG_WIFI_CAPA
@@ -47,16 +47,6 @@
4747
#define WIFI_WRITE_REG16(reg, val) (WIFI_REG16(reg) = (val))
4848
#define WIFI_WRITE_REG32(reg, val) (WIFI_REG32(reg) = (val))
4949

50-
#ifdef RW610
51-
#define WLAN_CAU_ENABLE_ADDR (0x45004008U)
52-
#define WLAN_CAU_TEMPERATURE_ADDR (0x4500400CU)
53-
#define WLAN_CAU_TEMPERATURE_FW_ADDR (0x41382490U)
54-
#define WLAN_FW_WAKE_STATUS_ADDR (0x40031068U)
55-
#define WLAN_PMIP_TSEN_ADDR (0x45004010U)
56-
#define WLAN_V33_VSEN_ADDR (0x45004028U)
57-
#define WLAN_ADC_CTRL_ADDR (0x45004000U)
58-
#endif
59-
6050
#ifdef RW610
6151
#define RW610_PACKAGE_TYPE_QFN 0
6252
#define RW610_PACKAGE_TYPE_CSP 1
@@ -1889,14 +1879,6 @@ int wifi_single_ant_duty_cycle(t_u16 enable, t_u16 nbTime, t_u16 wlanTime);
18891879
int wifi_dual_ant_duty_cycle(t_u16 enable, t_u16 nbTime, t_u16 wlanTime, t_u16 wlanBlockTime);
18901880
#endif
18911881

1892-
#ifdef RW610
1893-
/* get CAU module temperature and write to firmware */
1894-
void wifi_cau_temperature_enable(void);
1895-
int wifi_cau_temperature_write_to_firmware(void);
1896-
int32_t wifi_get_temperature(void);
1897-
void wifi_pmip_v33_enable();
1898-
#endif
1899-
19001882
#if (CONFIG_WIFI_IND_RESET) && (CONFIG_WIFI_IND_DNLD)
19011883
int wifi_set_indrst_cfg(const wifi_indrst_cfg_t *indrst_cfg, mlan_bss_type bss_type);
19021884
int wifi_get_indrst_cfg(wifi_indrst_cfg_t *indrst_cfg, mlan_bss_type bss_type);

mcux/middleware/wifi_nxp/incl/wlcmgr/wlan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <wifi_events.h>
2020
#include <wifi.h>
2121

22-
#define WLAN_DRV_VERSION "v1.3.r51.z_up.p13"
22+
#define WLAN_DRV_VERSION "v1.3.r52.z_up.p4"
2323

2424
#if CONFIG_WPA2_ENTP
2525
#include <wm_mbedtls_helper_api.h>

mcux/middleware/wifi_nxp/port/net/zephyr/net.c

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,8 @@ bool wrapper_net_is_ip_or_ipv6(const t_u8 *buffer)
519519
}
520520

521521
extern int retry_attempts;
522-
#if CONFIG_WIFI_PKT_FWD
523522
#define MAX_RETRY_PKT_FWD 3
524-
#endif
525-
int nxp_wifi_internal_tx(const struct device *dev, struct net_pkt *pkt)
523+
int nxp_wifi_internal_tx(const struct device *dev, struct net_pkt *pkt, bool pkt_fwd)
526524
{
527525
int ret;
528526
interface_t *if_handle = (interface_t *)dev->data;
@@ -593,13 +591,11 @@ int nxp_wifi_internal_tx(const struct device *dev, struct net_pkt *pkt)
593591
}
594592
else
595593
{
596-
#if CONFIG_WIFI_PKT_FWD
597-
if (interface == WLAN_BSS_TYPE_UAP)
594+
if (pkt_fwd)
598595
{
599596
retry = MAX_RETRY_PKT_FWD;
600597
}
601598
else
602-
#endif
603599
{
604600
retry = retry_attempts;
605601
}
@@ -608,12 +604,9 @@ int nxp_wifi_internal_tx(const struct device *dev, struct net_pkt *pkt)
608604
wmm_outbuf = wifi_wmm_get_outbuf_enh(&outbuf_len, (mlan_wmm_ac_e)pkt_prio, interface, ra, &is_tx_pause);
609605
ret = (wmm_outbuf == NULL) ? true : false;
610606

611-
/* uAP case doesn't need to delay to let powersave task run,
612-
* as FW won't go into sleep mode when uAP enabled. And this
613-
* delay will block uAP packet forward case */
614-
#if CONFIG_WIFI_PKT_FWD
615-
if (interface != WLAN_BSS_TYPE_UAP)
616-
#endif
607+
/* In packet forward case, this function is called by RX thread,
608+
* so the time delay is not allowed */
609+
if (!pkt_fwd)
617610
{
618611
if (ret == true && is_tx_pause == true)
619612
{
@@ -702,9 +695,9 @@ int nxp_wifi_internal_tx(const struct device *dev, struct net_pkt *pkt)
702695
int net_wifi_packet_send(uint8_t interface, void *stack_buffer)
703696
{
704697
if (interface == WLAN_BSS_TYPE_UAP)
705-
return nxp_wifi_internal_tx(net_if_get_device((void *)g_uap.netif), (struct net_pkt *)stack_buffer);
698+
return nxp_wifi_internal_tx(net_if_get_device((void *)g_uap.netif), (struct net_pkt *)stack_buffer, 1);
706699
else
707-
return nxp_wifi_internal_tx(net_if_get_device((void *)g_mlan.netif), (struct net_pkt *)stack_buffer);
700+
return nxp_wifi_internal_tx(net_if_get_device((void *)g_mlan.netif), (struct net_pkt *)stack_buffer, 1);
708701
}
709702
#endif
710703

mcux/middleware/wifi_nxp/sdio_nxp_abs/fwdnld_sdio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ int32_t wlan_reset_fw()
167167
goto done;
168168
}
169169
#if defined(SD8978) || defined(SD8987) || defined(SD9177) || defined(IW610)
170-
rv = sdio_drv_creg_write(HOST_TO_CARD_EVENT_REG, 1, 0x10, &resp);
170+
(void)sdio_drv_creg_read(HOST_TO_CARD_EVENT_REG, 1, &resp);
171+
rv = sdio_drv_creg_write(HOST_TO_CARD_EVENT_REG, 1, resp | 0x10, &resp);
171172
if (rv == false)
172173
{
173174
sdio_io_e("Failed to write register.");

mcux/middleware/wifi_nxp/wifidriver/incl/mlan_fw.h

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6724,7 +6724,23 @@ typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_TX_FRAME2
67246724
/** STBC */
67256725
t_u32 stbc;
67266726
/** power id */
6727-
t_u32 rsvd[2];
6727+
t_u32 rsvd[1];
6728+
/**signal bw*/
6729+
t_u32 signal_bw;
6730+
/** NumPkt */
6731+
t_u32 NumPkt;
6732+
/** MaxPE */
6733+
t_u32 MaxPE;
6734+
/** BeamChange */
6735+
t_u32 BeamChange;
6736+
/** Dcm */
6737+
t_u32 Dcm;
6738+
/** Doppler */
6739+
t_u32 Doppler;
6740+
/** MidP */
6741+
t_u32 MidP;
6742+
/** QNum */
6743+
t_u32 QNum;
67286744
} MLAN_PACK_END HostCmd_DS_MFG_CMD_TX_FRAME2;
67296745

67306746
typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_TX_CONT
@@ -7257,9 +7273,9 @@ typedef MLAN_PACK_START struct
72577273
/* Second minimum rate frequency */
72587274
t_u16 link_rate_freq;
72597275
/* Tx latency value (us) */
7260-
t_u16 link_tx_latency;
7276+
t_u32 link_tx_latency;
72617277
/* Tx latency frequency */
7262-
t_u16 link_tx_lantency_freq;
7278+
t_u32 link_tx_lantency_freq;
72637279
} MLAN_PACK_END MrvlIEtypes_LinkQualityThreshold_t;
72647280

72657281
/** Supported operating classes element */

mcux/middleware/wifi_nxp/wifidriver/incl/mlan_ioctl.h

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3718,7 +3718,7 @@ typedef struct _mlan_ds_misc_country_code
37183718
#define DEFAULT_PRE_BEACON_MISS 30
37193719

37203720
/** Type definition of mlan_ds_subscribe_evt for MLAN_OID_MISC_CFP_CODE */
3721-
typedef struct _mlan_ds_subscribe_evt
3721+
typedef MLAN_PACK_START struct _mlan_ds_subscribe_evt
37223722
{
37233723
/** evt action */
37243724
t_u16 evt_action;
@@ -3773,12 +3773,12 @@ typedef struct _mlan_ds_subscribe_evt
37733773
/* Second minimum rate frequency */
37743774
t_u16 link_rate_freq;
37753775
/* Tx latency value (us) */
3776-
t_u16 link_tx_latency;
3776+
t_u32 link_tx_latency;
37773777
/* Tx latency frequency */
3778-
t_u16 link_tx_lantency_freq;
3778+
t_u32 link_tx_lantency_freq;
37793779
/* Number of pre missed beacons */
37803780
t_u8 pre_beacon_miss;
3781-
} mlan_ds_subscribe_evt;
3781+
} MLAN_PACK_END mlan_ds_subscribe_evt;
37823782
/** Max OTP user data length */
37833783
#define MAX_OTP_USER_DATA_LEN 252U
37843784

@@ -3914,7 +3914,23 @@ typedef MLAN_PACK_START struct _mlan_ds_mfg_cmd_tx_frame2
39143914
/** STBC */
39153915
t_u32 stbc;
39163916
/** power id */
3917-
t_u32 rsvd[2];
3917+
t_u32 rsvd[1];
3918+
/**signal bw*/
3919+
t_u32 signal_bw;
3920+
/** NumPkt */
3921+
t_u32 NumPkt;
3922+
/** MaxPE */
3923+
t_u32 MaxPE;
3924+
/** BeamChange */
3925+
t_u32 BeamChange;
3926+
/** Dcm */
3927+
t_u32 Dcm;
3928+
/** Doppler */
3929+
t_u32 Doppler;
3930+
/** MidP */
3931+
t_u32 MidP;
3932+
/** QNum */
3933+
t_u32 QNum;
39183934
} MLAN_PACK_END mlan_ds_mfg_cmd_tx_frame2;
39193935

39203936
/** Configuration for Manufacturing command Tx Continuous */

0 commit comments

Comments
 (0)