/* This function deletes packets from particular RA List. RA list index *fromwhichpacketsaredeletedispreservedsothatpacketsfromnextRA *listaredeleteduponsubsequentcallthusmaintainingfairness.
*/ staticvoid mwifiex_uap_cleanup_tx_queues(struct mwifiex_private *priv)
{ struct list_head *ra_list; int i;
spin_lock_bh(&priv->wmm.ra_list_spinlock);
for (i = 0; i < MAX_NUM_TID; i++, priv->del_list_idx++) { if (priv->del_list_idx == MAX_NUM_TID)
priv->del_list_idx = 0;
ra_list = &priv->wmm.tid_tbl_ptr[priv->del_list_idx].ra_list; if (mwifiex_uap_del_tx_pkts_in_ralist(priv, ra_list, i)) {
priv->del_list_idx++; break;
}
}
if ((!memcmp(&rx_pkt_hdr->rfc1042_hdr, bridge_tunnel_header, sizeof(bridge_tunnel_header))) ||
(!memcmp(&rx_pkt_hdr->rfc1042_hdr, rfc1042_header, sizeof(rfc1042_header)) &&
ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_AARP &&
ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_IPX)) { /* Replace the 803 header and rfc1042 header (llc/snap) with *anEthernetIIheader,keepthesrc/dstandsnap_type *(ethertype). * *ThefirmwareonlypassesupSNAPframesconvertingallRX *datafrom802.11to802.2/LLC/SNAPframes. * *TocreatetheEthernetII,justmovethesrc,dstaddress *rightbeforethesnap_type.
*/
p_ethhdr = (struct ethhdr *)
((u8 *)(&rx_pkt_hdr->eth803_hdr)
+ sizeof(rx_pkt_hdr->eth803_hdr)
+ sizeof(rx_pkt_hdr->rfc1042_hdr)
- sizeof(rx_pkt_hdr->eth803_hdr.h_dest)
- sizeof(rx_pkt_hdr->eth803_hdr.h_source)
- sizeof(rx_pkt_hdr->rfc1042_hdr.snap_type));
memcpy(p_ethhdr->h_source, rx_pkt_hdr->eth803_hdr.h_source, sizeof(p_ethhdr->h_source));
memcpy(p_ethhdr->h_dest, rx_pkt_hdr->eth803_hdr.h_dest, sizeof(p_ethhdr->h_dest)); /* Chop off the rxpd + the excess memory from *802.2/llc/snapheaderthatwasremoved.
*/
hdr_chop = (u8 *)p_ethhdr - (u8 *)uap_rx_pd;
} else { /* Chop off the rxpd */
hdr_chop = (u8 *)&rx_pkt_hdr->eth803_hdr - (u8 *)uap_rx_pd;
}
/* Chop off the leading header bytes so that it points *tothestartofeitherthereconstructedEthIIframe *orthe802.2/llc/snapframe.
*/
skb_pull(skb, hdr_chop);
/* don't do packet forwarding in disconnected state */ if (!priv->media_connected) {
mwifiex_dbg(adapter, ERROR, "drop packet in disconnected state.\n");
dev_kfree_skb_any(skb); return0;
}
/* This is required only in case of 11n and USB/PCIE as we alloc *abufferof4Konlyifits11N(tobeabletoreceive4K *AMSDUpackets).IncaseofSDweallocatebuffersbased *onthesizeofpacketandhencethisisnotneeded. * *Modifyingthetruesizehereasourallocationforeach *skbis4Kbutweonlyreceive2Kpacketsandthiscause *thekerneltostartdroppingpacketsincasewhere *applicationhasallocatedbufferbasedon2Ksizei.e. *iftherea64Kpacketreceived(inIPfragmentsand *applicationallocates64Ktoreceivethispacketbut *thispacketwouldalmostdoubleupbecauseweallocate *each1.5Kfragmentin4Kandpassitup.Assoonasthe *64Klimithitskernelwillstarttodroprestofthe *fragments.CurrentlywefailtheFilesndl-ht.scrscript *forUDP,hencethisfix
*/ if ((adapter->iface_type == MWIFIEX_USB ||
adapter->iface_type == MWIFIEX_PCIE) &&
skb->truesize > MWIFIEX_RX_DATA_BUF_SIZE)
skb->truesize += (skb->len - MWIFIEX_RX_DATA_BUF_SIZE);
/* Forward multicast/broadcast packet to upper layer*/
netif_rx(skb); return0;
}
if (!priv->ap_11n_enabled ||
(!mwifiex_11n_get_rx_reorder_tbl(priv, uap_rx_pd->priority, ta) &&
(le16_to_cpu(uap_rx_pd->rx_pkt_type) != PKT_TYPE_AMSDU))) {
ret = mwifiex_handle_uap_rx_forward(priv, skb); return ret;
}
/* Reorder and send to kernel */
pkt_type = (u8)le16_to_cpu(uap_rx_pd->rx_pkt_type);
ret = mwifiex_11n_rx_reorder_pkt(priv, le16_to_cpu(uap_rx_pd->seq_num),
uap_rx_pd->priority, ta, pkt_type,
skb);
if (ret || (rx_pkt_type == PKT_TYPE_BAR))
dev_kfree_skb_any(skb);
/* Offset of actual data */
pkt_offset = sizeof(*txpd) + pad; if (pkt_type == PKT_TYPE_MGMT) { /* Set the packet type and add header for management frame */
txpd->tx_pkt_type = cpu_to_le16(pkt_type);
pkt_offset += MWIFIEX_MGMT_FRAME_HEADER_SIZE;
}
txpd->tx_pkt_offset = cpu_to_le16(pkt_offset);
/* make space for adapter->intf_hdr_len */
skb_push(skb, hroom);
if (!txpd->tx_control) /* TxCtrl set by user or default */
txpd->tx_control = cpu_to_le32(priv->pkt_tx_ctrl);
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.2 Sekunden
(vorverarbeitet am 2026-10-04)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.