firmware-utils/mkzynfw: fix available flash space calculation
[openwrt/staging/chunkeey.git] / package / mac80211 / patches / 550-ath9k_disable_hw_rfkill.patch
1 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
2 +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
3 @@ -961,18 +961,6 @@ static void ar5008_hw_rfbus_done(struct
4 REG_WRITE(ah, AR_PHY_RFBUS_REQ, 0);
5 }
6
7 -static void ar5008_hw_enable_rfkill(struct ath_hw *ah)
8 -{
9 - REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL,
10 - AR_GPIO_INPUT_EN_VAL_RFSILENT_BB);
11 -
12 - REG_CLR_BIT(ah, AR_GPIO_INPUT_MUX2,
13 - AR_GPIO_INPUT_MUX2_RFSILENT);
14 -
15 - ath9k_hw_cfg_gpio_input(ah, ah->rfkill_gpio);
16 - REG_SET_BIT(ah, AR_PHY_TEST, RFSILENT_BB);
17 -}
18 -
19 static void ar5008_restore_chainmask(struct ath_hw *ah)
20 {
21 int rx_chainmask = ah->rxchainmask;
22 @@ -1629,7 +1617,6 @@ void ar5008_hw_attach_phy_ops(struct ath
23 priv_ops->set_delta_slope = ar5008_hw_set_delta_slope;
24 priv_ops->rfbus_req = ar5008_hw_rfbus_req;
25 priv_ops->rfbus_done = ar5008_hw_rfbus_done;
26 - priv_ops->enable_rfkill = ar5008_hw_enable_rfkill;
27 priv_ops->restore_chainmask = ar5008_restore_chainmask;
28 priv_ops->set_diversity = ar5008_set_diversity;
29 priv_ops->do_getnf = ar5008_hw_do_getnf;
30 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
31 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
32 @@ -748,28 +748,6 @@ static void ar9003_hw_rfbus_done(struct
33 REG_WRITE(ah, AR_PHY_RFBUS_REQ, 0);
34 }
35
36 -/*
37 - * Set the interrupt and GPIO values so the ISR can disable RF
38 - * on a switch signal. Assumes GPIO port and interrupt polarity
39 - * are set prior to call.
40 - */
41 -static void ar9003_hw_enable_rfkill(struct ath_hw *ah)
42 -{
43 - /* Connect rfsilent_bb_l to baseband */
44 - REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL,
45 - AR_GPIO_INPUT_EN_VAL_RFSILENT_BB);
46 - /* Set input mux for rfsilent_bb_l to GPIO #0 */
47 - REG_CLR_BIT(ah, AR_GPIO_INPUT_MUX2,
48 - AR_GPIO_INPUT_MUX2_RFSILENT);
49 -
50 - /*
51 - * Configure the desired GPIO port for input and
52 - * enable baseband rf silence.
53 - */
54 - ath9k_hw_cfg_gpio_input(ah, ah->rfkill_gpio);
55 - REG_SET_BIT(ah, AR_PHY_TEST, RFSILENT_BB);
56 -}
57 -
58 static void ar9003_hw_set_diversity(struct ath_hw *ah, bool value)
59 {
60 u32 v = REG_READ(ah, AR_PHY_CCK_DETECT);
61 @@ -1206,7 +1184,6 @@ void ar9003_hw_attach_phy_ops(struct ath
62 priv_ops->set_delta_slope = ar9003_hw_set_delta_slope;
63 priv_ops->rfbus_req = ar9003_hw_rfbus_req;
64 priv_ops->rfbus_done = ar9003_hw_rfbus_done;
65 - priv_ops->enable_rfkill = ar9003_hw_enable_rfkill;
66 priv_ops->set_diversity = ar9003_hw_set_diversity;
67 priv_ops->ani_control = ar9003_hw_ani_control;
68 priv_ops->do_getnf = ar9003_hw_do_getnf;
69 --- a/drivers/net/wireless/ath/ath9k/hw-ops.h
70 +++ b/drivers/net/wireless/ath/ath9k/hw-ops.h
71 @@ -223,11 +223,6 @@ static inline void ath9k_hw_rfbus_done(s
72 return ath9k_hw_private_ops(ah)->rfbus_done(ah);
73 }
74
75 -static inline void ath9k_enable_rfkill(struct ath_hw *ah)
76 -{
77 - return ath9k_hw_private_ops(ah)->enable_rfkill(ah);
78 -}
79 -
80 static inline void ath9k_hw_restore_chainmask(struct ath_hw *ah)
81 {
82 if (!ath9k_hw_private_ops(ah)->restore_chainmask)
83 --- a/drivers/net/wireless/ath/ath9k/hw.c
84 +++ b/drivers/net/wireless/ath/ath9k/hw.c
85 @@ -1406,7 +1406,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
86 ath9k_hw_init_qos(ah);
87
88 if (ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
89 - ath9k_enable_rfkill(ah);
90 + ath9k_hw_cfg_gpio_input(ah, ah->rfkill_gpio);
91
92 ath9k_hw_init_global_settings(ah);
93
94 --- a/drivers/net/wireless/ath/ath9k/hw.h
95 +++ b/drivers/net/wireless/ath/ath9k/hw.h
96 @@ -576,7 +576,6 @@ struct ath_hw_private_ops {
97 void (*set_delta_slope)(struct ath_hw *ah, struct ath9k_channel *chan);
98 bool (*rfbus_req)(struct ath_hw *ah);
99 void (*rfbus_done)(struct ath_hw *ah);
100 - void (*enable_rfkill)(struct ath_hw *ah);
101 void (*restore_chainmask)(struct ath_hw *ah);
102 void (*set_diversity)(struct ath_hw *ah, bool value);
103 u32 (*compute_pll_control)(struct ath_hw *ah,