ath9k: fix using sta->drv_priv before initializing it
authorFelix Fietkau <nbd@nbd.name>
Fri, 19 Aug 2016 10:37:46 +0000 (13:37 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2016 08:07:41 +0000 (10:07 +0200)
commit17127b7c6951e4fbe5ec7a692b715a5533f7c149
tree1afbf848976b086a7fe693f9aebf9ac03220c30b
parent10c2897d864e58ae7706bcb9c3b54b8d667dcb51
ath9k: fix using sta->drv_priv before initializing it

commit 7711aaf08ad3fc4d0e937eec1de0a63620444ce7 upstream.

A station pointer can be passed to the driver on tx, before it has been
marked as associated. Since ath9k_sta_state was initializing the entry
too late, it resulted in some spurious crashes.

Fixes: df3c6eb34da5 ("ath9k: Use sta_state() callback")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath9k/main.c