diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-23 04:46:48 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-08-27 12:28:08 -0400 |
commit | 946ba30d61d47ee634a39d27b4d067b6418eaa08 (patch) | |
tree | fb5c30ef53e072da353ed8369fb68e031b53bd71 /drivers/net | |
parent | 76d048151cf935281998b591e070581fc438e27e (diff) |
iwlwifi: add PAN API
Define the new host commands and notifications
REPLY_WIPAN_PARAMS
REPLY_WIPAN_RXON
REPLY_WIPAN_RXON_TIMING
REPLY_WIPAN_RXON_ASSOC
REPLY_WIPAN_QOS_PARAM
REPLY_WIPAN_WEPKEY
REPLY_WIPAN_P2P_CHANNEL_SWITCH
REPLY_WIPAN_NOA_NOTIFICATION
and their corresponding structures along with the PAN
station flag, the PAN AP sta ID and new dev types for
the second context.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 109 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-hcmd.c | 8 |
2 files changed, 116 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 55779bf0627..3e4ba31b5d5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -180,6 +180,16 @@ enum { | |||
180 | REPLY_BT_COEX_PROFILE_NOTIF = 0xce, | 180 | REPLY_BT_COEX_PROFILE_NOTIF = 0xce, |
181 | REPLY_BT_COEX_SCO = 0xcf, | 181 | REPLY_BT_COEX_SCO = 0xcf, |
182 | 182 | ||
183 | /* PAN commands */ | ||
184 | REPLY_WIPAN_PARAMS = 0xb2, | ||
185 | REPLY_WIPAN_RXON = 0xb3, /* use REPLY_RXON structure */ | ||
186 | REPLY_WIPAN_RXON_TIMING = 0xb4, /* use REPLY_RXON_TIMING structure */ | ||
187 | REPLY_WIPAN_RXON_ASSOC = 0xb6, /* use REPLY_RXON_ASSOC structure */ | ||
188 | REPLY_WIPAN_QOS_PARAM = 0xb7, /* use REPLY_QOS_PARAM structure */ | ||
189 | REPLY_WIPAN_WEPKEY = 0xb8, /* use REPLY_WEPKEY structure */ | ||
190 | REPLY_WIPAN_P2P_CHANNEL_SWITCH = 0xb9, | ||
191 | REPLY_WIPAN_NOA_NOTIFICATION = 0xbc, | ||
192 | |||
183 | REPLY_MAX = 0xff | 193 | REPLY_MAX = 0xff |
184 | }; | 194 | }; |
185 | 195 | ||
@@ -607,6 +617,9 @@ enum { | |||
607 | RXON_DEV_TYPE_ESS = 3, | 617 | RXON_DEV_TYPE_ESS = 3, |
608 | RXON_DEV_TYPE_IBSS = 4, | 618 | RXON_DEV_TYPE_IBSS = 4, |
609 | RXON_DEV_TYPE_SNIFFER = 6, | 619 | RXON_DEV_TYPE_SNIFFER = 6, |
620 | RXON_DEV_TYPE_CP = 7, | ||
621 | RXON_DEV_TYPE_2STA = 8, | ||
622 | RXON_DEV_TYPE_P2P = 9, | ||
610 | }; | 623 | }; |
611 | 624 | ||
612 | 625 | ||
@@ -823,7 +836,8 @@ struct iwl_rxon_time_cmd { | |||
823 | __le16 atim_window; | 836 | __le16 atim_window; |
824 | __le32 beacon_init_val; | 837 | __le32 beacon_init_val; |
825 | __le16 listen_interval; | 838 | __le16 listen_interval; |
826 | __le16 reserved; | 839 | u8 dtim_period; |
840 | u8 delta_cp_bss_tbtts; | ||
827 | } __packed; | 841 | } __packed; |
828 | 842 | ||
829 | /* | 843 | /* |
@@ -960,11 +974,13 @@ struct iwl_qosparam_cmd { | |||
960 | 974 | ||
961 | /* Special, dedicated locations within device's station table */ | 975 | /* Special, dedicated locations within device's station table */ |
962 | #define IWL_AP_ID 0 | 976 | #define IWL_AP_ID 0 |
977 | #define IWL_AP_ID_PAN 1 | ||
963 | #define IWL_STA_ID 2 | 978 | #define IWL_STA_ID 2 |
964 | #define IWL3945_BROADCAST_ID 24 | 979 | #define IWL3945_BROADCAST_ID 24 |
965 | #define IWL3945_STATION_COUNT 25 | 980 | #define IWL3945_STATION_COUNT 25 |
966 | #define IWL4965_BROADCAST_ID 31 | 981 | #define IWL4965_BROADCAST_ID 31 |
967 | #define IWL4965_STATION_COUNT 32 | 982 | #define IWL4965_STATION_COUNT 32 |
983 | #define IWLAGN_PAN_BCAST_ID 14 | ||
968 | #define IWLAGN_BROADCAST_ID 15 | 984 | #define IWLAGN_BROADCAST_ID 15 |
969 | #define IWLAGN_STATION_COUNT 16 | 985 | #define IWLAGN_STATION_COUNT 16 |
970 | 986 | ||
@@ -973,6 +989,7 @@ struct iwl_qosparam_cmd { | |||
973 | 989 | ||
974 | #define STA_FLG_TX_RATE_MSK cpu_to_le32(1 << 2) | 990 | #define STA_FLG_TX_RATE_MSK cpu_to_le32(1 << 2) |
975 | #define STA_FLG_PWR_SAVE_MSK cpu_to_le32(1 << 8) | 991 | #define STA_FLG_PWR_SAVE_MSK cpu_to_le32(1 << 8) |
992 | #define STA_FLG_PAN_STATION cpu_to_le32(1 << 13) | ||
976 | #define STA_FLG_RTS_MIMO_PROT_MSK cpu_to_le32(1 << 17) | 993 | #define STA_FLG_RTS_MIMO_PROT_MSK cpu_to_le32(1 << 17) |
977 | #define STA_FLG_AGG_MPDU_8US_MSK cpu_to_le32(1 << 18) | 994 | #define STA_FLG_AGG_MPDU_8US_MSK cpu_to_le32(1 << 18) |
978 | #define STA_FLG_MAX_AGG_SIZE_POS (19) | 995 | #define STA_FLG_MAX_AGG_SIZE_POS (19) |
@@ -4309,4 +4326,94 @@ struct iwl_rx_packet { | |||
4309 | 4326 | ||
4310 | int iwl_agn_check_rxon_cmd(struct iwl_priv *priv); | 4327 | int iwl_agn_check_rxon_cmd(struct iwl_priv *priv); |
4311 | 4328 | ||
4329 | /* | ||
4330 | * REPLY_WIPAN_PARAMS = 0xb2 (Commands and Notification) | ||
4331 | */ | ||
4332 | |||
4333 | /** | ||
4334 | * struct iwl_wipan_slot | ||
4335 | * @width: Time in TU | ||
4336 | * @type: | ||
4337 | * 0 - BSS | ||
4338 | * 1 - PAN | ||
4339 | */ | ||
4340 | struct iwl_wipan_slot { | ||
4341 | __le16 width; | ||
4342 | u8 type; | ||
4343 | u8 reserved; | ||
4344 | } __packed; | ||
4345 | |||
4346 | #define IWL_WIPAN_PARAMS_FLG_LEAVE_CHANNEL_CTS BIT(1) /* reserved */ | ||
4347 | #define IWL_WIPAN_PARAMS_FLG_LEAVE_CHANNEL_QUIET BIT(2) /* reserved */ | ||
4348 | #define IWL_WIPAN_PARAMS_FLG_SLOTTED_MODE BIT(3) /* reserved */ | ||
4349 | #define IWL_WIPAN_PARAMS_FLG_FILTER_BEACON_NOTIF BIT(4) | ||
4350 | #define IWL_WIPAN_PARAMS_FLG_FULL_SLOTTED_MODE BIT(5) | ||
4351 | |||
4352 | /** | ||
4353 | * struct iwl_wipan_params_cmd | ||
4354 | * @flags: | ||
4355 | * bit0: reserved | ||
4356 | * bit1: CP leave channel with CTS | ||
4357 | * bit2: CP leave channel qith Quiet | ||
4358 | * bit3: slotted mode | ||
4359 | * 1 - work in slotted mode | ||
4360 | * 0 - work in non slotted mode | ||
4361 | * bit4: filter beacon notification | ||
4362 | * bit5: full tx slotted mode. if this flag is set, | ||
4363 | * uCode will perform leaving channel methods in context switch | ||
4364 | * also when working in same channel mode | ||
4365 | * @num_slots: 1 - 10 | ||
4366 | */ | ||
4367 | struct iwl_wipan_params_cmd { | ||
4368 | __le16 flags; | ||
4369 | u8 reserved; | ||
4370 | u8 num_slots; | ||
4371 | struct iwl_wipan_slot slots[10]; | ||
4372 | } __packed; | ||
4373 | |||
4374 | /* | ||
4375 | * REPLY_WIPAN_P2P_CHANNEL_SWITCH = 0xb9 | ||
4376 | * | ||
4377 | * TODO: Figure out what this is used for, | ||
4378 | * it can only switch between 2.4 GHz | ||
4379 | * channels!! | ||
4380 | */ | ||
4381 | |||
4382 | struct iwl_wipan_p2p_channel_switch_cmd { | ||
4383 | __le16 channel; | ||
4384 | __le16 reserved; | ||
4385 | }; | ||
4386 | |||
4387 | /* | ||
4388 | * REPLY_WIPAN_NOA_NOTIFICATION = 0xbc | ||
4389 | * | ||
4390 | * This is used by the device to notify us of the | ||
4391 | * NoA schedule it determined so we can forward it | ||
4392 | * to userspace for inclusion in probe responses. | ||
4393 | * | ||
4394 | * In beacons, the NoA schedule is simply appended | ||
4395 | * to the frame we give the device. | ||
4396 | */ | ||
4397 | |||
4398 | struct iwl_wipan_noa_descriptor { | ||
4399 | u8 count; | ||
4400 | __le32 duration; | ||
4401 | __le32 interval; | ||
4402 | __le32 starttime; | ||
4403 | } __packed; | ||
4404 | |||
4405 | struct iwl_wipan_noa_attribute { | ||
4406 | u8 id; | ||
4407 | __le16 length; | ||
4408 | u8 index; | ||
4409 | u8 ct_window; | ||
4410 | struct iwl_wipan_noa_descriptor descr0, descr1; | ||
4411 | u8 reserved; | ||
4412 | } __packed; | ||
4413 | |||
4414 | struct iwl_wipan_noa_notification { | ||
4415 | u32 noa_active; | ||
4416 | struct iwl_wipan_noa_attribute noa_attribute; | ||
4417 | } __packed; | ||
4418 | |||
4312 | #endif /* __iwl_commands_h__ */ | 4419 | #endif /* __iwl_commands_h__ */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-hcmd.c index 9fb2035e4ec..c373b53babe 100644 --- a/drivers/net/wireless/iwlwifi/iwl-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-hcmd.c | |||
@@ -100,6 +100,14 @@ const char *get_cmd_string(u8 cmd) | |||
100 | IWL_CMD(REPLY_BT_COEX_PROFILE_NOTIF); | 100 | IWL_CMD(REPLY_BT_COEX_PROFILE_NOTIF); |
101 | IWL_CMD(REPLY_BT_COEX_PRIO_TABLE); | 101 | IWL_CMD(REPLY_BT_COEX_PRIO_TABLE); |
102 | IWL_CMD(REPLY_BT_COEX_PROT_ENV); | 102 | IWL_CMD(REPLY_BT_COEX_PROT_ENV); |
103 | IWL_CMD(REPLY_WIPAN_PARAMS); | ||
104 | IWL_CMD(REPLY_WIPAN_RXON); | ||
105 | IWL_CMD(REPLY_WIPAN_RXON_TIMING); | ||
106 | IWL_CMD(REPLY_WIPAN_RXON_ASSOC); | ||
107 | IWL_CMD(REPLY_WIPAN_QOS_PARAM); | ||
108 | IWL_CMD(REPLY_WIPAN_WEPKEY); | ||
109 | IWL_CMD(REPLY_WIPAN_P2P_CHANNEL_SWITCH); | ||
110 | IWL_CMD(REPLY_WIPAN_NOA_NOTIFICATION); | ||
103 | default: | 111 | default: |
104 | return "UNKNOWN"; | 112 | return "UNKNOWN"; |
105 | 113 | ||