[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ziquomff.fsf@qca.qualcomm.com>
Date: Thu, 9 Jun 2016 07:08:42 +0000
From: "Valo, Kalle" <kvalo@....qualcomm.com>
To: Prasun Maiti <prasunmaiti87@...il.com>
CC: Linux Kernel <linux-kernel@...r.kernel.org>,
"ath6kl@...ts.infradead.org" <ath6kl@...ts.infradead.org>,
Linux Next <linux-next@...r.kernel.org>,
"Linux Wireless" <linux-wireless@...r.kernel.org>,
Prasun Maiti <prasunmaii87@...il.com>
Subject: Re: [PATCH] Add .set_antenna callback in ath6kl driver to fix
wireless core warns
Prasun Maiti <prasunmaiti87@...il.com> writes:
> Since add more warnings for inconsistent ops in cfg80211, the wireless
> core warns if a driver implements a cfg80211 callback but doesn't
> implements the inverse operation. The ath6kl driver implements a cfg80211
> .get_antenna operation handler but doesn't have the inverse .set_antenna
> callback. So, it makes warning.
>
> To remove this warning, add .set_antenna callback in ath6kl driver which
> is unimplemented.
>
> Signed-off-by: Prasun Maiti <prasunmaiti87@...il.com>
[...]
> --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
> +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
> @@ -3231,6 +3231,16 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
> wait, buf, len, no_cck);
> }
>
> +static int ath6kl_set_antenna(struct wiphy *wiphy,
> + u32 tx_ant, u32 rx_ant)
> +{
> + /*
> + * Note: This callback should be implement when firmware support this
> + * command.
> + */
> + return 0;
> +}
> +
> static int ath6kl_get_antenna(struct wiphy *wiphy,
> u32 *tx_ant, u32 *rx_ant)
> {
> @@ -3456,6 +3466,7 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
> .cancel_remain_on_channel = ath6kl_cancel_remain_on_channel,
> .mgmt_tx = ath6kl_mgmt_tx,
> .mgmt_frame_register = ath6kl_mgmt_frame_register,
> + .set_antenna = ath6kl_set_antenna,
Now we are claiming that ath6kl supports set antenna command but it
actually doesn't do anything, I don't like that. I would rather look at
why cfg80211 issues the warning and is it really necessary.
--
Kalle Valo
Powered by blists - more mailing lists