qcacld-3.0: Add/del virtual iface using NL commands for NDP

Currently host driver creates/deletes NDI interfaces using
vendor command. With the kernel 5.12 version onwards,
interface creation/deletion is not allowed using vendor
commands as it leads to deadlock when driver tries to acquire
the RTNL_LOCK at the time of netdev register/unregister.

With this change, add support to Create and delete NDI interface
using NL80211_CMD_NEW_INTERFACE and NL80211_CMD_DEL_INTERFACE
commands respectively if driver advertises
QCA_WLAN_VENDOR_FEATURE_USE_ADD_DEL_VIRTUAL_INTF_FOR_NDI capability.
Since NL80211_CMD_NEW_INTERFACE and NL80211_CMD_DEL_INTERFACE
already comes with the rtnl lock and driver does not need to
take the rtnl lock again which will help to avoid the above issue.

Change-Id: I6d5441a5e883de1222f105f26d73cb0506d16ddf
CRs-Fixed: 3167125
This commit is contained in:
Ashish
2022-04-01 23:38:02 +05:30
committed by Madan Koyyalamudi
parent bdf70fa4aa
commit cede71c355
6 changed files with 213 additions and 32 deletions

View File

@@ -803,7 +803,7 @@ struct nan_callbacks {
struct wlan_objmgr_vdev *vdev,
uint32_t type, void *msg);
void (*ucfg_nan_request_process_cb)(void *cookie);
int (*ndi_open)(char *iface_name);
int (*ndi_open)(const char *iface_name, bool is_add_virtual_iface);
int (*ndi_start)(char *iface_name, uint16_t);
void (*ndi_close)(uint8_t);
int (*ndi_delete)(uint8_t, char *iface_name, uint16_t transaction_id);