libertas: support mesh for various firmware versions

CMD_MESH_CONFIG command ID and a couple of structure members in TxPD,
RxPD have been changed in firmware version 10.x.y.z and newer.

Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Bing Zhao
2009-03-25 09:51:16 -07:00
committed by John W. Linville
parent 5e3af1d2d3
commit 684d6b3602
9 changed files with 114 additions and 48 deletions

View File

@@ -227,6 +227,20 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
#define TxPD_CONTROL_WDS_FRAME (1<<17)
#define TxPD_MESH_FRAME TxPD_CONTROL_WDS_FRAME
/** Mesh interface ID */
#define MESH_IFACE_ID 0x0001
/** Mesh id should be in bits 14-13-12 */
#define MESH_IFACE_BIT_OFFSET 0x000c
/** Mesh enable bit in FW capability */
#define MESH_CAPINFO_ENABLE_MASK (1<<16)
/** FW definition from Marvell v5 */
#define MRVL_FW_V5 (0x05)
/** FW definition from Marvell v10 */
#define MRVL_FW_V10 (0x0a)
/** FW major revision definition */
#define MRVL_FW_MAJOR_REV(x) ((x)>>24)
/** RxPD status */
#define MRVDRV_RXPD_STATUS_OK 0x0001
@@ -380,6 +394,13 @@ enum KEY_INFO_WPA {
KEY_INFO_WPA_ENABLED = 0x04
};
/** mesh_fw_ver */
enum _mesh_fw_ver {
MESH_NONE = 0, /* MESH is not supported */
MESH_FW_OLD, /* MESH is supported in FW V5 */
MESH_FW_NEW, /* MESH is supported in FW V10 and newer */
};
/* Default values for fwt commands. */
#define FWT_DEFAULT_METRIC 0
#define FWT_DEFAULT_DIR 1