ath9k_htc: Initialize HW opmode
authorSujith <Sujith.Manoharan@atheros.com>
Mon, 29 Mar 2010 10:37:20 +0000 (16:07 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 31 Mar 2010 18:46:40 +0000 (14:46 -0400)
Not setting the opmode properly during initialization
results in the firmware sending up a bunch of packets
before add_interface() has been called, for the first
interface.

This patch fixes the issue by setting the initial mode
to 'managed'.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/htc_drv_init.c

index 3206eb06497da2f8e4d2a06a7df7ef5e1c8e6179..d8779b90713111e5ed67ec47a40756f8512aae07 100644 (file)
@@ -421,6 +421,7 @@ static void ath9k_init_misc(struct ath9k_htc_priv *priv)
                memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN);
 
        priv->op_flags |= OP_TXAGGR;
+       priv->ah->opmode = NL80211_IFTYPE_STATION;
 }
 
 static int ath9k_init_priv(struct ath9k_htc_priv *priv, u16 devid)