@@ -519,10 +519,8 @@ bool wrapper_net_is_ip_or_ipv6(const t_u8 *buffer)
519519}
520520
521521extern 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)
702695int 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
0 commit comments