From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423661AbcFIHIx (ORCPT ); Thu, 9 Jun 2016 03:08:53 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:25002 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751672AbcFIHIv convert rfc822-to-8bit (ORCPT ); Thu, 9 Jun 2016 03:08:51 -0400 X-IronPort-AV: E=Sophos;i="5.26,443,1459839600"; d="scan'208";a="294481057" X-IronPort-AV: E=McAfee;i="5700,7163,8190"; a="714438412" From: "Valo, Kalle" To: Prasun Maiti CC: Linux Kernel , "ath6kl@lists.infradead.org" , Linux Next , "Linux Wireless" , Prasun Maiti Subject: Re: [PATCH] Add .set_antenna callback in ath6kl driver to fix wireless core warns Thread-Topic: [PATCH] Add .set_antenna callback in ath6kl driver to fix wireless core warns Thread-Index: AQHRwh3B/3qeqUI20UOG5LHw2QPg7Q== Date: Thu, 9 Jun 2016 07:08:42 +0000 Message-ID: <87ziquomff.fsf@qca.qualcomm.com> References: <1465450591-23543-1-git-send-email-prasunmaiti87@gmail.com> In-Reply-To: <1465450591-23543-1-git-send-email-prasunmaiti87@gmail.com> (Prasun Maiti's message of "Thu, 9 Jun 2016 11:06:31 +0530") Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [199.106.107.6] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Prasun Maiti 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 [...] > --- 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