Commit 8b3e7be4 authored by Solomon Peachy's avatar Solomon Peachy Committed by John W. Linville

cw1200: Fix an assorted pile of checkpatch warnings.

Signed-off-by: default avatarSolomon Peachy <pizza@shaftnet.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 19db5778
...@@ -31,7 +31,8 @@ static int cw1200_bh(void *arg); ...@@ -31,7 +31,8 @@ static int cw1200_bh(void *arg);
#define DOWNLOAD_BLOCK_SIZE_WR (0x1000 - 4) #define DOWNLOAD_BLOCK_SIZE_WR (0x1000 - 4)
/* an SPI message cannot be bigger than (2"12-1)*2 bytes /* an SPI message cannot be bigger than (2"12-1)*2 bytes
* "*2" to cvt to bytes */ * "*2" to cvt to bytes
*/
#define MAX_SZ_RD_WR_BUFFERS (DOWNLOAD_BLOCK_SIZE_WR*2) #define MAX_SZ_RD_WR_BUFFERS (DOWNLOAD_BLOCK_SIZE_WR*2)
#define PIGGYBACK_CTRL_REG (2) #define PIGGYBACK_CTRL_REG (2)
#define EFFECTIVE_BUF_SIZE (MAX_SZ_RD_WR_BUFFERS - PIGGYBACK_CTRL_REG) #define EFFECTIVE_BUF_SIZE (MAX_SZ_RD_WR_BUFFERS - PIGGYBACK_CTRL_REG)
...@@ -217,7 +218,8 @@ static int cw1200_device_wakeup(struct cw1200_common *priv) ...@@ -217,7 +218,8 @@ static int cw1200_device_wakeup(struct cw1200_common *priv)
return ret; return ret;
/* If the device returns WLAN_RDY as 1, the device is active and will /* If the device returns WLAN_RDY as 1, the device is active and will
* remain active. */ * remain active.
*/
if (ctrl_reg & ST90TDS_CONT_RDY_BIT) { if (ctrl_reg & ST90TDS_CONT_RDY_BIT) {
pr_debug("[BH] Device awake.\n"); pr_debug("[BH] Device awake.\n");
return 1; return 1;
...@@ -262,7 +264,8 @@ static int cw1200_bh_rx_helper(struct cw1200_common *priv, ...@@ -262,7 +264,8 @@ static int cw1200_bh_rx_helper(struct cw1200_common *priv,
} }
/* Add SIZE of PIGGYBACK reg (CONTROL Reg) /* Add SIZE of PIGGYBACK reg (CONTROL Reg)
* to the NEXT Message length + 2 Bytes for SKB */ * to the NEXT Message length + 2 Bytes for SKB
*/
read_len = read_len + 2; read_len = read_len + 2;
alloc_len = priv->hwbus_ops->align_size( alloc_len = priv->hwbus_ops->align_size(
......
...@@ -207,7 +207,8 @@ struct cw1200_common { ...@@ -207,7 +207,8 @@ struct cw1200_common {
/* Scan status */ /* Scan status */
struct cw1200_scan scan; struct cw1200_scan scan;
/* Keep cw1200 awake (WUP = 1) 1 second after each scan to avoid /* Keep cw1200 awake (WUP = 1) 1 second after each scan to avoid
* FW issue with sleeping/waking up. */ * FW issue with sleeping/waking up.
*/
atomic_t recent_scan; atomic_t recent_scan;
struct delayed_work clear_recent_scan_work; struct delayed_work clear_recent_scan_work;
......
...@@ -323,7 +323,8 @@ static int cw1200_sdio_probe(struct sdio_func *func, ...@@ -323,7 +323,8 @@ static int cw1200_sdio_probe(struct sdio_func *func,
} }
/* Disconnect Function to be called by SDIO stack when /* Disconnect Function to be called by SDIO stack when
* device is disconnected */ * device is disconnected
*/
static void cw1200_sdio_disconnect(struct sdio_func *func) static void cw1200_sdio_disconnect(struct sdio_func *func)
{ {
struct hwbus_priv *self = sdio_get_drvdata(func); struct hwbus_priv *self = sdio_get_drvdata(func);
......
...@@ -47,15 +47,13 @@ struct hwbus_priv { ...@@ -47,15 +47,13 @@ struct hwbus_priv {
#define SET_WRITE 0x7FFF /* usage: and operation */ #define SET_WRITE 0x7FFF /* usage: and operation */
#define SET_READ 0x8000 /* usage: or operation */ #define SET_READ 0x8000 /* usage: or operation */
/* /* Notes on byte ordering:
Notes on byte ordering:
LE: B0 B1 B2 B3 LE: B0 B1 B2 B3
BE: B3 B2 B1 B0 BE: B3 B2 B1 B0
Hardware expects 32-bit data to be written as 16-bit BE words: Hardware expects 32-bit data to be written as 16-bit BE words:
B1 B0 B3 B2 B1 B0 B3 B2
*/ */
static int cw1200_spi_memcpy_fromio(struct hwbus_priv *self, static int cw1200_spi_memcpy_fromio(struct hwbus_priv *self,
......
...@@ -97,9 +97,8 @@ struct download_cntl_t { ...@@ -97,9 +97,8 @@ struct download_cntl_t {
#define CW1200_APB(addr) (PAC_SHARED_MEMORY_SILICON + (addr)) #define CW1200_APB(addr) (PAC_SHARED_MEMORY_SILICON + (addr))
/* *************************************************************** /* Device register definitions */
*Device register definitions
*************************************************************** */
/* WBF - SPI Register Addresses */ /* WBF - SPI Register Addresses */
#define ST90TDS_ADDR_ID_BASE (0x0000) #define ST90TDS_ADDR_ID_BASE (0x0000)
/* 16/32 bits */ /* 16/32 bits */
......
...@@ -483,15 +483,14 @@ void cw1200_update_filtering(struct cw1200_common *priv) ...@@ -483,15 +483,14 @@ void cw1200_update_filtering(struct cw1200_common *priv)
bf_tbl.num = __cpu_to_le32(3); bf_tbl.num = __cpu_to_le32(3);
} }
/* /* When acting as p2p client being connected to p2p GO, in order to
* When acting as p2p client being connected to p2p GO, in order to * receive frames from a different p2p device, turn off bssid filter.
* receive frames from a different p2p device, turn off bssid filter. *
* * WARNING: FW dependency!
* WARNING: FW dependency! * This can only be used with FW WSM371 and its successors.
* This can only be used with FW WSM371 and its successors. * In that FW version even with bssid filter turned off,
* In that FW version even with bssid filter turned off, * device will block most of the unwanted frames.
* device will block most of the unwanted frames. */
*/
if (is_p2p) if (is_p2p)
bssid_filtering = false; bssid_filtering = false;
...@@ -1015,17 +1014,17 @@ void cw1200_event_handler(struct work_struct *work) ...@@ -1015,17 +1014,17 @@ void cw1200_event_handler(struct work_struct *work)
/* RSSI: signed Q8.0, RCPI: unsigned Q7.1 /* RSSI: signed Q8.0, RCPI: unsigned Q7.1
* RSSI = RCPI / 2 - 110 * RSSI = RCPI / 2 - 110
*/ */
int rcpiRssi = (int)(event->evt.data & 0xFF); int rcpi_rssi = (int)(event->evt.data & 0xFF);
int cqm_evt; int cqm_evt;
if (priv->cqm_use_rssi) if (priv->cqm_use_rssi)
rcpiRssi = (s8)rcpiRssi; rcpi_rssi = (s8)rcpi_rssi;
else else
rcpiRssi = rcpiRssi / 2 - 110; rcpi_rssi = rcpi_rssi / 2 - 110;
cqm_evt = (rcpiRssi <= priv->cqm_rssi_thold) ? cqm_evt = (rcpi_rssi <= priv->cqm_rssi_thold) ?
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW : NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW :
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH; NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH;
pr_debug("[CQM] RSSI event: %d.\n", rcpiRssi); pr_debug("[CQM] RSSI event: %d.\n", rcpi_rssi);
ieee80211_cqm_rssi_notify(priv->vif, cqm_evt, ieee80211_cqm_rssi_notify(priv->vif, cqm_evt,
GFP_KERNEL); GFP_KERNEL);
break; break;
...@@ -1068,8 +1067,7 @@ void cw1200_bss_params_work(struct work_struct *work) ...@@ -1068,8 +1067,7 @@ void cw1200_bss_params_work(struct work_struct *work)
/* ******************************************************************** */ /* ******************************************************************** */
/* Internal API */ /* Internal API */
/* /* This function is called to Parse the SDD file
* This function is called to Parse the SDD file
* to extract listen_interval and PTA related information * to extract listen_interval and PTA related information
* sdd is a TLV: u8 id, u8 len, u8 data[] * sdd is a TLV: u8 id, u8 len, u8 data[]
*/ */
......
...@@ -75,9 +75,6 @@ static void tx_policy_build(const struct cw1200_common *priv, ...@@ -75,9 +75,6 @@ static void tx_policy_build(const struct cw1200_common *priv,
BUG_ON(rates[0].idx < 0); BUG_ON(rates[0].idx < 0);
memset(policy, 0, sizeof(*policy)); memset(policy, 0, sizeof(*policy));
/* minstrel is buggy a little bit, so distille
* incoming rates first. */
/* Sort rates in descending order. */ /* Sort rates in descending order. */
for (i = 1; i < count; ++i) { for (i = 1; i < count; ++i) {
if (rates[i].idx < 0) { if (rates[i].idx < 0) {
...@@ -108,7 +105,8 @@ static void tx_policy_build(const struct cw1200_common *priv, ...@@ -108,7 +105,8 @@ static void tx_policy_build(const struct cw1200_common *priv,
count = i + 1; count = i + 1;
/* Re-fill policy trying to keep every requested rate and with /* Re-fill policy trying to keep every requested rate and with
* respect to the global max tx retransmission count. */ * respect to the global max tx retransmission count.
*/
if (limit < count) if (limit < count)
limit = count; limit = count;
if (total > limit) { if (total > limit) {
...@@ -129,7 +127,6 @@ static void tx_policy_build(const struct cw1200_common *priv, ...@@ -129,7 +127,6 @@ static void tx_policy_build(const struct cw1200_common *priv,
if (count == 2 && !(rates[0].flags & IEEE80211_TX_RC_MCS) && if (count == 2 && !(rates[0].flags & IEEE80211_TX_RC_MCS) &&
rates[0].idx > 4 && rates[0].count > 2 && rates[0].idx > 4 && rates[0].count > 2 &&
rates[1].idx < 2) { rates[1].idx < 2) {
/* ">> 1" is an equivalent of "/ 2", but faster */
int mid_rate = (rates[0].idx + 4) >> 1; int mid_rate = (rates[0].idx + 4) >> 1;
/* Decrease number of retries for the initial rate */ /* Decrease number of retries for the initial rate */
...@@ -151,7 +148,8 @@ static void tx_policy_build(const struct cw1200_common *priv, ...@@ -151,7 +148,8 @@ static void tx_policy_build(const struct cw1200_common *priv,
/* Fallback to 1 Mbps is a really bad thing, /* Fallback to 1 Mbps is a really bad thing,
* so let's try to increase probability of * so let's try to increase probability of
* successful transmission on the lowest g rate * successful transmission on the lowest g rate
* even more */ * even more
*/
if (rates[0].count >= 3) { if (rates[0].count >= 3) {
--rates[0].count; --rates[0].count;
++rates[2].count; ++rates[2].count;
...@@ -220,7 +218,8 @@ static int tx_policy_find(struct tx_policy_cache *cache, ...@@ -220,7 +218,8 @@ static int tx_policy_find(struct tx_policy_cache *cache,
{ {
/* O(n) complexity. Not so good, but there's only 8 entries in /* O(n) complexity. Not so good, but there's only 8 entries in
* the cache. * the cache.
* Also lru helps to reduce search time. */ * Also lru helps to reduce search time.
*/
struct tx_policy_cache_entry *it; struct tx_policy_cache_entry *it;
/* First search for policy in "used" list */ /* First search for policy in "used" list */
list_for_each_entry(it, &cache->used, link) { list_for_each_entry(it, &cache->used, link) {
...@@ -264,7 +263,8 @@ void tx_policy_clean(struct cw1200_common *priv) ...@@ -264,7 +263,8 @@ void tx_policy_clean(struct cw1200_common *priv)
for (idx = 0; idx < TX_POLICY_CACHE_SIZE; idx++) { for (idx = 0; idx < TX_POLICY_CACHE_SIZE; idx++) {
entry = &cache->cache[idx]; entry = &cache->cache[idx];
/* Policy usage count should be 0 at this time as all queues /* Policy usage count should be 0 at this time as all queues
should be empty */ should be empty
*/
if (WARN_ON(entry->policy.usage_count)) { if (WARN_ON(entry->policy.usage_count)) {
entry->policy.usage_count = 0; entry->policy.usage_count = 0;
list_move(&entry->link, &cache->free); list_move(&entry->link, &cache->free);
...@@ -319,7 +319,8 @@ static int tx_policy_get(struct cw1200_common *priv, ...@@ -319,7 +319,8 @@ static int tx_policy_get(struct cw1200_common *priv,
struct tx_policy_cache_entry *entry; struct tx_policy_cache_entry *entry;
*renew = true; *renew = true;
/* If policy is not found create a new one /* If policy is not found create a new one
* using the oldest entry in "free" list */ * using the oldest entry in "free" list
*/
entry = list_entry(cache->free.prev, entry = list_entry(cache->free.prev,
struct tx_policy_cache_entry, link); struct tx_policy_cache_entry, link);
entry->policy = wanted; entry->policy = wanted;
...@@ -612,7 +613,8 @@ cw1200_tx_h_bt(struct cw1200_common *priv, ...@@ -612,7 +613,8 @@ cw1200_tx_h_bt(struct cw1200_common *priv,
priv->listen_interval, priv->listen_interval,
mgt_frame->u.assoc_req.listen_interval); mgt_frame->u.assoc_req.listen_interval);
/* Replace listen interval derieved from /* Replace listen interval derieved from
* the one read from SDD */ * the one read from SDD
*/
mgt_frame->u.assoc_req.listen_interval = mgt_frame->u.assoc_req.listen_interval =
priv->listen_interval; priv->listen_interval;
} }
...@@ -667,7 +669,8 @@ cw1200_tx_h_rate_policy(struct cw1200_common *priv, ...@@ -667,7 +669,8 @@ cw1200_tx_h_rate_policy(struct cw1200_common *priv,
pr_debug("[TX] TX policy renew.\n"); pr_debug("[TX] TX policy renew.\n");
/* It's not so optimal to stop TX queues every now and then. /* It's not so optimal to stop TX queues every now and then.
* Better to reimplement task scheduling with * Better to reimplement task scheduling with
* a counter. TODO. */ * a counter. TODO.
*/
wsm_lock_tx_async(priv); wsm_lock_tx_async(priv);
cw1200_tx_queues_lock(priv); cw1200_tx_queues_lock(priv);
if (queue_work(priv->workqueue, if (queue_work(priv->workqueue,
...@@ -832,8 +835,7 @@ static int cw1200_handle_pspoll(struct cw1200_common *priv, ...@@ -832,8 +835,7 @@ static int cw1200_handle_pspoll(struct cw1200_common *priv,
priv->pspoll_mask |= pspoll_mask; priv->pspoll_mask |= pspoll_mask;
drop = 0; drop = 0;
/* Do not report pspols if data for given link id is /* Do not report pspols if data for given link id is queued already. */
* queued already. */
for (i = 0; i < 4; ++i) { for (i = 0; i < 4; ++i) {
if (cw1200_queue_get_num_queued(&priv->tx_queue[i], if (cw1200_queue_get_num_queued(&priv->tx_queue[i],
pspoll_mask)) { pspoll_mask)) {
...@@ -924,7 +926,8 @@ void cw1200_tx_confirm_cb(struct cw1200_common *priv, ...@@ -924,7 +926,8 @@ void cw1200_tx_confirm_cb(struct cw1200_common *priv,
cw1200_debug_txed(priv); cw1200_debug_txed(priv);
if (arg->flags & WSM_TX_STATUS_AGGREGATION) { if (arg->flags & WSM_TX_STATUS_AGGREGATION) {
/* Do not report aggregation to mac80211: /* Do not report aggregation to mac80211:
* it confuses minstrel a lot. */ * it confuses minstrel a lot.
*/
/* tx->flags |= IEEE80211_TX_STAT_AMPDU; */ /* tx->flags |= IEEE80211_TX_STAT_AMPDU; */
cw1200_debug_txed_agg(priv); cw1200_debug_txed_agg(priv);
} }
...@@ -1044,7 +1047,8 @@ void cw1200_rx_cb(struct cw1200_common *priv, ...@@ -1044,7 +1047,8 @@ void cw1200_rx_cb(struct cw1200_common *priv,
ieee80211_is_action(frame->frame_control) && ieee80211_is_action(frame->frame_control) &&
(mgmt->u.action.category == WLAN_CATEGORY_PUBLIC)) { (mgmt->u.action.category == WLAN_CATEGORY_PUBLIC)) {
/* Link ID already exists for the ACTION frame. /* Link ID already exists for the ACTION frame.
* Reset and Remap */ * Reset and Remap
*/
WARN_ON(work_pending(&priv->linkid_reset_work)); WARN_ON(work_pending(&priv->linkid_reset_work));
memcpy(&priv->action_frame_sa[0], memcpy(&priv->action_frame_sa[0],
ieee80211_get_SA(frame), ETH_ALEN); ieee80211_get_SA(frame), ETH_ALEN);
...@@ -1074,7 +1078,6 @@ void cw1200_rx_cb(struct cw1200_common *priv, ...@@ -1074,7 +1078,6 @@ void cw1200_rx_cb(struct cw1200_common *priv,
if (cw1200_handle_pspoll(priv, skb)) if (cw1200_handle_pspoll(priv, skb))
goto drop; goto drop;
hdr->mactime = 0; /* Not supported by WSM */
hdr->band = ((arg->channel_number & 0xff00) || hdr->band = ((arg->channel_number & 0xff00) ||
(arg->channel_number > 14)) ? (arg->channel_number > 14)) ?
IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ; IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ;
...@@ -1102,7 +1105,8 @@ void cw1200_rx_cb(struct cw1200_common *priv, ...@@ -1102,7 +1105,8 @@ void cw1200_rx_cb(struct cw1200_common *priv,
hdr->flag |= RX_FLAG_DECRYPTED | RX_FLAG_IV_STRIPPED; hdr->flag |= RX_FLAG_DECRYPTED | RX_FLAG_IV_STRIPPED;
/* Oops... There is no fast way to ask mac80211 about /* Oops... There is no fast way to ask mac80211 about
* IV/ICV lengths. Even defineas are not exposed.*/ * IV/ICV lengths. Even defineas are not exposed.
*/
switch (WSM_RX_STATUS_ENCRYPTION(arg->flags)) { switch (WSM_RX_STATUS_ENCRYPTION(arg->flags)) {
case WSM_RX_STATUS_WEP: case WSM_RX_STATUS_WEP:
iv_len = 4 /* WEP_IV_LEN */; iv_len = 4 /* WEP_IV_LEN */;
...@@ -1149,6 +1153,8 @@ void cw1200_rx_cb(struct cw1200_common *priv, ...@@ -1149,6 +1153,8 @@ void cw1200_rx_cb(struct cw1200_common *priv,
hdr->mactime = le64_to_cpu(hdr->mactime); hdr->mactime = le64_to_cpu(hdr->mactime);
if (skb->len >= 8) if (skb->len >= 8)
skb_trim(skb, skb->len - 8); skb_trim(skb, skb->len - 8);
} else {
hdr->mactime = 0;
} }
cw1200_debug_rxed(priv); cw1200_debug_rxed(priv);
...@@ -1192,7 +1198,8 @@ void cw1200_rx_cb(struct cw1200_common *priv, ...@@ -1192,7 +1198,8 @@ void cw1200_rx_cb(struct cw1200_common *priv,
/* Stay awake after frame is received to give /* Stay awake after frame is received to give
* userspace chance to react and acquire appropriate * userspace chance to react and acquire appropriate
* wakelock. */ * wakelock.
*/
if (ieee80211_is_auth(frame->frame_control)) if (ieee80211_is_auth(frame->frame_control))
grace_period = 5 * HZ; grace_period = 5 * HZ;
else if (ieee80211_is_deauth(frame->frame_control)) else if (ieee80211_is_deauth(frame->frame_control))
......
...@@ -1106,8 +1106,7 @@ static int wsm_cmd_send(struct cw1200_common *priv, ...@@ -1106,8 +1106,7 @@ static int wsm_cmd_send(struct cw1200_common *priv,
else else
pr_debug("[WSM] >>> 0x%.4X (%zu)\n", cmd, buf_len); pr_debug("[WSM] >>> 0x%.4X (%zu)\n", cmd, buf_len);
/* /* Due to buggy SPI on CW1200, we need to
* Due to buggy SPI on CW1200, we need to
* pad the message by a few bytes to ensure * pad the message by a few bytes to ensure
* that it's completely received. * that it's completely received.
*/ */
......
...@@ -314,13 +314,16 @@ struct cw1200_common; ...@@ -314,13 +314,16 @@ struct cw1200_common;
#define WSM_JOIN_FLAGS_P2P_GO BIT(1) #define WSM_JOIN_FLAGS_P2P_GO BIT(1)
/* Force to join BSS with the BSSID and the /* Force to join BSS with the BSSID and the
* SSID specified without waiting for beacons. The * SSID specified without waiting for beacons. The
* ProbeForJoin parameter is ignored. */ * ProbeForJoin parameter is ignored.
*/
#define WSM_JOIN_FLAGS_FORCE BIT(2) #define WSM_JOIN_FLAGS_FORCE BIT(2)
/* Give probe request/response higher /* Give probe request/response higher
* priority over the BT traffic */ * priority over the BT traffic
*/
#define WSM_JOIN_FLAGS_PRIO BIT(3) #define WSM_JOIN_FLAGS_PRIO BIT(3)
/* Issue immediate join confirmation and use /* Issue immediate join confirmation and use
* join complete to notify about completion */ * join complete to notify about completion
*/
#define WSM_JOIN_FLAGS_FORCE_WITH_COMPLETE_IND BIT(5) #define WSM_JOIN_FLAGS_FORCE_WITH_COMPLETE_IND BIT(5)
/* Key types */ /* Key types */
...@@ -1015,22 +1018,19 @@ struct wsm_add_key { ...@@ -1015,22 +1018,19 @@ struct wsm_add_key {
u16 reserved; u16 reserved;
union { union {
struct { struct {
u8 peer[6]; /* MAC address of the u8 peer[6]; /* MAC address of the peer station */
* peer station */
u8 reserved; u8 reserved;
u8 keylen; /* Key length in bytes */ u8 keylen; /* Key length in bytes */
u8 keydata[16]; /* Key data */ u8 keydata[16]; /* Key data */
} __packed wep_pairwise; } __packed wep_pairwise;
struct { struct {
u8 keyid; /* Unique per key identifier u8 keyid; /* Unique per key identifier (0..3) */
* (0..3) */
u8 keylen; /* Key length in bytes */ u8 keylen; /* Key length in bytes */
u16 reserved; u16 reserved;
u8 keydata[16]; /* Key data */ u8 keydata[16]; /* Key data */
} __packed wep_group; } __packed wep_group;
struct { struct {
u8 peer[6]; /* MAC address of the u8 peer[6]; /* MAC address of the peer station */
* peer station */
u16 reserved; u16 reserved;
u8 keydata[16]; /* TKIP key data */ u8 keydata[16]; /* TKIP key data */
u8 rx_mic_key[8]; /* Rx MIC key */ u8 rx_mic_key[8]; /* Rx MIC key */
...@@ -1044,8 +1044,7 @@ struct wsm_add_key { ...@@ -1044,8 +1044,7 @@ struct wsm_add_key {
u8 rx_seqnum[8]; /* Receive Sequence Counter */ u8 rx_seqnum[8]; /* Receive Sequence Counter */
} __packed tkip_group; } __packed tkip_group;
struct { struct {
u8 peer[6]; /* MAC address of the u8 peer[6]; /* MAC address of the peer station */
* peer station */
u16 reserved; u16 reserved;
u8 keydata[16]; /* AES key data */ u8 keydata[16]; /* AES key data */
} __packed aes_pairwise; } __packed aes_pairwise;
...@@ -1056,8 +1055,7 @@ struct wsm_add_key { ...@@ -1056,8 +1055,7 @@ struct wsm_add_key {
u8 rx_seqnum[8]; /* Receive Sequence Counter */ u8 rx_seqnum[8]; /* Receive Sequence Counter */
} __packed aes_group; } __packed aes_group;
struct { struct {
u8 peer[6]; /* MAC address of the u8 peer[6]; /* MAC address of the peer station */
* peer station */
u8 keyid; /* Key ID */ u8 keyid; /* Key ID */
u8 reserved; u8 reserved;
u8 keydata[16]; /* WAPI key data */ u8 keydata[16]; /* WAPI key data */
...@@ -1550,7 +1548,8 @@ struct wsm_tx_rate_retry_policy { ...@@ -1550,7 +1548,8 @@ struct wsm_tx_rate_retry_policy {
* finishes. * finishes.
* BIT(3) - Count initial frame transmission as part of * BIT(3) - Count initial frame transmission as part of
* rate retry counting but not as a retry * rate retry counting but not as a retry
* attempt */ * attempt
*/
u8 flags; u8 flags;
u8 rate_recoveries; u8 rate_recoveries;
u8 reserved[3]; u8 reserved[3];
...@@ -1618,24 +1617,24 @@ static inline int wsm_set_udp_port_filter(struct cw1200_common *priv, ...@@ -1618,24 +1617,24 @@ static inline int wsm_set_udp_port_filter(struct cw1200_common *priv,
#define D11_MAX_SSID_LEN (32) #define D11_MAX_SSID_LEN (32)
struct wsm_p2p_device_type { struct wsm_p2p_device_type {
__le16 categoryId; __le16 category_id;
u8 oui[4]; u8 oui[4];
__le16 subCategoryId; __le16 subcategory_id;
} __packed; } __packed;
struct wsm_p2p_device_info { struct wsm_p2p_device_info {
struct wsm_p2p_device_type primaryDevice; struct wsm_p2p_device_type primaryDevice;
u8 reserved1[3]; u8 reserved1[3];
u8 devNameSize; u8 devname_size;
u8 localDevName[D11_MAX_SSID_LEN]; u8 local_devname[D11_MAX_SSID_LEN];
u8 reserved2[3]; u8 reserved2[3];
u8 numSecDevSupported; u8 num_secdev_supported;
struct wsm_p2p_device_type secondaryDevices[0]; struct wsm_p2p_device_type secdevs[0];
} __packed; } __packed;
/* 4.36 SetWCDMABand - WO */ /* 4.36 SetWCDMABand - WO */
struct wsm_cdma_band { struct wsm_cdma_band {
u8 WCDMA_Band; u8 wcdma_band;
u8 reserved[3]; u8 reserved[3];
} __packed; } __packed;
...@@ -1668,19 +1667,19 @@ struct wsm_ht_protection { ...@@ -1668,19 +1667,19 @@ struct wsm_ht_protection {
#define WSM_GPIO_ALL_PINS 0xFF #define WSM_GPIO_ALL_PINS 0xFF
struct wsm_gpio_command { struct wsm_gpio_command {
u8 GPIO_Command; u8 command;
u8 pin; u8 pin;
__le16 config; __le16 config;
} __packed; } __packed;
/* 4.41 TSFCounter - RO */ /* 4.41 TSFCounter - RO */
struct wsm_tsf_counter { struct wsm_tsf_counter {
__le64 TSF_Counter; __le64 tsf_counter;
} __packed; } __packed;
/* 4.43 Keep alive period */ /* 4.43 Keep alive period */
struct wsm_keep_alive_period { struct wsm_keep_alive_period {
__le16 keepAlivePeriod; __le16 period;
u8 reserved[2]; u8 reserved[2];
} __packed; } __packed;
...@@ -1688,7 +1687,7 @@ static inline int wsm_keep_alive_period(struct cw1200_common *priv, ...@@ -1688,7 +1687,7 @@ static inline int wsm_keep_alive_period(struct cw1200_common *priv,
int period) int period)
{ {
struct wsm_keep_alive_period arg = { struct wsm_keep_alive_period arg = {
.keepAlivePeriod = __cpu_to_le16(period), .period = __cpu_to_le16(period),
}; };
return wsm_write_mib(priv, WSM_MIB_ID_KEEP_ALIVE_PERIOD, return wsm_write_mib(priv, WSM_MIB_ID_KEEP_ALIVE_PERIOD,
&arg, sizeof(arg)); &arg, sizeof(arg));
...@@ -1739,13 +1738,13 @@ static inline int wsm_set_arp_ipv4_filter(struct cw1200_common *priv, ...@@ -1739,13 +1738,13 @@ static inline int wsm_set_arp_ipv4_filter(struct cw1200_common *priv,
/* P2P Power Save Mode Info - 4.31 */ /* P2P Power Save Mode Info - 4.31 */
struct wsm_p2p_ps_modeinfo { struct wsm_p2p_ps_modeinfo {
u8 oppPsCTWindow; u8 opp_ps_ct_window;
u8 count; u8 count;
u8 reserved; u8 reserved;
u8 dtimCount; u8 dtim_count;
__le32 duration; __le32 duration;
__le32 interval; __le32 interval;
__le32 startTime; __le32 start_time;
} __packed; } __packed;
static inline int wsm_set_p2p_ps_modeinfo(struct cw1200_common *priv, static inline int wsm_set_p2p_ps_modeinfo(struct cw1200_common *priv,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment