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


Groups > linux.kernel > #1419482

Re: [PATCH v2 2/3] mwifiex: move .get_tx_power logic to station ioctl file

From Kalle Valo <kvalo@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/3] mwifiex: move .get_tx_power logic to station ioctl file
Date 2016-06-10 16:40 +0200
Message-ID <rIvLk-5JV-39@gated-at.bofh.it> (permalink)
References <rH6ch-7N1-3@gated-at.bofh.it> <rH6ci-7N1-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Javier Martinez Canillas <javier@osg.samsung.com> writes:

> From: Shengzhen Li <szli@marvell.com>
>
> Most cfg80211 operations are just a wrappers to functions defined in the
> sta_ioctl.c file, so for consistency move the .get_tx_power logic there.
>
> Signed-off-by: Shengzhen Li <szli@marvell.com>
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> [javier: update the subject line and commit message]
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

[...]

> --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> @@ -385,18 +385,10 @@ mwifiex_cfg80211_get_tx_power(struct wiphy *wiphy,
>  			      int *dbm)
>  {
>  	struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
> -	struct mwifiex_private *priv = mwifiex_get_priv(adapter,
> -							MWIFIEX_BSS_ROLE_ANY);
> -	int ret = mwifiex_send_cmd(priv, HostCmd_CMD_RF_TX_PWR,
> -				   HostCmd_ACT_GEN_GET, 0, NULL, true);
> -
> -	if (ret < 0)
> -		return ret;
> -
> -	/* tx_power_level is set in HostCmd_CMD_RF_TX_PWR command handler */
> -	*dbm = priv->tx_power_level;
> +	struct mwifiex_private *priv;
>  
> -	return 0;
> +	priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY);
> +	return mwifiex_get_tx_power(priv, dbm);
>  }

So in patch 1 you added the patch and in patch 2 you move it to a
different location? That doesn't make any sense, can't you just fold the
two patches into one so that the function is added only once.

-- 
Kalle Valo

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


Thread

[PATCH v2 2/3] mwifiex: move .get_tx_power logic to station ioctl file Javier Martinez Canillas <javier@osg.samsung.com> - 2016-06-06 19:10 +0200
  Re: [PATCH v2 2/3] mwifiex: move .get_tx_power logic to station ioctl file Enric Balletbo Serra <eballetbo@gmail.com> - 2016-06-09 10:20 +0200
  Re: [PATCH v2 2/3] mwifiex: move .get_tx_power logic to station ioctl  file Javier Martinez Canillas <javier@osg.samsung.com> - 2016-06-10 16:40 +0200
    RE: [PATCH v2 2/3] mwifiex: move .get_tx_power logic to station ioctl  file Amitkumar Karwar <akarwar@marvell.com> - 2016-06-10 18:30 +0200
      Re: [PATCH v2 2/3] mwifiex: move .get_tx_power logic to station ioctl  file Javier Martinez Canillas <javier@osg.samsung.com> - 2016-06-10 21:40 +0200
        Re: [PATCH v2 2/3] mwifiex: move .get_tx_power logic to station ioctl file Kalle Valo <kvalo@codeaurora.org> - 2016-06-10 22:00 +0200
  Re: [PATCH v2 2/3] mwifiex: move .get_tx_power logic to station ioctl file Kalle Valo <kvalo@codeaurora.org> - 2016-06-10 16:40 +0200

csiph-web