Browse Source

qca-wifi: Allow RootAP side devices to be re-learnt on Primary station

The change allows RootAP side devices to be re-learn on Primary
station. This is to take care of a schenario when secondary
station vap comes up first and RootAP side devices are learnt
on secondary station and the when primary station comes up
all the devices have to be re-learnt on Primary station.

Change-Id: If2317eab94edb145fbbff27046c7a5bc456a3302
Subhranil Choudhury 4 years ago
parent
commit
d6f386ad53
1 changed files with 11 additions and 0 deletions
  1. 11 0
      qca_multi_link/src/qca_multi_link.c

+ 11 - 0
qca_multi_link/src/qca_multi_link.c

@@ -942,6 +942,17 @@ static qca_multi_link_status_t qca_multi_link_primary_sta_rx(struct net_device *
 				QDF_TRACE(QDF_MODULE_ID_RPTR, QDF_TRACE_LEVEL_INFO,
 						FL("\n****Wifi Rptr Loop Detected****\n"));
 			}
+		} else {
+			if (!qca_ml_entry.qal_fdb_is_local
+				&& (qca_ml_entry.qal_fdb_ieee80211_ptr->iftype == NL80211_IFTYPE_STATION)) {
+				/* This condition allows any source on RootAP or behind to be re-learnt
+				 * on Primary Station to overwrite a learning on secondary station.
+				 * This kind of schenario can happen when secondary station vap
+				 * comes up first and RootAP side devices are learnt on
+				 * secondary station and the primary station vap comes up.
+				 */
+				return QCA_MULTI_LINK_PKT_ALLOW;
+			}
 		}
 		return QCA_MULTI_LINK_PKT_DROP;
 	}