mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
qcacld-3.0: Add lock for multicast list update
Currently, kernel provides the multicast address list to the driver and driver appends this list with new peer multicast address which are not included in the list. This is done in irq thread. But with recent changes, for NDI, driver will update this list on the peer addition and deletion which is executed in scheduler thread. This may lead to issue when request to update the multicast list comes from scheduler thread while irq thread request is in progress and vice-versa. So, to handle such situation, add spin lock which will protect the multicast address list. Change-Id: I9093a92d3714abd875dcd02743f711a5bed26090 CRs-Fixed: 3518989
This commit is contained in:
parent
367c18f303
commit
244338dedb
2 changed files with 7 additions and 0 deletions
|
|
@ -1223,6 +1223,8 @@ enum qdisc_filter_status {
|
|||
* @cache_sta_count: number of currently cached stations
|
||||
* @acs_complete_event: acs complete event
|
||||
* @latency_level: 0 - normal, 1 - moderate, 2 - low, 3 - ultralow
|
||||
* @mc_addr_list: multicast address list
|
||||
* @mc_list_lock: spin lock for multicast list
|
||||
* @last_disconnect_reason: Last disconnected internal reason code
|
||||
* as per enum qca_disconnect_reason_codes
|
||||
* @connect_req_status: Last disconnected internal status code
|
||||
|
|
@ -1408,6 +1410,7 @@ struct hdd_adapter {
|
|||
#endif
|
||||
|
||||
struct hdd_multicast_addr_list mc_addr_list;
|
||||
qdf_spinlock_t mc_list_lock;
|
||||
uint8_t addr_filter_pattern;
|
||||
|
||||
struct hdd_scan_info scan_info;
|
||||
|
|
|
|||
|
|
@ -4992,6 +4992,7 @@ static void __hdd_set_multicast_list(struct net_device *dev)
|
|||
if (!mc_list_request)
|
||||
return;
|
||||
|
||||
qdf_spin_lock_bh(&adapter->mc_list_lock);
|
||||
/* Delete already configured multicast address list */
|
||||
if (adapter->mc_addr_list.mc_cnt > 0)
|
||||
hdd_disable_and_flush_mc_addr_list(adapter,
|
||||
|
|
@ -5044,6 +5045,7 @@ static void __hdd_set_multicast_list(struct net_device *dev)
|
|||
hdd_enable_mc_addr_filtering(adapter, pmo_mc_list_change_notify);
|
||||
|
||||
free_req:
|
||||
qdf_spin_unlock_bh(&adapter->mc_list_lock);
|
||||
qdf_mem_free(mc_list_request);
|
||||
}
|
||||
|
||||
|
|
@ -6196,6 +6198,7 @@ static void hdd_cleanup_adapter(struct hdd_context *hdd_ctx,
|
|||
hdd_periodic_sta_stats_mutex_destroy(adapter);
|
||||
hdd_apf_context_destroy(adapter);
|
||||
qdf_spinlock_destroy(&adapter->vdev_lock);
|
||||
qdf_spinlock_destroy(&adapter->mc_list_lock);
|
||||
hdd_sta_info_deinit(&adapter->sta_info_list);
|
||||
hdd_sta_info_deinit(&adapter->cache_sta_info_list);
|
||||
|
||||
|
|
@ -7023,6 +7026,7 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, uint8_t sessio
|
|||
qdf_list_create(&adapter->blocked_scan_request_q, WLAN_MAX_SCAN_COUNT);
|
||||
qdf_mutex_create(&adapter->blocked_scan_request_q_lock);
|
||||
qdf_event_create(&adapter->acs_complete_event);
|
||||
qdf_spinlock_create(&adapter->mc_list_lock);
|
||||
qdf_event_create(&adapter->peer_cleanup_done);
|
||||
hdd_sta_info_init(&adapter->sta_info_list);
|
||||
hdd_sta_info_init(&adapter->cache_sta_info_list);
|
||||
|
|
|
|||
Loading…
Reference in a new issue