qcacld-3.0: Remove PERE_IP_HDR_ALIGNMENT_WAR feature

The PERE_IP_HDR_ALIGNMENT_WAR feature does not apply to hardware
supported by this driver, and the code would not build correctly
if the feature was enabled, so completely remove the feature.

Change-Id: I4697e798dc57ab7e51c88d40e4d0f9a26a98de6d
CRs-Fixed: 2363232
This commit is contained in:
Jeff Johnson
2018-12-07 12:21:59 -08:00
committed by nshrivas
parent 8feaa63728
commit 58894a1df3
4 changed files with 0 additions and 88 deletions

View File

@@ -839,61 +839,6 @@ ol_rx_sec_ind_handler(ol_txrx_pdev_handle pdev,
}
}
#if defined(PERE_IP_HDR_ALIGNMENT_WAR)
#include <cds_ieee80211_common.h>
static void transcap_nwifi_to_8023(qdf_nbuf_t msdu)
{
struct ieee80211_frame *wh;
uint32_t hdrsize;
struct llc *llchdr;
struct ether_header *eth_hdr;
uint16_t ether_type = 0;
uint8_t a1[IEEE80211_ADDR_LEN];
uint8_t a2[IEEE80211_ADDR_LEN];
uint8_t a3[IEEE80211_ADDR_LEN];
uint8_t fc1;
wh = (struct ieee80211_frame *)qdf_nbuf_data(msdu);
qdf_mem_copy(a1, wh->i_addr1, IEEE80211_ADDR_LEN);
qdf_mem_copy(a2, wh->i_addr2, IEEE80211_ADDR_LEN);
qdf_mem_copy(a3, wh->i_addr3, IEEE80211_ADDR_LEN);
fc1 = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK;
/* Native Wifi header is 80211 non-QoS header */
hdrsize = sizeof(struct ieee80211_frame);
llchdr = (struct llc *)(((uint8_t *) qdf_nbuf_data(msdu)) + hdrsize);
ether_type = llchdr->llc_un.type_snap.ether_type;
/*
* Now move the data pointer to the beginning of the mac header :
* new-header = old-hdr + (wifhdrsize + llchdrsize - ethhdrsize)
*/
qdf_nbuf_pull_head(msdu,
(hdrsize + sizeof(struct llc) -
sizeof(struct ether_header)));
eth_hdr = (struct ether_header *)(qdf_nbuf_data(msdu));
switch (fc1) {
case IEEE80211_FC1_DIR_NODS:
qdf_mem_copy(eth_hdr->ether_dhost, a1, IEEE80211_ADDR_LEN);
qdf_mem_copy(eth_hdr->ether_shost, a2, IEEE80211_ADDR_LEN);
break;
case IEEE80211_FC1_DIR_TODS:
qdf_mem_copy(eth_hdr->ether_dhost, a3, IEEE80211_ADDR_LEN);
qdf_mem_copy(eth_hdr->ether_shost, a2, IEEE80211_ADDR_LEN);
break;
case IEEE80211_FC1_DIR_FROMDS:
qdf_mem_copy(eth_hdr->ether_dhost, a1, IEEE80211_ADDR_LEN);
qdf_mem_copy(eth_hdr->ether_shost, a3, IEEE80211_ADDR_LEN);
break;
case IEEE80211_FC1_DIR_DSTODS:
break;
}
eth_hdr->ether_type = ether_type;
}
#endif
void ol_rx_notify(struct cdp_cfg *cfg_pdev,
uint8_t vdev_id,
uint8_t *peer_mac_addr,
@@ -1391,12 +1336,6 @@ DONE:
if (!deliver_list_head)
return;
#if defined(PERE_IP_HDR_ALIGNMENT_WAR)
if (pdev->host_80211_enable)
for (msdu = deliver_list_head; msdu; msdu = qdf_nbuf_next(msdu))
transcap_nwifi_to_8023(msdu);
#endif
ol_txrx_frms_dump("rx delivering:",
pdev, deliver_list_head,
ol_txrx_frm_dump_tcp_seq | ol_txrx_frm_dump_contents,

View File

@@ -1172,10 +1172,6 @@ ol_txrx_pdev_post_attach(struct cdp_pdev *ppdev)
goto pn_trace_attach_fail;
}
#ifdef PERE_IP_HDR_ALIGNMENT_WAR
pdev->host_80211_enable = ol_scn_host_80211_enable_get(pdev->ctrl_pdev);
#endif
/*
* WDI event attach
*/

View File

@@ -871,10 +871,6 @@ struct ol_txrx_pdev_t {
} rx_pn_trace;
#endif /* ENABLE_RX_PN_TRACE */
#if defined(PERE_IP_HDR_ALIGNMENT_WAR)
bool host_80211_enable;
#endif
/*
* tx_sched only applies for HL, but is defined unconditionally
* rather than only if defined(CONFIG_HL_SUPPORT).

View File

@@ -206,22 +206,6 @@ static uint32_t wma_get_number_of_tids_supported(uint8_t no_of_peers_supported,
}
#endif
#ifdef PERE_IP_HDR_ALIGNMENT_WAR
static void wma_reset_rx_decap_mode(target_resource_config *tgt_cfg)
{
/*
* To make the IP header begins at dword aligned address,
* we make the decapsulation mode as Native Wifi.
*/
tgt_cfg->rx_decap_mode = CFG_TGT_RX_DECAP_MODE_NWIFI;
}
#else
static void wma_reset_rx_decap_mode(target_resource_config *tgt_cfg)
{
}
#endif
#ifndef NUM_OF_ADDITIONAL_FW_PEERS
#define NUM_OF_ADDITIONAL_FW_PEERS 2
#endif
@@ -305,9 +289,6 @@ static void wma_set_default_tgt_config(tp_wma_handle wma_handle,
tgt_cfg->mgmt_comp_evt_bundle_support = true;
tgt_cfg->tx_msdu_new_partition_id_support = true;
/* reduce the peer/vdev if CFG_TGT_NUM_MSDU_DESC exceeds 1000 */
wma_reset_rx_decap_mode(tgt_cfg);
if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE)
tgt_cfg->rx_decap_mode = CFG_TGT_RX_DECAP_MODE_RAW;
}