lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200911051949.30187.IvDoorn@gmail.com>
Date:	Thu, 5 Nov 2009 19:49:29 +0100
From:	Ivo van Doorn <ivdoorn@...il.com>
To:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Cc:	linux-wireless@...r.kernel.org,
	Gertjan van Wingerde <gwingerde@...il.com>,
	linux-kernel@...r.kernel.org,
	"John W. Linville" <linville@...driver.com>
Subject: Re: [PATCH 14/41] rt2800pci: add rt2800_regbusy_read() wrapper

On Wednesday 04 November 2009, Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
> Subject: [PATCH] rt2800pci: add rt2800_regbusy_read() wrapper
> 
> Part of preparations for later code unification.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>

The macros are the same for rt2800pci and rt2800usb.
So it might be better to move the entire define set into rt2800lib.h

If you haven't done so already in a subsequent patch, please fix it,
otherwise:

Acked-by: Ivo van Doorn <IvDoorn@...il.com>

Ivo


> ---
>  drivers/net/wireless/rt2x00/rt2800pci.c |   12 ++++++------
>  drivers/net/wireless/rt2x00/rt2800pci.h |    8 ++++++++
>  2 files changed, 14 insertions(+), 6 deletions(-)
> 
> Index: b/drivers/net/wireless/rt2x00/rt2800pci.c
> ===================================================================
> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
> @@ -69,14 +69,14 @@ MODULE_PARM_DESC(nohwcrypt, "Disable har
>   * The _lock versions must be used if you already hold the csr_mutex
>   */
>  #define WAIT_FOR_BBP(__dev, __reg) \
> -	rt2x00pci_regbusy_read((__dev), BBP_CSR_CFG, BBP_CSR_CFG_BUSY, (__reg))
> +	rt2800_regbusy_read((__dev), BBP_CSR_CFG, BBP_CSR_CFG_BUSY, (__reg))
>  #define WAIT_FOR_RFCSR(__dev, __reg) \
> -	rt2x00pci_regbusy_read((__dev), RF_CSR_CFG, RF_CSR_CFG_BUSY, (__reg))
> +	rt2800_regbusy_read((__dev), RF_CSR_CFG, RF_CSR_CFG_BUSY, (__reg))
>  #define WAIT_FOR_RF(__dev, __reg) \
> -	rt2x00pci_regbusy_read((__dev), RF_CSR_CFG0, RF_CSR_CFG0_BUSY, (__reg))
> +	rt2800_regbusy_read((__dev), RF_CSR_CFG0, RF_CSR_CFG0_BUSY, (__reg))
>  #define WAIT_FOR_MCU(__dev, __reg) \
> -	rt2x00pci_regbusy_read((__dev), H2M_MAILBOX_CSR, \
> -			       H2M_MAILBOX_CSR_OWNER, (__reg))
> +	rt2800_regbusy_read((__dev), H2M_MAILBOX_CSR, \
> +			    H2M_MAILBOX_CSR_OWNER, (__reg))
>  
>  static void rt2800pci_bbp_write(struct rt2x00_dev *rt2x00dev,
>  				const unsigned int word, const u8 value)
> @@ -350,7 +350,7 @@ static void rt2800pci_efuse_read(struct 
>  	rt2800_register_write(rt2x00dev, EFUSE_CTRL, reg);
>  
>  	/* Wait until the EEPROM has been loaded */
> -	rt2x00pci_regbusy_read(rt2x00dev, EFUSE_CTRL, EFUSE_CTRL_KICK, &reg);
> +	rt2800_regbusy_read(rt2x00dev, EFUSE_CTRL, EFUSE_CTRL_KICK, &reg);
>  
>  	/* Apparently the data is read from end to start */
>  	rt2800_register_read(rt2x00dev, EFUSE_DATA3,
> Index: b/drivers/net/wireless/rt2x00/rt2800pci.h
> ===================================================================
> --- a/drivers/net/wireless/rt2x00/rt2800pci.h
> +++ b/drivers/net/wireless/rt2x00/rt2800pci.h
> @@ -63,6 +63,14 @@ static inline void rt2800_register_multi
>  	rt2x00pci_register_multiwrite(rt2x00dev, offset, value, length);
>  }
>  
> +static inline int rt2800_regbusy_read(struct rt2x00_dev *rt2x00dev,
> +				      const unsigned int offset,
> +				      const struct rt2x00_field32 field,
> +				      u32 *reg)
> +{
> +	return rt2x00pci_regbusy_read(rt2x00dev, offset, field, reg);
> +}
> +
>  /*
>   * RF chip defines.
>   *
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ