Commit 3d47a6fb authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: Replace typedef struct _CMD_CARD_INIT

Replace with struct vnt_cmd_card_init init_cmd in
device_init_registers.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 302433da
......@@ -299,13 +299,13 @@ static void device_init_diversity_timer(struct vnt_private *pDevice)
static int device_init_registers(struct vnt_private *pDevice)
{
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
struct vnt_cmd_card_init init_cmd;
u8 abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
u8 abySNAP_RFC1042[ETH_ALEN] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00};
u8 abySNAP_Bridgetunnel[ETH_ALEN]
= {0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8};
u8 byAntenna;
int ii;
CMD_CARD_INIT sInitCmd;
int ntStatus = STATUS_SUCCESS;
RSP_CARD_INIT sInitRsp;
u8 byTmp;
......@@ -343,20 +343,17 @@ static int device_init_registers(struct vnt_private *pDevice)
return false;
}
sInitCmd.byInitClass = DEVICE_INIT_COLD;
sInitCmd.bExistSWNetAddr = (u8) pDevice->bExistSWNetAddr;
for (ii = 0; ii < 6; ii++)
sInitCmd.bySWNetAddr[ii] = pDevice->abyCurrentNetAddr[ii];
sInitCmd.byShortRetryLimit = pDevice->byShortRetryLimit;
sInitCmd.byLongRetryLimit = pDevice->byLongRetryLimit;
/* issue card_init command to device */
ntStatus = CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_CARDINIT,
0,
0,
sizeof(CMD_CARD_INIT),
(u8 *) &(sInitCmd));
init_cmd.init_class = DEVICE_INIT_COLD;
init_cmd.exist_sw_net_addr = (u8) pDevice->bExistSWNetAddr;
for (ii = 0; ii < 6; ii++)
init_cmd.sw_net_addr[ii] = pDevice->abyCurrentNetAddr[ii];
init_cmd.short_retry_limit = pDevice->byShortRetryLimit;
init_cmd.long_retry_limit = pDevice->byLongRetryLimit;
/* issue card_init command to device */
ntStatus = CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_CARDINIT, 0, 0,
sizeof(struct vnt_cmd_card_init), (u8 *)&init_cmd);
if ( ntStatus != STATUS_SUCCESS ) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Issue Card init fail \n");
......
......@@ -77,14 +77,14 @@ typedef struct _CMD_WRITE_MASK
u8 byMask;
} CMD_WRITE_MASK, *PCMD_WRITE_MASK;
typedef struct _CMD_CARD_INIT
struct vnt_cmd_card_init
{
u8 byInitClass;
u8 bExistSWNetAddr;
u8 bySWNetAddr[6];
u8 byShortRetryLimit;
u8 byLongRetryLimit;
} CMD_CARD_INIT, *PCMD_CARD_INIT;
u8 init_class;
u8 exist_sw_net_addr;
u8 sw_net_addr[6];
u8 short_retry_limit;
u8 long_retry_limit;
};
typedef struct _RSP_CARD_INIT
{
......
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