wifi: fix samsung wifi logic

Change-Id: Ib065c0dffa1265a17f5e4fd6ec0b0ad36bbc7b14
wifi: add support for semcosh nvram

Change-Id: I272607b2835c5df97b8e175a9bcd559b3ec1a105
uevent: Allow multiple uevent listeners from the same process

The netlink socket created by uevent_init sets the nl_pid to the
current PID. nl_pid must be unique per-process, however it does not
have to do with the PID. From the documentation:

"
For a user-space process, nl_pid
is usually the PID of the process owning the destination socket.
However, nl_pid identifies a netlink socket, not a process.  If a
process owns several netlink sockets, then nl_pid can be equal to the
process ID only for at most one socket.
"

In use cases where a single process calls uevent_init more than one
time, the second one will always fail. This patch sets the nl_pid
to 0, which lets the kernel pick its own unique identifier as per the
documentation:

"
If the application sets it to 0, the kernel takes
care of assigning it.  The kernel assigns the process ID to the first
netlink socket the process opens and assigns a unique nl_pid to every
netlink socket that the process subsequently creates.
"

The behavior stays the same for the first socket but will also succeed
in subsequent calls.

Change-Id: I6fa74adc9d5835ff39b86187799998111fc12001
(cherry picked from commit 6dcd02055aaa2ce1e7132d5886557a7a5be6571f)
Check for monitor_conn existence before accessing the same

Monitor_conn socket gets closed by wifistatemachine and thus
accessing the same in WiFiMonitor thread results in a crash.
Hence check for the same before accessing the same.

Change-Id: I15024fa5324187c6e8dbd483238bfbeea7c4c016
CRs-Fixed: 590655
Merge remote-tracking branch 'github/cm-12.0' into cm-12.0