/* Scan flags */ /* Forced background scan means if the station cannot */ /* enter the power-save mode, it shall force to perform a */ /* background scan. Only valid when ScanType is */ /* background scan. */ #define WSM_SCAN_FLAG_FORCE_BACKGROUND (BIT(0))
/* The WLAN device scans one channel at a time so */ /* that disturbance to the data traffic is minimized. */ #define WSM_SCAN_FLAG_SPLIT_METHOD (BIT(1))
/* Preamble Type. Long if not set. */ #define WSM_SCAN_FLAG_SHORT_PREAMBLE (BIT(2))
/* 11n Tx Mode. Mixed if not set. */ #define WSM_SCAN_FLAG_11N_GREENFIELD (BIT(3))
/* Scan constraints */ /* Maximum number of channels to be scanned. */ #define WSM_SCAN_MAX_NUM_OF_CHANNELS (48)
/* The maximum number of SSIDs that the device can scan for. */ #define WSM_SCAN_MAX_NUM_OF_SSIDS (2)
/* Power management modes */ /* 802.11 Active mode */ #define WSM_PSM_ACTIVE (0)
/* 802.11 PS mode */ #define WSM_PSM_PS BIT(0)
/* Fast Power Save bit */ #define WSM_PSM_FAST_PS_FLAG BIT(7)
/* Dynamic aka Fast power save */ #define WSM_PSM_FAST_PS (BIT(0) | BIT(7))
/* Undetermined */ /* Note : Undetermined status is reported when the */ /* NULL data frame used to advertise the PM mode to */ /* the AP at Pre or Post Background Scan is not Acknowledged */ #define WSM_PSM_UNKNOWN BIT(1)
/* EPTA prioirty flags for BT Coex */ /* default epta priority */ #define WSM_EPTA_PRIORITY_DEFAULT 4 /* use for normal data */ #define WSM_EPTA_PRIORITY_DATA 4 /* use for connect/disconnect/roaming*/ #define WSM_EPTA_PRIORITY_MGT 5 /* use for action frames */ #define WSM_EPTA_PRIORITY_ACTION 5 /* use for AC_VI data */ #define WSM_EPTA_PRIORITY_VIDEO 5 /* use for AC_VO data */ #define WSM_EPTA_PRIORITY_VOICE 6 /* use for EAPOL exchange */ #define WSM_EPTA_PRIORITY_EAPOL 7
/* TX status */ /* Frame was sent aggregated */ /* Only valid for WSM_SUCCESS status. */ #define WSM_TX_STATUS_AGGREGATION (BIT(0))
/* Host should requeue this frame later. */ /* Valid only when status is WSM_REQUEUE. */ #define WSM_TX_STATUS_REQUEUE (BIT(1))
/* Normal Ack */ #define WSM_TX_STATUS_NORMAL_ACK (0<<2)
/* No Ack */ #define WSM_TX_STATUS_NO_ACK (1<<2)
/* No explicit acknowledgement */ #define WSM_TX_STATUS_NO_EXPLICIT_ACK (2<<2)
/* Block Ack */ /* Only valid for WSM_SUCCESS status. */ #define WSM_TX_STATUS_BLOCK_ACK (3<<2)
/* RX status */ /* Unencrypted */ #define WSM_RX_STATUS_UNENCRYPTED (0<<0)
/* PLCP preamble type */ /* For long preamble */ #define WSM_JOIN_PREAMBLE_LONG (0)
/* For short preamble (Long for 1Mbps) */ #define WSM_JOIN_PREAMBLE_SHORT (1)
/* For short preamble (Long for 1 and 2Mbps) */ #define WSM_JOIN_PREAMBLE_SHORT_2 (2)
/* Join flags */ /* Unsynchronized */ #define WSM_JOIN_FLAGS_UNSYNCRONIZED BIT(0) /* The BSS owner is a P2P GO */ #define WSM_JOIN_FLAGS_P2P_GO BIT(1) /* Force to join BSS with the BSSID and the * SSID specified without waiting for beacons. The * ProbeForJoin parameter is ignored.
*/ #define WSM_JOIN_FLAGS_FORCE BIT(2) /* Give probe request/response higher * priority over the BT traffic
*/ #define WSM_JOIN_FLAGS_PRIO BIT(3) /* Issue immediate join confirmation and use * join complete to notify about completion
*/ #define WSM_JOIN_FLAGS_FORCE_WITH_COMPLETE_IND BIT(5)
/* Interval period in TUs that the device shall the re- */ /* execute the requested scan. Max value supported by the device */ /* is 256s. */
u32 auto_scan_interval;
/* Number of probe requests (per SSID) sent to one (1) */ /* channel. Zero (0) means that none is send, which */ /* means that a passive scan is to be done. Value */ /* greater than zero (0) means that an active scan is to */ /* be done. */
u32 num_probes;
/* Number of channels to be scanned. */ /* Maximum value is WSM_SCAN_MAX_NUM_OF_CHANNELS. */
u8 num_channels;
/* Number of SSID provided in the scan command (this */ /* is zero (0) in broadcast scan) */ /* The maximum number of SSIDs is WSM_SCAN_MAX_NUM_OF_SSIDS. */
u8 num_ssids;
/* The delay time (in microseconds) period */ /* before sending a probe-request. */
u8 probe_delay;
/* SSIDs to be scanned [numOfSSIDs]; */ struct wsm_ssid *ssids;
/* Channels to be scanned [numOfChannels]; */ struct wsm_scan_ch *ch;
};
int wsm_scan(struct cw1200_common *priv, conststruct wsm_scan *arg);
struct wsm_tx_confirm { /* Packet identifier used in wsm_tx. */
u32 packet_id;
/* WSM_STATUS_... */
u32 status;
/* WSM_TRANSMIT_RATE_... */
u8 tx_rate;
/* The number of times the frame was transmitted */ /* without receiving an acknowledgement. */
u8 ack_failures;
/* WSM_TX_STATUS_... */
u16 flags;
/* The total time in microseconds that the frame spent in */ /* the WLAN device before transmission as completed. */
u32 media_delay;
/* The total time in microseconds that the frame spent in */ /* the WLAN device before transmission was started. */
u32 tx_queue_delay;
};
/* 3.15 */
/* Note that ideology of wsm_tx struct is different against the rest of * WSM API. wsm_hdr is /not/ a caller-adapted struct to be used as an input * argument for WSM call, but a prepared bytestream to be sent to firmware. * It is filled partly in cw1200_tx, partly in low-level WSM code. * Please pay attention once again: ideology is different. * * Legend: * - [in]: cw1200_tx must fill this field. * - [wsm]: the field is filled by low-level WSM.
*/ struct wsm_tx { /* common WSM header */ struct wsm_hdr hdr;
/* Packet identifier that meant to be used in completion. */
u32 packet_id; /* Note this is actually a cookie */
/* WSM_TRANSMIT_RATE_... */
u8 max_tx_rate;
/* WSM_QUEUE_... */
u8 queue_id;
/* True: another packet is pending on the host for transmission. */
u8 more;
/* Bit 0 = 0 - Start expiry time from first Tx attempt (default) */ /* Bit 0 = 1 - Start expiry time from receipt of Tx Request */ /* Bits 3:1 - PTA Priority */ /* Bits 6:4 - Tx Rate Retry Policy */ /* Bit 7 - Reserved */
u8 flags;
/* Should be 0. */
u32 reserved;
/* The elapsed time in TUs, after the initial transmission */ /* of an MSDU, after which further attempts to transmit */ /* the MSDU shall be terminated. Overrides the global */ /* dot11MaxTransmitMsduLifeTime setting [optional] */ /* Device will set the default value if this is 0. */
__le32 expire_time;
/* Indication parameters. */ /* For error indication, this shall be a 32-bit WSM status. */ /* For RCPI or RSSI indication, this should be an 8-bit */ /* RCPI or RSSI value. */ /* [out] */ u32 data;
};
/* Specifies the channel number to join. The channel */ /* number will be mapped to an actual frequency */ /* according to the band */
u16 channel_number;
/* Specifies the BSSID of the BSS or IBSS to be joined */ /* or the IBSS to be started. */
u8 bssid[6];
/* ATIM window of IBSS */ /* When ATIM window is zero the initiated IBSS does */ /* not support power saving. */
u16 atim_window;
/* WSM_JOIN_PREAMBLE_... */
u8 preamble_type;
/* Specifies if a probe request should be send with the */ /* specified SSID when joining to the network. */
u8 probe_for_join;
/* DTIM Period (In multiples of beacon interval) */
u8 dtim_period;
/* WSM_JOIN_FLAGS_... */
u8 flags;
/* Length of the SSID */
u32 ssid_len;
/* Specifies the SSID of the IBSS to join or start */
u8 ssid[32];
/* Specifies the time between TBTTs in TUs */
u32 beacon_interval;
/* A bit mask that defines the BSS basic rate set. */
u32 basic_rate_set;
};
struct wsm_join_cnf {
u32 status;
/* Minimum transmission power level in units of 0.1dBm */
u32 min_power_level;
/* Maximum transmission power level in units of 0.1dBm */
u32 max_power_level;
};
int wsm_join(struct cw1200_common *priv, struct wsm_join *arg);
/* 3.28 */ #define WSM_SET_BSS_PARAMS_REQ_ID 0x0011 #define WSM_SET_BSS_PARAMS_RESP_ID 0x0411 struct wsm_set_bss_params { /* This resets the beacon loss counters only */
u8 reset_beacon_loss;
/* The number of lost consecutive beacons after which */ /* the WLAN device should indicate the BSS-Lost event */ /* to the WLAN host driver. */
u8 beacon_lost_count;
/* The AID received during the association process. */
u16 aid;
/* The operational rate set mask */
u32 operational_rate_set;
};
int wsm_set_bss_params(struct cw1200_common *priv, conststruct wsm_set_bss_params *arg);
/* 3.30 */ #define WSM_ADD_KEY_REQ_ID 0x000C #define WSM_ADD_KEY_RESP_ID 0x040C struct wsm_add_key {
u8 type; /* WSM_KEY_TYPE_... */
u8 index; /* Key entry index: 0 -- WSM_KEY_MAX_INDEX */
u16 reserved; union { struct {
u8 peer[6]; /* MAC address of the peer station */
u8 reserved;
u8 keylen; /* Key length in bytes */
u8 keydata[16]; /* Key data */
} __packed wep_pairwise; struct {
u8 keyid; /* Unique per key identifier (0..3) */
u8 keylen; /* Key length in bytes */
u16 reserved;
u8 keydata[16]; /* Key data */
} __packed wep_group; struct {
u8 peer[6]; /* MAC address of the peer station */
u16 reserved;
u8 keydata[16]; /* TKIP key data */
u8 rx_mic_key[8]; /* Rx MIC key */
u8 tx_mic_key[8]; /* Tx MIC key */
} __packed tkip_pairwise; struct {
u8 keydata[16]; /* TKIP key data */
u8 rx_mic_key[8]; /* Rx MIC key */
u8 keyid; /* Key ID */
u8 reserved[3];
u8 rx_seqnum[8]; /* Receive Sequence Counter */
} __packed tkip_group; struct {
u8 peer[6]; /* MAC address of the peer station */
u16 reserved;
u8 keydata[16]; /* AES key data */
} __packed aes_pairwise; struct {
u8 keydata[16]; /* AES key data */
u8 keyid; /* Key ID */
u8 reserved[3];
u8 rx_seqnum[8]; /* Receive Sequence Counter */
} __packed aes_group; struct {
u8 peer[6]; /* MAC address of the peer station */
u8 keyid; /* Key ID */
u8 reserved;
u8 keydata[16]; /* WAPI key data */
u8 mic_key[16]; /* MIC key data */
} __packed wapi_pairwise; struct {
u8 keydata[16]; /* WAPI key data */
u8 mic_key[16]; /* MIC key data */
u8 keyid; /* Key ID */
u8 reserved[3];
} __packed wapi_group;
} __packed;
} __packed;
int wsm_add_key(struct cw1200_common *priv, conststruct wsm_add_key *arg);
int wsm_set_tx_queue_params(struct cw1200_common *priv, conststruct wsm_set_tx_queue_params *arg, u8 id);
/* 3.36 */ #define WSM_EDCA_PARAMS_REQ_ID 0x0013 #define WSM_EDCA_PARAMS_RESP_ID 0x0413 struct wsm_edca_queue_params { /* CWmin (in slots) for the access class. */
u16 cwmin;
/* CWmax (in slots) for the access class. */
u16 cwmax;
/* AIFS (in slots) for the access class. */
u16 aifns;
/* TX OP Limit (in microseconds) for the access class. */
u16 txop_limit;
/* dot11MaxReceiveLifetime to be used for the specified */ /* the access class. Overrides the global */ /* dot11MaxReceiveLifetime value */
u32 max_rx_lifetime;
};
struct wsm_edca_params { /* NOTE: index is a linux queue id. */ struct wsm_edca_queue_params params[4]; bool uapsd_enable[4];
};
struct wsm_switch_channel { /* 1 - means the STA shall not transmit any further */ /* frames until the channel switch has completed */
u8 mode;
/* Number of TBTTs until channel switch occurs. */ /* 0 - indicates switch shall occur at any time */ /* 1 - occurs immediately before the next TBTT */
u8 switch_count;
/* The new channel number to switch to. */ /* Note this is defined as per section 2.7. */
u16 channel_number;
};
int wsm_switch_channel(struct cw1200_common *priv, conststruct wsm_switch_channel *arg);
int wsm_beacon_transmit(struct cw1200_common *priv, conststruct wsm_beacon_transmit *arg);
int wsm_start_find(struct cw1200_common *priv);
int wsm_stop_find(struct cw1200_common *priv);
struct wsm_suspend_resume { /* See 3.52 */ /* Link ID */ /* [out] */ int link_id; /* Stop sending further Tx requests down to device for this link */ /* [out] */ bool stop; /* Transmit multicast Frames */ /* [out] */ bool multicast; /* The AC on which Tx to be suspended /resumed. */ /* This is applicable only for U-APSD */ /* WSM_QUEUE_... */ /* [out] */ int queue;
};
staticinlineint wsm_set_rx_filter(struct cw1200_common *priv, conststruct wsm_rx_filter *arg)
{
__le32 val = 0; if (arg->promiscuous)
val |= __cpu_to_le32(BIT(0)); if (arg->bssid)
val |= __cpu_to_le32(BIT(1)); if (arg->fcs)
val |= __cpu_to_le32(BIT(2)); if (arg->probeResponder)
val |= __cpu_to_le32(BIT(3)); return wsm_write_mib(priv, WSM_MIB_ID_RX_FILTER, &val, sizeof(val));
}
int wsm_set_probe_responder(struct cw1200_common *priv, bool enable);
staticinlineint wsm_set_protected_mgmt_policy(struct cw1200_common *priv, struct wsm_protected_mgmt_policy *arg)
{
__le32 val = 0; int ret; if (arg->protectedMgmtEnable)
val |= __cpu_to_le32(BIT(0)); if (arg->unprotectedMgmtFramesAllowed)
val |= __cpu_to_le32(BIT(1)); if (arg->encryptionForAuthFrame)
val |= __cpu_to_le32(BIT(2));
ret = wsm_write_mib(priv, WSM_MIB_ID_PROTECTED_MGMT_POLICY,
&val, sizeof(val)); return ret;
}
int wsm_get_tx(struct cw1200_common *priv, u8 **data,
size_t *tx_len, int *burst); void wsm_txed(struct cw1200_common *priv, u8 *data);
/* ******************************************************************** */ /* Queue mapping: WSM <---> linux */ /* Linux: VO VI BE BK */ /* WSM: BE BK VI VO */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.