qcacmn: Fix invalid memory access while adding napi

When new napi is added unique napi_id is assigned and an entry
is allocated in kernel napi hash table of size 256, vice versa
napi del will remove the entry from hash table. Currently during
driver unload dummy rx napi's(added for GRO case) are not deleted
which causes resource leakage in kernel napi hash table.
While adding new napi if napi_id exceeds hash table size,
then entry from zero index is accessed to find unclaimed
hash entry which trigger invalid entry access since previous
driver unload did not delete napis properly.
In use case where multiple wlan driver instances are used this issue
can be quickly reproducible since it triggers napi_id to exceed
hash table size within less number of driver load/unload.

Fix is to delete rx dummy napi's during driver unload

Change-Id: Idfb24c5c09ebc131c2b19d894d08a8ea34675ed6
CRs-Fixed: 2288118
1 file changed