summaryrefslogtreecommitdiff
path: root/drivers/staging/ks7010/ks_hostif.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-04 18:56:27 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-04 18:56:27 -0700
commitdf34df483a97b1591a3e90a6941f99fe9f863508 (patch)
tree1b7239fba7513ecbc3a3b322125fc8c3761bd65e /drivers/staging/ks7010/ks_hostif.h
parent9abf8acea297b4c65f5fa3206e2b8e468e730e84 (diff)
parent049b5e2ae30b3c2f870cc9550af6f9a947fbd5b5 (diff)
Merge tag 'staging-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging/IIO updates from Greg KH: "Here is the big set of Staging/IIO driver patches for 4.17-rc1. It is a lot, over 500 changes, but not huge by previous kernel release standards. We deleted more lines than we added again (27k added vs. 91k remvoed), thanks to finally being able to delete the IRDA drivers and networking code. We also deleted the ccree crypto driver, but that's coming back in through the crypto tree to you, in a much cleaned-up form. Added this round is at lot of "mt7621" device support, which is for an embedded device that Neil Brown cares about, and of course a handful of new IIO drivers as well. And finally, the fsl-mc core code moved out of the staging tree to the "real" part of the kernel, which is nice to see happen as well. Full details are in the shortlog, which has all of the tiny cleanup patches described. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (579 commits) staging: rtl8723bs: Remove yield call, replace with cond_resched() staging: rtl8723bs: Replace yield() call with cond_resched() staging: rtl8723bs: Remove unecessary newlines from 'odm.h'. staging: rtl8723bs: Rework 'struct _ODM_Phy_Status_Info_' coding style. staging: rtl8723bs: Rework 'struct _ODM_Per_Pkt_Info_' coding style. staging: rtl8723bs: Replace NULL pointer comparison with '!'. staging: rtl8723bs: Factor out rtl8723bs_recv_tasklet() sections. staging: rtl8723bs: Fix function signature that goes over 80 characters. staging: rtl8723bs: Fix lines too long in update_recvframe_attrib(). staging: rtl8723bs: Remove unnecessary blank lines in 'rtl8723bs_recv.c'. staging: rtl8723bs: Change camel case to snake case in 'rtl8723bs_recv.c'. staging: rtl8723bs: Add missing braces in else statement. staging: rtl8723bs: Add spaces around ternary operators. staging: rtl8723bs: Fix lines with trailing open parentheses. staging: rtl8723bs: Remove unnecessary length #define's. staging: rtl8723bs: Fix IEEE80211 authentication algorithm constants. staging: rtl8723bs: Fix alignment in rtw_wx_set_auth(). staging: rtl8723bs: Remove braces from single statement conditionals. staging: rtl8723bs: Remove unecessary braces from switch statement. staging: rtl8723bs: Fix newlines in rtw_wx_set_auth(). ...
Diffstat (limited to 'drivers/staging/ks7010/ks_hostif.h')
-rw-r--r--drivers/staging/ks7010/ks_hostif.h95
1 files changed, 26 insertions, 69 deletions
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index 5bae8d468e23..2f918b11b337 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -13,6 +13,7 @@
#define _KS_HOSTIF_H_
#include <linux/compiler.h>
+#include <linux/ieee80211.h>
/*
* HOST-MAC I/F events
@@ -58,7 +59,7 @@
/*
* HOST-MAC I/F data structure
- * Byte alignmet Little Endian
+ * Byte alignment Little Endian
*/
struct hostif_hdr {
@@ -224,10 +225,9 @@ struct hostif_start_confirm_t {
__le16 result_code;
} __packed;
-#define SSID_MAX_SIZE 32
struct ssid_t {
u8 size;
- u8 body[SSID_MAX_SIZE];
+ u8 body[IEEE80211_MAX_SSID_LEN];
u8 ssid_pad;
} __packed;
@@ -284,20 +284,8 @@ struct ap_info_t {
u8 pad0; /* +09 */
__le16 beacon_period; /* +10 */
__le16 capability; /* +12 */
-#define BSS_CAP_ESS BIT(0)
-#define BSS_CAP_IBSS BIT(1)
-#define BSS_CAP_CF_POLABLE BIT(2)
-#define BSS_CAP_CF_POLL_REQ BIT(3)
-#define BSS_CAP_PRIVACY BIT(4)
-#define BSS_CAP_SHORT_PREAMBLE BIT(5)
-#define BSS_CAP_PBCC BIT(6)
-#define BSS_CAP_CHANNEL_AGILITY BIT(7)
-#define BSS_CAP_SHORT_SLOT_TIME BIT(10)
-#define BSS_CAP_DSSS_OFDM BIT(13)
u8 frame_type; /* +14 */
u8 ch_info; /* +15 */
-#define FRAME_TYPE_BEACON 0x80
-#define FRAME_TYPE_PROBE_RESP 0x50
__le16 body_size; /* +16 */
u8 body[1024]; /* +18 */
/* +1032 */
@@ -347,6 +335,22 @@ struct hostif_stop_confirm_t {
__le16 result_code;
} __packed;
+#define D_11B_ONLY_MODE 0
+#define D_11G_ONLY_MODE 1
+#define D_11BG_COMPATIBLE_MODE 2
+#define D_11A_ONLY_MODE 3
+
+#define CTS_MODE_FALSE 0
+#define CTS_MODE_TRUE 1
+
+struct hostif_request_t {
+ __le16 phy_type;
+ __le16 cts_mode;
+ __le16 scan_type;
+ __le16 capability;
+ struct rate_set16_t rate_set;
+} __packed;
+
/**
* struct hostif_ps_adhoc_set_request_t - pseudo adhoc mode
* @capability: bit5 : preamble
@@ -356,18 +360,8 @@ struct hostif_stop_confirm_t {
*/
struct hostif_ps_adhoc_set_request_t {
struct hostif_hdr header;
- __le16 phy_type;
-#define D_11B_ONLY_MODE 0
-#define D_11G_ONLY_MODE 1
-#define D_11BG_COMPATIBLE_MODE 2
-#define D_11A_ONLY_MODE 3
- __le16 cts_mode;
-#define CTS_MODE_FALSE 0
-#define CTS_MODE_TRUE 1
+ struct hostif_request_t request;
__le16 channel;
- struct rate_set16_t rate_set;
- __le16 capability;
- __le16 scan_type;
} __packed;
struct hostif_ps_adhoc_set_confirm_t {
@@ -375,48 +369,23 @@ struct hostif_ps_adhoc_set_confirm_t {
__le16 result_code;
} __packed;
-/**
- * struct hostif_infrastructure_set_request_t
- * @capability: bit5 : preamble
- * bit6 : pbcc - Not supported always 0
- * bit10 : ShortSlotTime
- * bit13 : DSSS-OFDM - Not supported always 0
- */
-struct hostif_infrastructure_set_request_t {
- struct hostif_hdr header;
- __le16 phy_type;
- __le16 cts_mode;
- struct rate_set16_t rate_set;
- struct ssid_t ssid;
- __le16 capability;
- __le16 beacon_lost_count;
- __le16 auth_type;
#define AUTH_TYPE_OPEN_SYSTEM 0
#define AUTH_TYPE_SHARED_KEY 1
- struct channel_list_t channel_list;
- __le16 scan_type;
-} __packed;
/**
- * struct hostif_infrastructure_set2_request_t
+ * struct hostif_infrastructure_set_request_t
* @capability: bit5 : preamble
* bit6 : pbcc - Not supported always 0
* bit10 : ShortSlotTime
* bit13 : DSSS-OFDM - Not supported always 0
*/
-struct hostif_infrastructure_set2_request_t {
+struct hostif_infrastructure_set_request_t {
struct hostif_hdr header;
- __le16 phy_type;
- __le16 cts_mode;
- struct rate_set16_t rate_set;
+ struct hostif_request_t request;
struct ssid_t ssid;
- __le16 capability;
__le16 beacon_lost_count;
__le16 auth_type;
-#define AUTH_TYPE_OPEN_SYSTEM 0
-#define AUTH_TYPE_SHARED_KEY 1
struct channel_list_t channel_list;
- __le16 scan_type;
u8 bssid[ETH_ALEN];
} __packed;
@@ -434,13 +403,9 @@ struct hostif_infrastructure_set_confirm_t {
*/
struct hostif_adhoc_set_request_t {
struct hostif_hdr header;
- __le16 phy_type;
- __le16 cts_mode;
- __le16 channel;
- struct rate_set16_t rate_set;
+ struct hostif_request_t request;
struct ssid_t ssid;
- __le16 capability;
- __le16 scan_type;
+ __le16 channel;
} __packed;
/**
@@ -452,13 +417,9 @@ struct hostif_adhoc_set_request_t {
*/
struct hostif_adhoc_set2_request_t {
struct hostif_hdr header;
- __le16 phy_type;
- __le16 cts_mode;
+ struct hostif_request_t request;
__le16 reserved;
- struct rate_set16_t rate_set;
struct ssid_t ssid;
- __le16 capability;
- __le16 scan_type;
struct channel_list_t channel_list;
u8 bssid[ETH_ALEN];
} __packed;
@@ -475,8 +436,6 @@ struct last_associate_t {
struct association_request_t {
u8 type;
-#define FRAME_TYPE_ASSOC_REQ 0x00
-#define FRAME_TYPE_REASSOC_REQ 0x20
u8 pad;
__le16 capability;
__le16 listen_interval;
@@ -486,8 +445,6 @@ struct association_request_t {
struct association_response_t {
u8 type;
-#define FRAME_TYPE_ASSOC_RESP 0x10
-#define FRAME_TYPE_REASSOC_RESP 0x30
u8 pad;
__le16 capability;
__le16 status;