Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1418093

[PATCH] Add .set_antenna callback in ath6kl driver to fix wireless core warns

From Prasun Maiti <prasunmaiti87@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] Add .set_antenna callback in ath6kl driver to fix wireless core warns
Date 2016-06-09 07:40 +0200
Message-ID <rI0Rc-22f-13@gated-at.bofh.it> (permalink)
References <rHVHP-78L-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@gmail.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 4e11ba0..e638296 100644
--- 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,
 	.get_antenna = ath6kl_get_antenna,
 	.sched_scan_start = ath6kl_cfg80211_sscan_start,
 	.sched_scan_stop = ath6kl_cfg80211_sscan_stop,
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-08 14:30 +0200
  Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove  wireless core warns "Valo, Kalle" <kvalo@qca.qualcomm.com> - 2016-06-08 16:30 +0200
    Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove  wireless core warns Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-08 16:40 +0200
      Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove  wireless core warns "Valo, Kalle" <kvalo@qca.qualcomm.com> - 2016-06-08 16:50 +0200
        Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove  wireless core warns Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-08 17:30 +0200
          Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove  wireless core warns "Valo, Kalle" <kvalo@qca.qualcomm.com> - 2016-06-08 17:40 +0200
            Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove  wireless core warns Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-08 17:50 +0200
              Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove  wireless core warns Ben Greear <greearb@candelatech.com> - 2016-06-08 18:00 +0200
                Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove  wireless core warns Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-08 18:00 +0200
                Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove  wireless core warns Ben Greear <greearb@candelatech.com> - 2016-06-08 18:20 +0200
          Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove  wireless core warns Julian Calaby <julian.calaby@gmail.com> - 2016-06-09 02:10 +0200
            Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove  wireless core warns Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-09 07:10 +0200
            [PATCH] Add .set_antenna callback in ath6kl driver to fix wireless core warns Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-09 07:40 +0200
              Re: [PATCH] Add .set_antenna callback in ath6kl driver to fix  wireless core warns Johannes Berg <johannes@sipsolutions.net> - 2016-06-09 08:50 +0200
              Re: [PATCH] Add .set_antenna callback in ath6kl driver to fix  wireless core warns "Valo, Kalle" <kvalo@qca.qualcomm.com> - 2016-06-09 09:10 +0200
    [PATCH] Add .set_antenna callback in ath6kl driver to fix wireless core warns Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-08 17:10 +0200

csiph-web