qcacld-3.0: Restart NDI adapter as part of SSR

Currently, NDI adapter is not restarted when SSR happens. Start the
adapter as part of recovery so that it creates NDI vdev.

Change-Id: Ifa159b53e7e9571404f1d9cecd62755fe5e8c600
CRs-Fixed: 2707460
This commit is contained in:
Srinivas Dasari 2020-07-18 23:26:44 +05:30 • committed by snandini
commit 2fa59bd789
2 changed files with 22 additions and 2 deletions

View file

@ -7810,7 +7810,8 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
hdd_enter();
hdd_for_each_adapter(hdd_ctx, adapter) {
if (!hdd_is_interface_up(adapter))
if (!hdd_is_interface_up(adapter) &&
adapter->device_mode != QDF_NDI_MODE)
continue;
hdd_debug("[SSR] start adapter with device mode %s(%d)",
@ -7931,6 +7932,8 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
adapter, adapter->mon_chan_freq,
adapter->mon_bandwidth);
break;
case QDF_NDI_MODE:
hdd_ndi_start(adapter->dev->name, 0);
default:
break;
}

View file

@ -69,6 +69,19 @@ void hdd_ndp_session_end_handler(struct hdd_adapter *adapter);
void hdd_cleanup_ndi(struct hdd_context *hdd_ctx,
struct hdd_adapter *adapter);
/**
* hdd_ndi_start(): Start NDI adapter and create NDI vdev
* @iface_name: NDI interface name
* @transaction_id: Transaction id given by framework to start the NDI.
* Framework expects this in the immediate response when
* the NDI is created by it.
*
* Create NDI move interface and vdev.
*
* Return: 0 upon success
*/
int hdd_ndi_start(char *iface_name, uint16_t transaction_id);
#else
#define WLAN_HDD_IS_NDI(adapter) (false)
#define WLAN_HDD_IS_NDI_CONNECTED(adapter) (false)
@ -101,13 +114,17 @@ static inline void hdd_cleanup_ndi(struct hdd_context *hdd_ctx,
struct hdd_adapter *adapter)
{
}
static inline int hdd_ndi_start(char *iface_name, uint16_t transaction_id)
{
return 0;
}
#endif /* WLAN_FEATURE_NAN */
enum nan_datapath_state;
struct nan_datapath_inf_create_rsp;
int hdd_ndi_open(char *iface_name);
int hdd_ndi_start(char *iface_name, uint16_t transaction_id);
int hdd_ndi_delete(uint8_t vdev_id, char *iface_name, uint16_t transaction_id);
void hdd_ndi_close(uint8_t vdev_id);
void hdd_ndi_drv_ndi_create_rsp_handler(uint8_t vdev_id,