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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 07 Jul 2014 14:36:04 -0700
From:	Walter Mack <wmack@...ponentsw.com>
To:	Alexander Smirnov <alex.bluesman.smirnov@...il.com>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>
CC:	linux-kernel@...r.kernel.org, Walter Mack <wmack@...ponentsw.com>
Subject: [net-next PATCH] mrf24j40: - enable use of external rx/tx components
 kernel

Description: Add boolean parameter ext_rx_tx to enable use of external tx/rx components.
kernel version: 3.16.0-rc4

Signed-off-by: Walter J Mack <wmack@...ponentsw.com>
---
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index 4048062..18cff47 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -26,6 +26,10 @@
  #include <net/mac802154.h>
  #include <net/ieee802154.h>
  
+static bool ext_rx_tx = false ;
+module_param(ext_rx_tx, bool, 0);
+MODULE_PARM_DESC(ext_rx_tx, " turn on statemachine to manage external tx/rx");
+
  /* MRF24J40 Short Address Registers */
  #define REG_RXMCR    0x00  /* Receive MAC control */
  #define REG_PANIDL   0x01  /* PAN ID (low) */
@@ -63,6 +67,8 @@
  #define REG_SLPCON1    0x220
  #define REG_WAKETIMEL  0x222  /* Wake-up Time Match Value Low */
  #define REG_WAKETIMEH  0x223  /* Wake-up Time Match Value High */
+#define REG_TESTMODE   0x22f  /* test mode and state machine control register */
+
  #define REG_RX_FIFO    0x300  /* Receive FIFO */
  
  /* Device configuration: Only channels 11-26 on page 0 are supported. */
@@ -669,6 +675,10 @@ static int mrf24j40_probe(struct spi_device *spi)
  	write_short_reg(devrec, REG_RFCTL, 0x0);
  	udelay(192);
  
+	if ( false != ext_rx_tx ){
+	  write_long_reg(devrec, REG_TESTMODE, 0x0f);
+	}
+
  	/* Set RX Mode. RXMCR<1:0>: 0x0 normal, 0x1 promisc, 0x2 error */
  	ret = read_short_reg(devrec, REG_RXMCR, &val);
  	if (ret)
---



Download attachment "smime.p7s" of type "application/pkcs7-signature" (2384 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ