staging: ks7010: refactor ks_wlan_translate_scan function
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Wed, 25 Apr 2018 14:01:55 +0000 (16:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Apr 2018 07:35:04 +0000 (09:35 +0200)
commitbcb53e8a466f2a95b2f3089006931b0b5984103b
tree2abd2dbf993a5e4c4f36d62dcc996111764b618b
parent55b56be2c40ca2eb59888d87a629c77329836747
staging: ks7010: refactor ks_wlan_translate_scan function

This commit refactors ks_wlan_translate_scan function with
the following changes:

    - reorder local variables
    - use ether_addr_copy to copy ethernet addresses
    - change style in 'current_ev' variable assignments
    - make use of some ternaries avoiding if-else code
    - use preferred style for comments
    - extract common code into a new ks_wlan_add_leader_event
      function

After this changes readability has been improved.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_wlan_net.c