if (unlikely(ieee80211_is_beacon(fc))) return QSLT_BEACON; if (ieee80211_is_mgmt(fc) || ieee80211_is_ctl(fc)) return QSLT_MGNT; if (ieee80211_is_nullfunc(fc)) return QSLT_HIGH;
/* Kernel commit 1bf4bbb4024dcdab changed EAPOL packets to use * queue V0 at priority 7; however, the RTL8192SE appears to have * that queue at priority 6
*/ if (skb->priority == 7) return QSLT_VO; return skb->priority;
}
/* CCK gain is smaller than OFDM/MCS gain, */ /* so we add gain diff by experiences, the val is 6 */
pwdb_all += 6; if (pwdb_all > 100)
pwdb_all = 100; /* modify the offset to make the same gain index with OFDM. */ if (pwdb_all > 34 && pwdb_all <= 42)
pwdb_all -= 2; elseif (pwdb_all > 26 && pwdb_all <= 34)
pwdb_all -= 6; elseif (pwdb_all > 14 && pwdb_all <= 26)
pwdb_all -= 8; elseif (pwdb_all > 4 && pwdb_all <= 14)
pwdb_all -= 4;
if (stats->crc)
rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
if (stats->rx_is40mhzpacket)
rx_status->bw = RATE_INFO_BW_40;
if (stats->is_ht)
rx_status->encoding = RX_ENC_HT;
rx_status->flag |= RX_FLAG_MACTIME_START;
/* hw will set stats->decrypted true, if it finds the * frame is open data frame or mgmt frame, * hw will not decrypt robust managment frame * for IEEE80211w but still set stats->decrypted * true, so here we should set it back to undecrypted * for IEEE80211w frame, and mac80211 sw will help
* to decrypt it */ if (stats->decrypted) {
hdr = (struct ieee80211_hdr *)(skb->data +
stats->rx_drvinfo_size + stats->rx_bufshift);
/* Set Bandwidth and sub-channel settings. */ if (bw_40) { if (ptcb_desc->packet_bw) {
set_tx_desc_tx_bandwidth(pdesc, 1); /* use duplicated mode */
set_tx_desc_tx_sub_carrier(pdesc, 0);
} else {
set_tx_desc_tx_bandwidth(pdesc, 0);
set_tx_desc_tx_sub_carrier(pdesc,
mac->cur_40_prime_sc);
}
} else {
set_tx_desc_tx_bandwidth(pdesc, 0);
set_tx_desc_tx_sub_carrier(pdesc, 0);
}
/* 3 Fill necessary field in First Descriptor */ /*DWORD 0*/
set_tx_desc_linip(pdesc, 0);
set_tx_desc_offset(pdesc, 32);
set_tx_desc_pkt_size(pdesc, (u16)skb->len);
/* Fill security related */ if (info->control.hw_key) { struct ieee80211_key_conf *keyconf;
keyconf = info->control.hw_key; switch (keyconf->cipher) { case WLAN_CIPHER_SUITE_WEP40: case WLAN_CIPHER_SUITE_WEP104:
set_tx_desc_sec_type(pdesc, 0x1); break; case WLAN_CIPHER_SUITE_TKIP:
set_tx_desc_sec_type(pdesc, 0x2); break; case WLAN_CIPHER_SUITE_CCMP:
set_tx_desc_sec_type(pdesc, 0x3); break; default:
set_tx_desc_sec_type(pdesc, 0x0); break;
}
}
/* Set Packet ID */
set_tx_desc_packet_id(pdesc, 0);
/* We will assign magement queue to BK. */
set_tx_desc_queue_sel(pdesc, fw_qsel);
/* Alwasy enable all rate fallback range */
set_tx_desc_data_rate_fb_limit(pdesc, 0x1F);
/* Fix: I don't kown why hw use 6.5M to tx when set it */
set_tx_desc_user_rate(pdesc,
ptcb_desc->use_driver_rate ? 1 : 0);
/* Set NON_QOS bit. */ if (!ieee80211_is_data_qos(fc))
set_tx_desc_non_qos(pdesc, 1);
}
/* Fill fields that are required to be initialized
* in all of the descriptors */ /*DWORD 0 */
set_tx_desc_first_seg(pdesc, (firstseg ? 1 : 0));
set_tx_desc_last_seg(pdesc, (lastseg ? 1 : 0));
if (dma_mapping_error(&rtlpci->pdev->dev, mapping)) {
rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE, "DMA mapping error\n"); return;
} /* Clear all status */
CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_CMDDESC_SIZE_RTL8192S);
/* This bit indicate this packet is used for FW download. */ if (tcb_desc->cmd_or_init == DESC_PACKET_TYPE_INIT) { /* For firmware download we only need to set LINIP */
set_tx_desc_linip(pdesc, tcb_desc->last_inipkt);
/* 92SE must set as 1 for firmware download HW DMA error */
set_tx_desc_first_seg(pdesc, 1);
set_tx_desc_last_seg(pdesc, 1);
/* 92SE need not to set TX packet size when firmware download */
set_tx_desc_pkt_size(pdesc, (u16)(skb->len));
set_tx_desc_tx_buffer_size(pdesc, (u16)(skb->len));
set_tx_desc_tx_buffer_address(pdesc, mapping);
wmb();
set_tx_desc_own(pdesc, 1);
} else { /* H2C Command Desc format (Host TXCMD) */ /* 92SE must set as 1 for firmware download HW DMA error */
set_tx_desc_first_seg(pdesc, 1);
set_tx_desc_last_seg(pdesc, 1);
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.