2020-04-14 16:51:03

by Oscar Carter

[permalink] [raw]
Subject: [PATCH 0/5] staging: vt6656: Rebase all rejected patches

This patch series makes a "rebase" of all the patches that were
previously rejected because they did not apply.

The first patch uses the error code returned by the vnt_control_out
function as the returned value of the vnt_rf_write_embedded function
instead of a boolean value. This way, the return value is an error code.
Also, fix all the vnt_rf_write_embedded calls accordingly.

The second patch uses the BIT() macro instead of the bit left shift
operator.

The third patch use the define RATE_11M present in the file "device.h"
instead of the magic number 3.

The fourth patch creates a constant array with the values of the
"phy->signal" variable for every rate and makes a refactor of the
assignment of this variable.

The fifth path takes out the "phy->service" assignment from the if-else
statement due to it's the same for the two branches.

Oscar Carter (5):
staging: vt6656: Return error code in vnt_rf_write_embedded function
staging: vt6656: Use BIT() macro instead of bit shift operator
staging: vt6656: Use define instead of magic number for tx_rate
staging: vt6656: Refactor the assignment of the phy->signal variable
staging: vt6656: Remove duplicate code for the phy->service assignment

drivers/staging/vt6656/baseband.c | 111 ++++++++----------------------
drivers/staging/vt6656/card.c | 4 +-
drivers/staging/vt6656/rf.c | 99 ++++++++++++++++----------
3 files changed, 95 insertions(+), 119 deletions(-)

--
2.20.1


2020-04-14 16:52:42

by Oscar Carter

[permalink] [raw]
Subject: [PATCH 3/5] staging: vt6656: Use define instead of magic number for tx_rate

Use the define RATE_11M present in the file "device.h" instead of the
magic number 3. So the code is more clear.

Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Oscar Carter <[email protected]>
---
drivers/staging/vt6656/baseband.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index e0352405e4cf..149c9bba7108 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -24,6 +24,7 @@

#include <linux/bits.h>
#include <linux/kernel.h>
+#include "device.h"
#include "mac.h"
#include "baseband.h"
#include "rf.h"
@@ -221,7 +222,7 @@ unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type,

rate = (unsigned int)vnt_frame_time[tx_rate];

- if (tx_rate <= 3) {
+ if (tx_rate <= RATE_11M) {
if (preamble_type == PREAMBLE_SHORT)
preamble = 96;
else
--
2.20.1