On 8 May 2015 at 16:01, <c_mpubbi@xxxxxxxxxxxxxxxx> wrote: > From: Manikanta Pubbisetty <c_mpubbi@xxxxxxxxxxxxxxxx> > > For devices working in 2.4 GHz to be ETSI compliant, > it is required to support adaptive CCA. Some firmwares > support adaptive CCA and is disabled by default. > > The patch is an attempt to add a new debugfs interface to enable > adaptive cca on supported firmwares. Support for this feature is > advertised with a new firmware feature flag. I guess this should be configured automatically depending on DFS domain. You can't expect users to configure their devices via debugfs, can you? This should just work. > Signed-off-by: Manikanta Pubbisetty <c_mpubbi@xxxxxxxxxxxxxxxx> > --- > drivers/net/wireless/ath/ath10k/core.h | 9 ++++-- > drivers/net/wireless/ath/ath10k/debug.c | 52 +++++++++++++++++++++++++++++++ > drivers/net/wireless/ath/ath10k/wmi-ops.h | 21 +++++++++++++ > drivers/net/wireless/ath/ath10k/wmi.c | 31 ++++++++++++++++++ > drivers/net/wireless/ath/ath10k/wmi.h | 10 ++++++ > 5 files changed, 121 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h > index 827b3d7..89176f1 100644 > --- a/drivers/net/wireless/ath/ath10k/core.h > +++ b/drivers/net/wireless/ath/ath10k/core.h > @@ -461,10 +461,13 @@ enum ath10k_fw_features { > ATH10K_FW_FEATURE_WOWLAN_SUPPORT = 6, > > /* Don't trust error code from otp.bin */ > - ATH10K_FW_FEATURE_IGNORE_OTP_RESULT, > + ATH10K_FW_FEATURE_IGNORE_OTP_RESULT = 7, > + > + /* Firmware has support for adaptive CCA */ > + ATH10K_FW_FEATURE_HAS_ADAPTIVE_CCA = 8, > > /* keep last */ > - ATH10K_FW_FEATURE_COUNT, > + ATH10K_FW_FEATURE_COUNT There's no need to remove the comma, is there? > }; > > enum ath10k_dev_flags { > @@ -726,6 +729,8 @@ struct ath10k { > struct ath10k_thermal thermal; > struct ath10k_wow wow; > > + bool ath10k_adaptive_cca_enable; > + Maybe just adaptive_cca? [...] > diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h > index 47fe2e7..eb7991e 100644 > --- a/drivers/net/wireless/ath/ath10k/wmi-ops.h > +++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h > @@ -174,6 +174,10 @@ struct wmi_ops { > const struct wmi_tdls_peer_capab_arg *cap, > const struct wmi_channel_arg *chan); > struct sk_buff *(*gen_adaptive_qcs)(struct ath10k *ar, bool enable); > + struct sk_buff *(*gen_pdev_enable_adaptive_cca)(struct ath10k *ar, > + u8 enable, > + int detect_level, > + u32 detect_margin); I'm just picky here - but you could probably use "s32" for signed values instead of "int". This way function argument types would be more unified/consistent. Michał -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html