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-next>] [day] [month] [year] [list]
Message-Id: <1512227648-16008-1-git-send-email-linux@wolf-entwicklungen.de>
Date:   Sat,  2 Dec 2017 17:14:08 +0200
From:   Marcus Wolf <linux@...f-entwicklungen.de>
To:     gregkh@...uxfoundation.org, dan.carpenter@...cle.com,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Cc:     Marcus Wolf <linux@...f-entwicklungen.de>
Subject: [PATCH] staging: pi433: Removed some obsolete or duplicated defines; moved two defines to better locations

The define FIFO_SIZE was moved to rf69_registers.h. Although it is not a register,
it is a value, that is given by hardware (like the registers).

The define FIFO_THRESHOLD was moved to pi433_if.c, since it is a value, that is
freely choosen by the interface implementation. The better the response time of
the driver, the lower threshold can be set.

Signed-off-by: Marcus Wolf <linux@...f-entwicklungen.de>
---
 drivers/staging/pi433/pi433_if.c       |    1 +
 drivers/staging/pi433/rf69.c           |    1 -
 drivers/staging/pi433/rf69.h           |    5 -----
 drivers/staging/pi433/rf69_registers.h |    5 +++++
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 2a205c6..292f121 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -59,6 +59,7 @@
 #define MAX_MSG_SIZE			900	/* min: FIFO_SIZE! */
 #define MSG_FIFO_SIZE			65536   /* 65536 = 2^16  */
 #define NUM_DIO				2
+#define FIFO_THRESHOLD			15	/* in byte */
 
 static dev_t pi433_dev;
 static DEFINE_IDR(pi433_idr);
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 767b565..ec4b540 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -31,7 +31,6 @@
 #include "rf69_registers.h"
 
 #define F_OSC 32000000 /* in Hz */
-#define FIFO_SIZE 66   /* in byte */
 
 /*-------------------------------------------------------------------------*/
 
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index 5c0c956..645c8df 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -20,11 +20,6 @@
 #include "rf69_enum.h"
 #include "rf69_registers.h"
 
-#define F_OSC		32000000  /* in Hz */
-#define FREQUENCY	433920000 /* in Hz, modifying this value impacts CE certification */
-#define FIFO_SIZE	66		/* in byte */
-#define FIFO_THRESHOLD	15		/* in byte */
-
 int rf69_set_mode(struct spi_device *spi, enum mode mode);
 int rf69_set_data_mode(struct spi_device *spi, enum dataMode dataMode);
 int rf69_set_modulation(struct spi_device *spi, enum modulation modulation);
diff --git a/drivers/staging/pi433/rf69_registers.h b/drivers/staging/pi433/rf69_registers.h
index 6335d42..cffafd1 100644
--- a/drivers/staging/pi433/rf69_registers.h
+++ b/drivers/staging/pi433/rf69_registers.h
@@ -16,6 +16,11 @@
  */
 
 /*******************************************/
+/* size of the hardware fifo		   */
+/*******************************************/
+#define FIFO_SIZE			66
+
+/*******************************************/
 /* RF69 register addresses		   */
 /*******************************************/
 #define  REG_FIFO			0x00
-- 
1.7.10.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ