linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] rtl8xxxu bugfix and minor updates
@ 2016-06-09 18:38 Jes.Sorensen
  2016-06-09 18:38 ` [PATCH 1/4] rtl8xxxu: Add bit definitions for REG_USB_SPECIAL_OPTION Jes.Sorensen
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jes.Sorensen @ 2016-06-09 18:38 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, Larry.Finger, Jes Sorensen

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Hi,

A couple of simple patches from my current queue. The most important
one is from Colin Ian King fixing the use of a wrong variable. That
one should probably go into v4.7. The others are fine for the next
round.

Cheers,
Jes


Andy Shevchenko (1):
  rtl8xxxu: tuse %*ph to dump buffers

Colin Ian King (1):
  rtl8xxxu: fix typo on variable name, compare against correct variable

Jes Sorensen (2):
  rtl8xxxu: Add bit definitions for REG_USB_SPECIAL_OPTION
  rtl8xxxu: Add additional documentation for RX DMA registers

 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c |  9 ++-------
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 11 +++--------
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c |  9 ++-------
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h  | 14 +++++++++++---
 4 files changed, 18 insertions(+), 25 deletions(-)

-- 
2.5.5


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] rtl8xxxu: Add bit definitions for REG_USB_SPECIAL_OPTION
  2016-06-09 18:38 [PATCH 0/4] rtl8xxxu bugfix and minor updates Jes.Sorensen
@ 2016-06-09 18:38 ` Jes.Sorensen
  2016-06-29 15:44   ` [1/4] " Kalle Valo
  2016-06-09 18:38 ` [PATCH 2/4] rtl8xxxu: Add additional documentation for RX DMA registers Jes.Sorensen
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Jes.Sorensen @ 2016-06-09 18:38 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, Larry.Finger, Jes Sorensen

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Documentation for enabling USB aggregation and whether to select
interrupt or bulk delivery of interrupt events.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h
index b0e0c64..bff883c 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h
@@ -1052,6 +1052,10 @@
 #define  USB_HIMR_ROK			BIT(0)	/*  Receive DMA OK Interrupt */
 
 #define REG_USB_SPECIAL_OPTION		0xfe55
+#define  USB_SPEC_USB_AGG_ENABLE	BIT(3)	/* Enable USB aggregation */
+#define  USB_SPEC_INT_BULK_SELECT	BIT(4)	/* Use interrupt endpoint to
+						   deliver interrupt packet.
+						   0: Use int, 1: use bulk */
 #define REG_USB_HRPWM			0xfe58
 #define REG_USB_DMA_AGG_TO		0xfe5b
 #define REG_USB_AGG_TO			0xfe5c
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] rtl8xxxu: Add additional documentation for RX DMA registers
  2016-06-09 18:38 [PATCH 0/4] rtl8xxxu bugfix and minor updates Jes.Sorensen
  2016-06-09 18:38 ` [PATCH 1/4] rtl8xxxu: Add bit definitions for REG_USB_SPECIAL_OPTION Jes.Sorensen
@ 2016-06-09 18:38 ` Jes.Sorensen
  2016-06-09 18:38 ` [PATCH 3/4] rtl8xxxu: tuse %*ph to dump buffers Jes.Sorensen
  2016-06-09 18:38 ` [PATCH 4/4] rtl8xxxu: fix typo on variable name, compare against correct variable Jes.Sorensen
  3 siblings, 0 replies; 7+ messages in thread
From: Jes.Sorensen @ 2016-06-09 18:38 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, Larry.Finger, Jes Sorensen

From: Jes Sorensen <Jes.Sorensen@redhat.com>

This also renames REG_USB_AGG_{TO,TH} to REG_USB_AGG_{TIMEOUT,THRESH}

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h
index bff883c..921c565 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h
@@ -405,7 +405,11 @@
 #define REG_DWBCN1_CTRL_8723B		0x0228
 
 /* 0x0280 ~ 0x02FF	RXDMA Configuration */
-#define REG_RXDMA_AGG_PG_TH		0x0280
+#define REG_RXDMA_AGG_PG_TH		0x0280	/* 0-7 : USB DMA size bits
+						   8-14: USB DMA timeout
+						   15  : Aggregation enable
+						         Only seems to be used
+							 on 8723bu/8192eu */
 #define  RXDMA_USB_AGG_ENABLE		BIT(31)
 #define REG_RXPKT_NUM			0x0284
 #define  RXPKT_NUM_RXDMA_IDLE		BIT(17)
@@ -1058,8 +1062,8 @@
 						   0: Use int, 1: use bulk */
 #define REG_USB_HRPWM			0xfe58
 #define REG_USB_DMA_AGG_TO		0xfe5b
-#define REG_USB_AGG_TO			0xfe5c
-#define REG_USB_AGG_TH			0xfe5d
+#define REG_USB_AGG_TIMEOUT		0xfe5c
+#define REG_USB_AGG_THRESH		0xfe5d
 
 #define REG_NORMAL_SIE_VID		0xfe60	/* 0xfe60 - 0xfe61 */
 #define REG_NORMAL_SIE_PID		0xfe62	/* 0xfe62 - 0xfe63 */
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] rtl8xxxu: tuse %*ph to dump buffers
  2016-06-09 18:38 [PATCH 0/4] rtl8xxxu bugfix and minor updates Jes.Sorensen
  2016-06-09 18:38 ` [PATCH 1/4] rtl8xxxu: Add bit definitions for REG_USB_SPECIAL_OPTION Jes.Sorensen
  2016-06-09 18:38 ` [PATCH 2/4] rtl8xxxu: Add additional documentation for RX DMA registers Jes.Sorensen
@ 2016-06-09 18:38 ` Jes.Sorensen
  2016-06-09 18:38 ` [PATCH 4/4] rtl8xxxu: fix typo on variable name, compare against correct variable Jes.Sorensen
  3 siblings, 0 replies; 7+ messages in thread
From: Jes.Sorensen @ 2016-06-09 18:38 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, Larry.Finger, Andy Shevchenko, Jes Sorensen

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Use %*ph specifier to dump small buffers in hex format instead of doing this
byte-by-byte.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c | 9 ++-------
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 9 ++-------
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 9 ++-------
 3 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c
index 2c86b55..eefb7ca 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c
@@ -413,13 +413,8 @@ static int rtl8192cu_parse_efuse(struct rtl8xxxu_priv *priv)
 		dev_info(&priv->udev->dev,
 			 "%s: dumping efuse (0x%02zx bytes):\n",
 			 __func__, sizeof(struct rtl8192cu_efuse));
-		for (i = 0; i < sizeof(struct rtl8192cu_efuse); i += 8) {
-			dev_info(&priv->udev->dev, "%02x: "
-				 "%02x %02x %02x %02x %02x %02x %02x %02x\n", i,
-				 raw[i], raw[i + 1], raw[i + 2],
-				 raw[i + 3], raw[i + 4], raw[i + 5],
-				 raw[i + 6], raw[i + 7]);
-		}
+		for (i = 0; i < sizeof(struct rtl8192cu_efuse); i += 8)
+			dev_info(&priv->udev->dev, "%02x: %8ph\n", i, &raw[i]);
 	}
 	return 0;
 }
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
index fe19ace..65c079a 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
@@ -622,13 +622,8 @@ static int rtl8192eu_parse_efuse(struct rtl8xxxu_priv *priv)
 		dev_info(&priv->udev->dev,
 			 "%s: dumping efuse (0x%02zx bytes):\n",
 			 __func__, sizeof(struct rtl8192eu_efuse));
-		for (i = 0; i < sizeof(struct rtl8192eu_efuse); i += 8) {
-			dev_info(&priv->udev->dev, "%02x: "
-				 "%02x %02x %02x %02x %02x %02x %02x %02x\n", i,
-				 raw[i], raw[i + 1], raw[i + 2],
-				 raw[i + 3], raw[i + 4], raw[i + 5],
-				 raw[i + 6], raw[i + 7]);
-		}
+		for (i = 0; i < sizeof(struct rtl8192eu_efuse); i += 8)
+			dev_info(&priv->udev->dev, "%02x: %8ph\n", i, &raw[i]);
 	}
 	return 0;
 }
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c
index 4186e7c..9d45afb 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c
@@ -466,13 +466,8 @@ static int rtl8723bu_parse_efuse(struct rtl8xxxu_priv *priv)
 		dev_info(&priv->udev->dev,
 			 "%s: dumping efuse (0x%02zx bytes):\n",
 			 __func__, sizeof(struct rtl8723bu_efuse));
-		for (i = 0; i < sizeof(struct rtl8723bu_efuse); i += 8) {
-			dev_info(&priv->udev->dev, "%02x: "
-				 "%02x %02x %02x %02x %02x %02x %02x %02x\n", i,
-				 raw[i], raw[i + 1], raw[i + 2],
-				 raw[i + 3], raw[i + 4], raw[i + 5],
-				 raw[i + 6], raw[i + 7]);
-		}
+		for (i = 0; i < sizeof(struct rtl8723bu_efuse); i += 8)
+			dev_info(&priv->udev->dev, "%02x: %8ph\n", i, &raw[i]);
 	}
 
 	return 0;
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] rtl8xxxu: fix typo on variable name, compare against correct variable
  2016-06-09 18:38 [PATCH 0/4] rtl8xxxu bugfix and minor updates Jes.Sorensen
                   ` (2 preceding siblings ...)
  2016-06-09 18:38 ` [PATCH 3/4] rtl8xxxu: tuse %*ph to dump buffers Jes.Sorensen
@ 2016-06-09 18:38 ` Jes.Sorensen
  2016-06-16 14:49   ` [4/4] " Kalle Valo
  3 siblings, 1 reply; 7+ messages in thread
From: Jes.Sorensen @ 2016-06-09 18:38 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, Larry.Finger, Colin Ian King, Jes Sorensen

From: Colin Ian King <colin.king@canonical.com>

path_b_ok is being assigned but immediately after path_a_ok is being
compared to the value 0x03.  This appears to be a typo on the
variable name, compare path_b_ok instead.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
index 65c079a..5b825fa 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
@@ -1144,7 +1144,7 @@ static void rtl8192eu_phy_iqcalibrate(struct rtl8xxxu_priv *priv,
 
 		for (i = 0; i < retry; i++) {
 			path_b_ok = rtl8192eu_rx_iqk_path_b(priv);
-			if (path_a_ok == 0x03) {
+			if (path_b_ok == 0x03) {
 				val32 = rtl8xxxu_read32(priv,
 							REG_RX_POWER_BEFORE_IQK_B_2);
 				result[t][6] = (val32 >> 16) & 0x3ff;
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [4/4] rtl8xxxu: fix typo on variable name, compare against correct variable
  2016-06-09 18:38 ` [PATCH 4/4] rtl8xxxu: fix typo on variable name, compare against correct variable Jes.Sorensen
@ 2016-06-16 14:49   ` Kalle Valo
  0 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2016-06-16 14:49 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: linux-wireless, Larry.Finger, Colin Ian King, Jes Sorensen

Jes Sorensen <Jes.Sorensen@redhat.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> path_b_ok is being assigned but immediately after path_a_ok is being
> compared to the value 0x03.  This appears to be a typo on the
> variable name, compare path_b_ok instead.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>

Thanks, 1 patch applied to wireless-drivers.git:

c70410cb91de rtl8xxxu: fix typo on variable name, compare against correct variable

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9167725/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [1/4] rtl8xxxu: Add bit definitions for REG_USB_SPECIAL_OPTION
  2016-06-09 18:38 ` [PATCH 1/4] rtl8xxxu: Add bit definitions for REG_USB_SPECIAL_OPTION Jes.Sorensen
@ 2016-06-29 15:44   ` Kalle Valo
  0 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2016-06-29 15:44 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: linux-wireless, Larry.Finger, Jes Sorensen

Jes Sorensen <Jes.Sorensen@redhat.com> wrote:
> From: Jes Sorensen <Jes.Sorensen@redhat.com>
> 
> Documentation for enabling USB aggregation and whether to select
> interrupt or bulk delivery of interrupt events.
> 
> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>

Thanks, 3 patches applied to wireless-drivers-next.git:

e4ac0a8ac8ba rtl8xxxu: Add bit definitions for REG_USB_SPECIAL_OPTION
08eca32ebc89 rtl8xxxu: Add additional documentation for RX DMA registers
2b9c9f52dc03 rtl8xxxu: tuse %*ph to dump buffers

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9167727/


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-06-29 15:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-09 18:38 [PATCH 0/4] rtl8xxxu bugfix and minor updates Jes.Sorensen
2016-06-09 18:38 ` [PATCH 1/4] rtl8xxxu: Add bit definitions for REG_USB_SPECIAL_OPTION Jes.Sorensen
2016-06-29 15:44   ` [1/4] " Kalle Valo
2016-06-09 18:38 ` [PATCH 2/4] rtl8xxxu: Add additional documentation for RX DMA registers Jes.Sorensen
2016-06-09 18:38 ` [PATCH 3/4] rtl8xxxu: tuse %*ph to dump buffers Jes.Sorensen
2016-06-09 18:38 ` [PATCH 4/4] rtl8xxxu: fix typo on variable name, compare against correct variable Jes.Sorensen
2016-06-16 14:49   ` [4/4] " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).