Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within utils replace any such comparisons with logical
operations performed on the pointer itself.
Change-Id: Iae6c2f2f0b3041a9397dd13092ea500a8b995fd2
CRs-Fixed: 2418251
Currently the NL MSG handlers for WLAN_NL_MSG_CNSS_DIAG, ANI_NL_MSG_PUMAC
and ANI_NL_MSG_PTT are not deregistered during hdd_wlan_exit which can
causes a page fault if NL issues cld80211_doit for these NL messages
when the WLAN is not up.
Add Deregsiter APIs for all the NL MSGs to call as part of
hdd_exit_netlink_services during hdd_wlan_exit.
Change-Id: I231e2f32e708e9a14305f0a8f9f2f603aa42b031
CRs-Fixed: 2243993
There is a possibility of buffer overread while processing PTT
commands, because of packet length check is missing.
While processing PTT commands, validate packet length to make sure
there is no buffer overread.
Change-Id: I65b2839b0812fc8b2421e4d73e14a05620411c53
CRs-Fixed: 2121017
Fix a compilation issue introduced by the change
"Change-Id: I3bb7170c971f66178efe5cda837337a2e362f822".
Change-Id: Icfb204a5c6b0f5e471583df1c7b84441a6ee546a
CRs-Fixed: 2126606
The feature CNSS_GENL is enabling compilation of some part of the
code. This feature depends on CONFIG_CNSS_GENL. Fix some of the basic
compilation issues.
Change-Id: I5cd3645cd8a10367abcfe89abda8de16548385b7
CRs-Fixed: 2123538
The Linux kernel version 4.12 introduced an API change to nla_parse().
Add conditional compilation to call nla_parse with the correct
parameters based on the version of the linux kernel being compiled
against.
Change-Id: Ie904d217a42a2396f8245251a9c90a15dac2c0c9
CRs-Fixed: 2093354
In ptt_cmd_handler(), validate that the command attribute is of
minimum allowed size. This prevents parsing of rogue command
format. Also add audit comment to express the intent why policy
table is not used while using nla_parse API.
Change-Id: Ia2da6c88245190aad9a00110059fd6dcfda8a9fa
CRs-Fixed: 2058353
Currently user space communication functions[cnss diag, PTT socket app]
in host driver uses netlink user sockets which is a security concern from
Linux Android SE policies.
Add support for to use netlink family cld80211 which uses generic
netlink sockets.
Change-Id: Ia833249c1f312415e38563d90214979cea3d9f0e
CRs-Fixed: 2015931