summaryrefslogtreecommitdiff
path: root/drivers/staging/ks7010
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/ks7010')
-rw-r--r--drivers/staging/ks7010/ks7010_sdio.c1
-rw-r--r--drivers/staging/ks7010/ks7010_sdio.h5
-rw-r--r--drivers/staging/ks7010/ks_hostif.c13
-rw-r--r--drivers/staging/ks7010/ks_hostif.h64
-rw-r--r--drivers/staging/ks7010/ks_wlan.h6
-rw-r--r--drivers/staging/ks7010/ks_wlan_ioctl.h64
-rw-r--r--drivers/staging/ks7010/ks_wlan_net.c16
-rw-r--r--drivers/staging/ks7010/michael_mic.c8
8 files changed, 80 insertions, 97 deletions
diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index a604c83c957e..6f9f746a3a61 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -884,7 +884,6 @@ static void ks7010_card_init(struct ks_wlan_private *priv)
if (priv->mac_address_valid && priv->version_size)
priv->dev_state = DEVICE_STATE_PREINIT;
-
hostif_sme_enqueue(priv, SME_GET_EEPROM_CKSUM);
/* load initial wireless parameter */
diff --git a/drivers/staging/ks7010/ks7010_sdio.h b/drivers/staging/ks7010/ks7010_sdio.h
index 0f5fd848e23d..d7e1523a222f 100644
--- a/drivers/staging/ks7010/ks7010_sdio.h
+++ b/drivers/staging/ks7010/ks7010_sdio.h
@@ -81,11 +81,11 @@
/* AHB Data Window 0x010000-0x01FFFF */
#define DATA_WINDOW 0x010000
-#define WINDOW_SIZE 64*1024
+#define WINDOW_SIZE (64 * 1024)
#define KS7010_IRAM_ADDRESS 0x06000000
-/*
+/*
* struct define
*/
struct hw_info_t {
@@ -142,6 +142,7 @@ struct rx_device {
unsigned int qtail; /* rx buffer queue last pointer */
spinlock_t rx_dev_lock;
};
+
#define ROM_FILE "ks7010sd.rom"
#endif /* _KS7010_SDIO_H */
diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index c7652c35be19..da7c42ef05f5 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -727,7 +727,6 @@ void hostif_power_mngmt_confirm(struct ks_wlan_private *priv)
} else {
priv->dev_state = DEVICE_STATE_READY;
}
-
}
static
@@ -853,7 +852,6 @@ void hostif_scan_indication(struct ks_wlan_private *priv)
DPRINTK(4, " count over :: scan_ind_count=%d\n",
priv->scan_ind_count);
}
-
}
static
@@ -900,7 +898,6 @@ void hostif_ps_adhoc_set_confirm(struct ks_wlan_private *priv)
DPRINTK(3, "\n");
priv->infra_status = 0; /* infrastructure mode cancel */
hostif_sme_enqueue(priv, SME_MODE_SET_CONFIRM);
-
}
static
@@ -1102,7 +1099,7 @@ void hostif_event_check(struct ks_wlan_private *priv)
priv->hostt.qtail = (priv->hostt.qtail + 1) % SME_EVENT_BUFF_SIZE;
}
-#define CHECK_ALINE(size) (size%4 ? (size+(4-(size%4))):size)
+#define CHECK_ALINE(size) (size % 4 ? (size + (4 - (size % 4))) : size)
int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
{
@@ -1916,7 +1913,6 @@ void hostif_sme_set_wep(struct ks_wlan_private *priv, int type)
sizeof(val), MIB_VALUE_TYPE_BOOL, &val);
break;
}
-
}
struct wpa_suite_t {
@@ -2103,7 +2099,6 @@ void hostif_sme_set_rsn(struct ks_wlan_private *priv, int type)
hostif_mib_set_request(priv, LOCAL_RSN_MODE, sizeof(rsn_mode),
MIB_VALUE_TYPE_OSTRING, &rsn_mode);
break;
-
}
}
@@ -2211,13 +2206,11 @@ void hostif_sme_mode_setup(struct ks_wlan_private *priv)
default:
break;
}
-
}
static
void hostif_sme_multicast_set(struct ks_wlan_private *priv)
{
-
struct net_device *dev = priv->net_dev;
int mc_count;
struct netdev_hw_addr *ha;
@@ -2267,7 +2260,6 @@ void hostif_sme_multicast_set(struct ks_wlan_private *priv)
}
spin_unlock(&priv->multicast_spin);
-
}
static
@@ -2311,7 +2303,6 @@ void hostif_sme_powermgt_set(struct ks_wlan_private *priv)
break;
}
hostif_power_mngmt_request(priv, mode, wake_up, receiveDTIMs);
-
}
static
@@ -2328,7 +2319,6 @@ void hostif_sme_sleep_set(struct ks_wlan_private *priv)
default:
break;
}
-
}
static
@@ -2639,7 +2629,6 @@ void hostif_sme_enqueue(struct ks_wlan_private *priv, unsigned short event)
}
tasklet_schedule(&priv->sme_task);
-
}
int hostif_init(struct ks_wlan_private *priv)
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index 743f31ead56e..30c49b699d62 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -553,34 +553,34 @@ struct hostif_mic_failure_confirm_t {
#define TX_RATE_FIXED 5
/* 11b rate */
-#define TX_RATE_1M (uint8_t)(10/5) /* 11b 11g basic rate */
-#define TX_RATE_2M (uint8_t)(20/5) /* 11b 11g basic rate */
-#define TX_RATE_5M (uint8_t)(55/5) /* 11g basic rate */
-#define TX_RATE_11M (uint8_t)(110/5) /* 11g basic rate */
+#define TX_RATE_1M (uint8_t)(10 / 5) /* 11b 11g basic rate */
+#define TX_RATE_2M (uint8_t)(20 / 5) /* 11b 11g basic rate */
+#define TX_RATE_5M (uint8_t)(55 / 5) /* 11g basic rate */
+#define TX_RATE_11M (uint8_t)(110 / 5) /* 11g basic rate */
/* 11g rate */
-#define TX_RATE_6M (uint8_t)(60/5) /* 11g basic rate */
-#define TX_RATE_12M (uint8_t)(120/5) /* 11g basic rate */
-#define TX_RATE_24M (uint8_t)(240/5) /* 11g basic rate */
-#define TX_RATE_9M (uint8_t)(90/5)
-#define TX_RATE_18M (uint8_t)(180/5)
-#define TX_RATE_36M (uint8_t)(360/5)
-#define TX_RATE_48M (uint8_t)(480/5)
-#define TX_RATE_54M (uint8_t)(540/5)
+#define TX_RATE_6M (uint8_t)(60 / 5) /* 11g basic rate */
+#define TX_RATE_12M (uint8_t)(120 / 5) /* 11g basic rate */
+#define TX_RATE_24M (uint8_t)(240 / 5) /* 11g basic rate */
+#define TX_RATE_9M (uint8_t)(90 / 5)
+#define TX_RATE_18M (uint8_t)(180 / 5)
+#define TX_RATE_36M (uint8_t)(360 / 5)
+#define TX_RATE_48M (uint8_t)(480 / 5)
+#define TX_RATE_54M (uint8_t)(540 / 5)
-#define IS_11B_RATE(A) (((A&RATE_MASK)==TX_RATE_1M)||((A&RATE_MASK)==TX_RATE_2M)||\
- ((A&RATE_MASK)==TX_RATE_5M)||((A&RATE_MASK)==TX_RATE_11M))
+#define IS_11B_RATE(A) (((A & RATE_MASK) == TX_RATE_1M ) || ((A & RATE_MASK) == TX_RATE_2M) || \
+ ((A & RATE_MASK) == TX_RATE_5M) || ((A & RATE_MASK) == TX_RATE_11M))
-#define IS_OFDM_RATE(A) (((A&RATE_MASK)==TX_RATE_6M)||((A&RATE_MASK)==TX_RATE_12M)||\
- ((A&RATE_MASK)==TX_RATE_24M)||((A&RATE_MASK)==TX_RATE_9M)||\
- ((A&RATE_MASK)==TX_RATE_18M)||((A&RATE_MASK)==TX_RATE_36M)||\
- ((A&RATE_MASK)==TX_RATE_48M)||((A&RATE_MASK)==TX_RATE_54M))
+#define IS_OFDM_RATE(A) (((A & RATE_MASK) == TX_RATE_6M) || ((A & RATE_MASK) == TX_RATE_12M) || \
+ ((A & RATE_MASK) == TX_RATE_24M) || ((A & RATE_MASK) == TX_RATE_9M) || \
+ ((A & RATE_MASK) == TX_RATE_18M) || ((A & RATE_MASK) == TX_RATE_36M) || \
+ ((A & RATE_MASK) == TX_RATE_48M) || ((A & RATE_MASK) == TX_RATE_54M))
-#define IS_11BG_RATE(A) (IS_11B_RATE(A)||IS_OFDM_RATE(A))
+#define IS_11BG_RATE(A) (IS_11B_RATE(A) || IS_OFDM_RATE(A))
-#define IS_OFDM_EXT_RATE(A) (((A&RATE_MASK)==TX_RATE_9M)||((A&RATE_MASK)==TX_RATE_18M)||\
- ((A&RATE_MASK)==TX_RATE_36M)||((A&RATE_MASK)==TX_RATE_48M)||\
- ((A&RATE_MASK)==TX_RATE_54M))
+#define IS_OFDM_EXT_RATE(A) (((A & RATE_MASK) == TX_RATE_9M) || ((A & RATE_MASK) == TX_RATE_18M) || \
+ ((A & RATE_MASK) == TX_RATE_36M) || ((A & RATE_MASK) == TX_RATE_48M) || \
+ ((A & RATE_MASK) == TX_RATE_54M))
enum {
CONNECT_STATUS = 0,
@@ -602,16 +602,16 @@ enum {
/* macro function */
#define HIF_EVENT_MASK 0xE800
-#define IS_HIF_IND(_EVENT) ((_EVENT&HIF_EVENT_MASK)==0xE800 && \
- ((_EVENT&~HIF_EVENT_MASK)==0x0001 || \
- (_EVENT&~HIF_EVENT_MASK)==0x0006 || \
- (_EVENT&~HIF_EVENT_MASK)==0x000C || \
- (_EVENT&~HIF_EVENT_MASK)==0x0011 || \
- (_EVENT&~HIF_EVENT_MASK)==0x0012))
-
-#define IS_HIF_CONF(_EVENT) ((_EVENT&HIF_EVENT_MASK)==0xE800 && \
- (_EVENT&~HIF_EVENT_MASK)>0x0000 && \
- (_EVENT&~HIF_EVENT_MASK)<0x0012 && \
+#define IS_HIF_IND(_EVENT) ((_EVENT & HIF_EVENT_MASK) == 0xE800 && \
+ ((_EVENT & ~HIF_EVENT_MASK) == 0x0001 || \
+ (_EVENT & ~HIF_EVENT_MASK) == 0x0006 || \
+ (_EVENT & ~HIF_EVENT_MASK) == 0x000C || \
+ (_EVENT & ~HIF_EVENT_MASK) == 0x0011 || \
+ (_EVENT & ~HIF_EVENT_MASK) == 0x0012))
+
+#define IS_HIF_CONF(_EVENT) ((_EVENT & HIF_EVENT_MASK) == 0xE800 && \
+ (_EVENT & ~HIF_EVENT_MASK) > 0x0000 && \
+ (_EVENT & ~HIF_EVENT_MASK) < 0x0012 && \
!IS_HIF_IND(_EVENT) )
#ifdef __KERNEL__
diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 279e9b06fc4b..9ab80e1f123e 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -36,7 +36,7 @@
#ifdef KS_WLAN_DEBUG
#define DPRINTK(n, fmt, args...) \
- if (KS_WLAN_DEBUG>(n)) printk(KERN_NOTICE "%s: "fmt, __FUNCTION__, ## args)
+ if (KS_WLAN_DEBUG > (n)) printk(KERN_NOTICE "%s: "fmt, __FUNCTION__, ## args)
#else
#define DPRINTK(n, fmt, args...)
#endif
@@ -94,7 +94,7 @@ enum {
#define SME_WEP_VAL2 (1<<6)
#define SME_WEP_VAL3 (1<<7)
#define SME_WEP_VAL4 (1<<8)
-#define SME_WEP_VAL_MASK (SME_WEP_VAL1|SME_WEP_VAL2|SME_WEP_VAL3|SME_WEP_VAL4)
+#define SME_WEP_VAL_MASK (SME_WEP_VAL1 | SME_WEP_VAL2 | SME_WEP_VAL3 | SME_WEP_VAL4)
#define SME_RSN (1<<9)
#define SME_RSN_MULTICAST (1<<10)
#define SME_RSN_UNICAST (1<<11)
@@ -363,6 +363,7 @@ struct wpa_key_t {
u8 tx_mic_key[MIC_KEY_SIZE];
u8 rx_mic_key[MIC_KEY_SIZE];
};
+
#define WPA_KEY_INDEX_MAX 4
#define WPA_RX_SEQ_LEN 6
@@ -408,7 +409,6 @@ struct wps_status_t {
#endif /* WPS */
struct ks_wlan_private {
-
struct hw_info_t ks_wlan_hw; /* hardware information */
struct net_device *net_dev;
diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 84554b6bb239..8e62b10effd6 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -15,43 +15,43 @@
#include <linux/wireless.h>
/* The low order bit identify a SET (0) or a GET (1) ioctl. */
-/* SIOCIWFIRSTPRIV+0 */
-/* former KS_WLAN_GET_DRIVER_VERSION SIOCIWFIRSTPRIV+1 */
-/* SIOCIWFIRSTPRIV+2 */
-#define KS_WLAN_GET_FIRM_VERSION SIOCIWFIRSTPRIV+3
+/* SIOCIWFIRSTPRIV + 0 */
+/* former KS_WLAN_GET_DRIVER_VERSION SIOCIWFIRSTPRIV + 1 */
+/* SIOCIWFIRSTPRIV + 2 */
+#define KS_WLAN_GET_FIRM_VERSION SIOCIWFIRSTPRIV + 3
#ifdef WPS
-#define KS_WLAN_SET_WPS_ENABLE SIOCIWFIRSTPRIV+4
-#define KS_WLAN_GET_WPS_ENABLE SIOCIWFIRSTPRIV+5
-#define KS_WLAN_SET_WPS_PROBE_REQ SIOCIWFIRSTPRIV+6
+#define KS_WLAN_SET_WPS_ENABLE SIOCIWFIRSTPRIV + 4
+#define KS_WLAN_GET_WPS_ENABLE SIOCIWFIRSTPRIV + 5
+#define KS_WLAN_SET_WPS_PROBE_REQ SIOCIWFIRSTPRIV + 6
#endif
-#define KS_WLAN_GET_EEPROM_CKSUM SIOCIWFIRSTPRIV+7
-#define KS_WLAN_SET_PREAMBLE SIOCIWFIRSTPRIV+8
-#define KS_WLAN_GET_PREAMBLE SIOCIWFIRSTPRIV+9
-#define KS_WLAN_SET_POWER_SAVE SIOCIWFIRSTPRIV+10
-#define KS_WLAN_GET_POWER_SAVE SIOCIWFIRSTPRIV+11
-#define KS_WLAN_SET_SCAN_TYPE SIOCIWFIRSTPRIV+12
-#define KS_WLAN_GET_SCAN_TYPE SIOCIWFIRSTPRIV+13
-#define KS_WLAN_SET_RX_GAIN SIOCIWFIRSTPRIV+14
-#define KS_WLAN_GET_RX_GAIN SIOCIWFIRSTPRIV+15
-#define KS_WLAN_HOSTT SIOCIWFIRSTPRIV+16 /* unused */
-//#define KS_WLAN_SET_REGION SIOCIWFIRSTPRIV+17
-#define KS_WLAN_SET_BEACON_LOST SIOCIWFIRSTPRIV+18
-#define KS_WLAN_GET_BEACON_LOST SIOCIWFIRSTPRIV+19
+#define KS_WLAN_GET_EEPROM_CKSUM SIOCIWFIRSTPRIV + 7
+#define KS_WLAN_SET_PREAMBLE SIOCIWFIRSTPRIV + 8
+#define KS_WLAN_GET_PREAMBLE SIOCIWFIRSTPRIV + 9
+#define KS_WLAN_SET_POWER_SAVE SIOCIWFIRSTPRIV + 10
+#define KS_WLAN_GET_POWER_SAVE SIOCIWFIRSTPRIV + 11
+#define KS_WLAN_SET_SCAN_TYPE SIOCIWFIRSTPRIV + 12
+#define KS_WLAN_GET_SCAN_TYPE SIOCIWFIRSTPRIV + 13
+#define KS_WLAN_SET_RX_GAIN SIOCIWFIRSTPRIV + 14
+#define KS_WLAN_GET_RX_GAIN SIOCIWFIRSTPRIV + 15
+#define KS_WLAN_HOSTT SIOCIWFIRSTPRIV + 16 /* unused */
+//#define KS_WLAN_SET_REGION SIOCIWFIRSTPRIV + 17
+#define KS_WLAN_SET_BEACON_LOST SIOCIWFIRSTPRIV + 18
+#define KS_WLAN_GET_BEACON_LOST SIOCIWFIRSTPRIV + 19
-#define KS_WLAN_SET_TX_GAIN SIOCIWFIRSTPRIV+20
-#define KS_WLAN_GET_TX_GAIN SIOCIWFIRSTPRIV+21
+#define KS_WLAN_SET_TX_GAIN SIOCIWFIRSTPRIV + 20
+#define KS_WLAN_GET_TX_GAIN SIOCIWFIRSTPRIV + 21
/* for KS7010 */
-#define KS_WLAN_SET_PHY_TYPE SIOCIWFIRSTPRIV+22
-#define KS_WLAN_GET_PHY_TYPE SIOCIWFIRSTPRIV+23
-#define KS_WLAN_SET_CTS_MODE SIOCIWFIRSTPRIV+24
-#define KS_WLAN_GET_CTS_MODE SIOCIWFIRSTPRIV+25
-/* SIOCIWFIRSTPRIV+26 */
-/* SIOCIWFIRSTPRIV+27 */
-#define KS_WLAN_SET_SLEEP_MODE SIOCIWFIRSTPRIV+28 /* sleep mode */
-#define KS_WLAN_GET_SLEEP_MODE SIOCIWFIRSTPRIV+29 /* sleep mode */
-/* SIOCIWFIRSTPRIV+30 */
-/* SIOCIWFIRSTPRIV+31 */
+#define KS_WLAN_SET_PHY_TYPE SIOCIWFIRSTPRIV + 22
+#define KS_WLAN_GET_PHY_TYPE SIOCIWFIRSTPRIV + 23
+#define KS_WLAN_SET_CTS_MODE SIOCIWFIRSTPRIV + 24
+#define KS_WLAN_GET_CTS_MODE SIOCIWFIRSTPRIV + 25
+/* SIOCIWFIRSTPRIV + 26 */
+/* SIOCIWFIRSTPRIV + 27 */
+#define KS_WLAN_SET_SLEEP_MODE SIOCIWFIRSTPRIV + 28 /* sleep mode */
+#define KS_WLAN_GET_SLEEP_MODE SIOCIWFIRSTPRIV + 29 /* sleep mode */
+/* SIOCIWFIRSTPRIV + 30 */
+/* SIOCIWFIRSTPRIV + 31 */
#ifdef __KERNEL__
diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index e5d04adaeb1a..121e1530fdba 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -285,7 +285,6 @@ static int ks_wlan_set_essid(struct net_device *dev,
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
-
/* for SLEEP MODE */
/* Check if we asked for `any' */
if (dwrq->flags == 0) {
@@ -342,7 +341,6 @@ static int ks_wlan_get_essid(struct net_device *dev,
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
-
/* for SLEEP MODE */
/* Note : if dwrq->flags != 0, we should
* get the relevant SSID from the SSID list... */
@@ -2095,7 +2093,6 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
static struct iw_statistics *ks_get_wireless_stats(struct net_device *dev)
{
-
struct ks_wlan_private *priv =
(struct ks_wlan_private *)netdev_priv(dev);
struct iw_statistics *wstats = &priv->wstats;
@@ -2264,7 +2261,6 @@ static int ks_wlan_set_preamble(struct net_device *dev,
priv->need_commit |= SME_MODE_SET;
return -EINPROGRESS; /* Call commit handler */
-
}
/*------------------------------------------------------------------*/
@@ -2455,7 +2451,7 @@ static int ks_wlan_data_read(struct net_device *dev,
#if 0
/*------------------------------------------------------------------*/
/* Private handler : get wep string */
-#define WEP_ASCII_BUFF_SIZE (17+64*4+1)
+#define WEP_ASCII_BUFF_SIZE (17 + 64 * 4 + 1)
static int ks_wlan_get_wep_ascii(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
@@ -2933,7 +2929,6 @@ static int ks_wlan_get_eeprom_cksum(struct net_device *dev,
static void print_hif_event(struct net_device *dev, int event)
{
-
switch (event) {
case HIF_DATA_REQ:
netdev_info(dev, "HIF_DATA_REQ\n");
@@ -3353,7 +3348,6 @@ void send_packet_complete(void *arg1, void *arg2)
dev_kfree_skb(packet);
packet = NULL;
}
-
}
/* Set or clear the multicast filter for this adaptor.
@@ -3388,7 +3382,6 @@ int ks_wlan_open(struct net_device *dev)
static
int ks_wlan_close(struct net_device *dev)
{
-
netif_stop_queue(dev);
DPRINTK(4, "%s: Shutting down ethercard, status was 0x%4.4x.\n",
@@ -3399,9 +3392,10 @@ int ks_wlan_close(struct net_device *dev)
/* Operational parameters that usually are not changed. */
/* Time in jiffies before concluding the transmitter is hung. */
-#define TX_TIMEOUT (3*HZ)
-static const unsigned char dummy_addr[] =
- { 0x00, 0x0b, 0xe3, 0x00, 0x00, 0x00 };
+#define TX_TIMEOUT (3 * HZ)
+static const unsigned char dummy_addr[] = {
+ 0x00, 0x0b, 0xe3, 0x00, 0x00, 0x00
+};
static const struct net_device_ops ks_wlan_netdev_ops = {
.ndo_start_xmit = ks_wlan_start_xmit,
diff --git a/drivers/staging/ks7010/michael_mic.c b/drivers/staging/ks7010/michael_mic.c
index 2f535c08e172..f6e70fa2a12f 100644
--- a/drivers/staging/ks7010/michael_mic.c
+++ b/drivers/staging/ks7010/michael_mic.c
@@ -14,11 +14,11 @@
#include "michael_mic.h"
// Rotation functions on 32 bit values
-#define ROL32(A, n) (((A) << (n)) | (((A)>>(32-(n))) & ((1UL << (n)) - 1)))
-#define ROR32(A, n) ROL32((A), 32-(n))
+#define ROL32(A, n) (((A) << (n)) | (((A) >> (32 - (n))) & ((1UL << (n)) - 1)))
+#define ROR32(A, n) ROL32((A), 32 - (n))
// Convert from Byte[] to UInt32 in a portable way
-#define getUInt32(A, B) ((uint32_t)(A[B+0] << 0) \
- + (A[B+1] << 8) + (A[B+2] << 16) + (A[B+3] << 24))
+#define getUInt32(A, B) ((uint32_t)(A[B + 0] << 0) \
+ + (A[B + 1] << 8) + (A[B + 2] << 16) + (A[B + 3] << 24))
// Convert from UInt32 to Byte[] in a portable way
#define putUInt32(A, B, C) \