qcacld-3.0: Get DP interface by netdev
Currently while attaching vdev to DP interface we are searching DP interface based on the Adapter MAC address, but if STA MLD and Link address is same, we were getting the Link Interface instead of MLD interface, which was causing the EAPOL packet to drop. To Fix the issue, instead of searching for DP interface based on MAC address, use netdev to search DP interface. Change-Id: I50c7974c053717b496fab0eeb89774af382b4313 CRs-Fixed: 3258684
This commit is contained in:

committed by
Madan Koyyalamudi

parent
aba7313b9b
commit
eea57c0196
@@ -136,8 +136,7 @@ dp_get_intf_by_netdev(struct wlan_dp_psoc_context *dp_ctx, qdf_netdev_t dev)
|
||||
qdf_spin_lock_bh(&dp_ctx->intf_list_lock);
|
||||
for (dp_get_front_intf_no_lock(dp_ctx, &dp_intf); dp_intf;
|
||||
dp_get_next_intf_no_lock(dp_ctx, dp_intf, &dp_intf)) {
|
||||
if (!qdf_str_cmp(qdf_netdev_get_devname(dp_intf->dev),
|
||||
qdf_netdev_get_devname(dev))) {
|
||||
if (dp_intf->dev == dev) {
|
||||
qdf_spin_unlock_bh(&dp_ctx->intf_list_lock);
|
||||
return dp_intf;
|
||||
}
|
||||
@@ -887,7 +886,7 @@ dp_vdev_obj_create_notification(struct wlan_objmgr_vdev *vdev, void *arg)
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
struct qdf_mac_addr *mac_addr;
|
||||
struct qdf_mac_addr intf_mac;
|
||||
qdf_netdev_t dev;
|
||||
|
||||
dp_info("DP VDEV OBJ create notification");
|
||||
|
||||
@@ -900,18 +899,18 @@ dp_vdev_obj_create_notification(struct wlan_objmgr_vdev *vdev, void *arg)
|
||||
dp_ctx = dp_psoc_get_priv(psoc);
|
||||
mac_addr = (struct qdf_mac_addr *)wlan_vdev_mlme_get_macaddr(vdev);
|
||||
|
||||
status = dp_ctx->dp_ops.dp_get_nw_intf_mac_by_vdev_mac(mac_addr,
|
||||
&intf_mac);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
dev = dp_ctx->dp_ops.dp_get_netdev_by_vdev_mac(mac_addr);
|
||||
if (!dev) {
|
||||
dp_err("Failed to get intf mac:" QDF_MAC_ADDR_FMT,
|
||||
QDF_MAC_ADDR_REF(mac_addr));
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
dp_intf = dp_get_intf_by_macaddr(dp_ctx, &intf_mac);
|
||||
dp_intf = dp_get_intf_by_netdev(dp_ctx, dev);
|
||||
if (!dp_intf) {
|
||||
dp_err("Failed to get dp intf mac:" QDF_MAC_ADDR_FMT,
|
||||
QDF_MAC_ADDR_REF(mac_addr));
|
||||
dp_err("Failed to get dp intf dev: %s",
|
||||
qdf_netdev_get_devname(dev));
|
||||
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
|
@@ -562,8 +562,8 @@ union wlan_tp_data {
|
||||
/**
|
||||
* struct wlan_dp_psoc_callbacks - struct containing callback
|
||||
* to non-converged driver
|
||||
* @os_if_dp_gro_rx: OS IF Callback to handle GRO packet to n/w stack
|
||||
* @callback_ctx : Opaque callback context
|
||||
* @dp_get_netdev_by_vdev_mac: Callback to get netdev from vdev mac address
|
||||
* @wlan_dp_sta_get_dot11mode: Callback to get dot11 mode
|
||||
* @wlan_dp_get_ap_client_count: Callback to get client count connected to AP
|
||||
* @wlan_dp_sta_ndi_connected: Callback to get NDI connected status
|
||||
@@ -591,8 +591,7 @@ union wlan_tp_data {
|
||||
struct wlan_dp_psoc_callbacks {
|
||||
hdd_cb_handle callback_ctx;
|
||||
|
||||
QDF_STATUS (*dp_get_nw_intf_mac_by_vdev_mac)(struct qdf_mac_addr *mac_addr,
|
||||
struct qdf_mac_addr *intf_mac);
|
||||
qdf_netdev_t (*dp_get_netdev_by_vdev_mac)(struct qdf_mac_addr *mac_addr);
|
||||
unsigned int (*dp_get_tx_flow_low_watermark)(hdd_cb_handle cb_ctx,
|
||||
uint8_t intf_id);
|
||||
void (*dp_get_tx_resource)(uint8_t intf_id, struct qdf_mac_addr *mac_addr);
|
||||
|
@@ -1895,8 +1895,8 @@ void ucfg_dp_register_hdd_callbacks(struct wlan_objmgr_psoc *psoc,
|
||||
dp_ctx->dp_ops.dp_tsf_timestamp_rx = cb_obj->dp_tsf_timestamp_rx;
|
||||
dp_ctx->dp_ops.dp_gro_rx_legacy_get_napi =
|
||||
cb_obj->dp_gro_rx_legacy_get_napi;
|
||||
dp_ctx->dp_ops.dp_get_nw_intf_mac_by_vdev_mac =
|
||||
cb_obj->dp_get_nw_intf_mac_by_vdev_mac;
|
||||
dp_ctx->dp_ops.dp_get_netdev_by_vdev_mac =
|
||||
cb_obj->dp_get_netdev_by_vdev_mac;
|
||||
|
||||
dp_ctx->dp_ops.dp_nbuf_push_pkt = cb_obj->dp_nbuf_push_pkt;
|
||||
dp_ctx->dp_ops.dp_rx_napi_gro_flush = cb_obj->dp_rx_napi_gro_flush;
|
||||
|
Reference in New Issue
Block a user