diff options
| author | Jinwei Chen <jinweic@codeaurora.org> | 2018-04-03 11:01:52 +0800 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-04-03 14:52:14 -0700 |
| commit | 384e5d9161fc441f76b1461acfc187126dbda71a (patch) | |
| tree | 13811d26ef04fecfa2c1eb2ebe373482927cbdef | |
| parent | d28a94bc4aa7b51b17d85a2d71a5630953e4bb45 (diff) | |
qcacld-3.0: Fix issue in connection to WAPI AP
Recent change in hdd_is_tx_allowed function causes failure in Tx of WAPI
Auth frames. Add check in this function to allow Tx of WAPI auth frames
so that device can connect to a WAPI AP.
Change-Id: Id5d4d31385309381383dec432698a8ac625845ad
CRs-Fixed: 2217090
| -rw-r--r-- | core/hdd/inc/wlan_hdd_tx_rx.h | 4 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_tx_rx.c | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/core/hdd/inc/wlan_hdd_tx_rx.h b/core/hdd/inc/wlan_hdd_tx_rx.h index c5ff55f5fdcc..56ef2f576809 100644 --- a/core/hdd/inc/wlan_hdd_tx_rx.h +++ b/core/hdd/inc/wlan_hdd_tx_rx.h @@ -45,6 +45,10 @@ #define HDD_ETHERTYPE_802_1_X_FRAME_OFFSET 12 #ifdef FEATURE_WLAN_WAPI #define HDD_ETHERTYPE_WAI 0x88b4 +#define IS_HDD_ETHERTYPE_WAI(_skb) (ntohs(_skb->protocol) == \ + HDD_ETHERTYPE_WAI) +#else +#define IS_HDD_ETHERTYPE_WAI(_skb) (false) #endif #define HDD_PSB_CFG_INVALID 0xFF diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index 154000ef57f2..d37b237e9b7c 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -790,7 +790,8 @@ static inline bool hdd_is_tx_allowed(struct sk_buff *skb, uint8_t peer_id) if (OL_TXRX_PEER_STATE_AUTH == peer_state) return true; else if (OL_TXRX_PEER_STATE_CONN == peer_state && - ntohs(skb->protocol) == HDD_ETHERTYPE_802_1_X) + (ntohs(skb->protocol) == HDD_ETHERTYPE_802_1_X + || IS_HDD_ETHERTYPE_WAI(skb))) return true; DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_DROP_PACKET_RECORD, (uint8_t *)skb->data, @@ -996,6 +997,10 @@ static netdev_tx_t __hdd_hard_start_xmit(struct sk_buff *skb, goto drop_pkt_and_release_skb; } if (!hdd_is_tx_allowed(skb, STAId)) { + QDF_TRACE(QDF_MODULE_ID_HDD_DATA, + QDF_TRACE_LEVEL_INFO_HIGH, + "%s: Tx is not allowed. drop the pkt", + __func__); ++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac]; goto drop_pkt_and_release_skb; } |
