Эх сурвалжийг харах

qcacmn: Add Null check to handle send_delba

Add a null check to avoid dereferencing send_delba
for QCA6390

Change-Id: If44b1ee4ed15918e27578f5bc98b0531d9b7cb29
CRs-Fixed: 2475880
Venkata Sharath Chandra Manchala 5 жил өмнө
parent
commit
a6c047026d

+ 12 - 10
dp/wifi3.0/dp_peer.c

@@ -2277,12 +2277,13 @@ static void dp_teardown_256_ba_sessions(struct dp_peer *peer)
 					delba_rcode = rx_tid->delba_rcode;
 
 					qdf_spin_unlock_bh(&rx_tid->tid_lock);
-					peer->vdev->pdev->soc->cdp_soc.ol_ops->send_delba(
-							peer->vdev->pdev->ctrl_pdev,
-							peer->ctrl_peer,
-							peer->mac_addr.raw,
-							tid, peer->vdev->ctrl_vdev,
-							delba_rcode);
+					if (peer->vdev->pdev->soc->cdp_soc.ol_ops->send_delba)
+						peer->vdev->pdev->soc->cdp_soc.ol_ops->send_delba(
+								peer->vdev->pdev->ctrl_pdev,
+								peer->ctrl_peer,
+								peer->mac_addr.raw,
+								tid, peer->vdev->ctrl_vdev,
+								delba_rcode);
 				} else {
 					qdf_spin_unlock_bh(&rx_tid->tid_lock);
 				}
@@ -2605,10 +2606,11 @@ int dp_delba_tx_completion_wifi3(void *peer_handle,
 			rx_tid->delba_tx_retry++;
 			rx_tid->delba_tx_status = 1;
 			qdf_spin_unlock_bh(&rx_tid->tid_lock);
-			peer->vdev->pdev->soc->cdp_soc.ol_ops->send_delba(
-				peer->vdev->pdev->ctrl_pdev, peer->ctrl_peer,
-				peer->mac_addr.raw, tid, peer->vdev->ctrl_vdev,
-				rx_tid->delba_rcode);
+			if (peer->vdev->pdev->soc->cdp_soc.ol_ops->send_delba)
+				peer->vdev->pdev->soc->cdp_soc.ol_ops->send_delba(
+					peer->vdev->pdev->ctrl_pdev, peer->ctrl_peer,
+					peer->mac_addr.raw, tid, peer->vdev->ctrl_vdev,
+					rx_tid->delba_rcode);
 		}
 		return QDF_STATUS_SUCCESS;
 	} else {

+ 7 - 6
dp/wifi3.0/dp_rx_err.c

@@ -546,12 +546,13 @@ dp_2k_jump_handle(struct dp_soc *soc,
 		rx_tid->delba_rcode =
 			IEEE80211_REASON_QOS_SETUP_REQUIRED;
 		qdf_spin_unlock_bh(&rx_tid->tid_lock);
-		soc->cdp_soc.ol_ops->send_delba(peer->vdev->pdev->ctrl_pdev,
-						peer->ctrl_peer,
-						peer->mac_addr.raw,
-						tid,
-						peer->vdev->ctrl_vdev,
-						rx_tid->delba_rcode);
+		if (soc->cdp_soc.ol_ops->send_delba)
+			soc->cdp_soc.ol_ops->send_delba(peer->vdev->pdev->ctrl_pdev,
+							peer->ctrl_peer,
+							peer->mac_addr.raw,
+							tid,
+							peer->vdev->ctrl_vdev,
+							rx_tid->delba_rcode);
 	} else {
 		qdf_spin_unlock_bh(&rx_tid->tid_lock);
 	}