To prepare for concurrent mode, add an array ("vifs") to rtl8xxxu_priv
to keep track of both interfaces.
Keep the old priv->vif as long there are still users of it and let
priv->vifs[0] point to the same location.
Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-3-martin.kaistra@linutronix.de
* is supported and no iface_combinations are provided.
*/
struct ieee80211_vif *vif;
+
+ struct ieee80211_vif *vifs[2];
struct delayed_work ra_watchdog;
struct work_struct c2hcmd_work;
struct sk_buff_head c2hcmd_queue;
int ret;
u8 val8;
- if (!priv->vif)
+ if (!priv->vif) {
priv->vif = vif;
- else
+ priv->vifs[0] = vif;
+ } else {
return -EOPNOTSUPP;
+ }
switch (vif->type) {
case NL80211_IFTYPE_STATION:
dev_dbg(&priv->udev->dev, "%s\n", __func__);
- if (priv->vif)
+ if (priv->vif) {
priv->vif = NULL;
+ priv->vifs[0] = NULL;
+ }
}
static int rtl8xxxu_config(struct ieee80211_hw *hw, u32 changed)