iwn: fix return code conflict in iwn_init_locked()
authoravos <avos@FreeBSD.org>
Sat, 25 Mar 2017 22:07:21 +0000 (22:07 +0000)
committeravos <avos@FreeBSD.org>
Sat, 25 Mar 2017 22:07:21 +0000 (22:07 +0000)
commit0b545058a54f4a400f873a2ebdc7e63f2a73a0ee
tree2da9dd73548786d915a8f1149e00534a48729fd5
parente88a716db981f2d1313db78f834b3344022f48a1
iwn: fix return code conflict in iwn_init_locked()

Do not try to use errno(2) codes here; instead, just return unique
value (1) when radio is disabled via hardware switch and another
one (-1) for any other error in initialization path.

Tested with Intel 6205, STA mode.
sys/dev/iwn/if_iwn.c