break;
}
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_SET_ANTMD,
+ vnt_control_out(priv, MESSAGE_TYPE_SET_ANTMD,
(u16)antenna_mode, 0, 0, NULL);
}
memcpy(array, addr, length);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE, 0,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
MESSAGE_REQUEST_BBREG, length, array);
memcpy(array, agc, length_agc);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE, 0,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
MESSAGE_REQUEST_BBAGC, length_agc, array);
if ((priv->byRFType == RF_VT3226) ||
data |= 0x2;
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE, USB_REG4,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE, USB_REG4,
MESSAGE_REQUEST_MEM, sizeof(data), &data);
return true;
/* Set Channel[7] = 0 to tell H/W channel is changing now. */
MACvRegBitsOff(priv, MAC_REG_CHANNEL, 0xb0);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_SELECT_CHANNLE,
+ vnt_control_out(priv, MESSAGE_TYPE_SELECT_CHANNLE,
connection_channel, 0, 0, NULL);
if (priv->byBBType == BB_TYPE_11A) {
data[16 + i * 2 + 1] = rsv_time[i];
}
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE,
MAC_REG_RSPINF_B_1, MESSAGE_REQUEST_MACREG, 34, &data[0]);
}
data[2] = (u8)priv->uEIFS;
data[3] = (u8)priv->uSlot;
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE, MAC_REG_SIFS,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE, MAC_REG_SIFS,
MESSAGE_REQUEST_MACREG, 4, &data[0]);
max_min |= 0xa0;
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE, MAC_REG_CWMAXMIN0,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE, MAC_REG_CWMAXMIN0,
MESSAGE_REQUEST_MACREG, 1, &max_min);
}
data[6] = (u8)(tsf_offset >> 48);
data[7] = (u8)(tsf_offset >> 56);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_SET_TSFTBTT,
+ vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
MESSAGE_REQUEST_TSF, 0, 8, data);
}
/*
data[6] = (u8)(next_tbtt >> 48);
data[7] = (u8)(next_tbtt >> 56);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_SET_TSFTBTT,
+ vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
MESSAGE_REQUEST_TBTT, 0, 8, data);
return;
data[6] = (u8)(tsf >> 48);
data[7] = (u8)(tsf >> 56);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_SET_TSFTBTT,
+ vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
MESSAGE_REQUEST_TBTT, 0, 8, data);
dev_dbg(&priv->usb->dev, "%s TBTT: %8llx\n", __func__, tsf);
* Date: Apr. 5, 2004
*
* Functions:
- * CONTROLnsRequestOut - Write variable length bytes to MEM/BB/MAC/EEPROM
+ * vnt_control_out - Write variable length bytes to MEM/BB/MAC/EEPROM
* CONTROLnsRequestIn - Read variable length bytes from MEM/BB/MAC/EEPROM
* ControlvWriteByte - Write one byte to MEM/BB/MAC/EEPROM
* ControlvReadByte - Read one byte from MEM/BB/MAC/EEPROM
u8 data)
{
- CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE, reg_off, reg,
+ vnt_control_out(pDevice, MESSAGE_TYPE_WRITE, reg_off, reg,
sizeof(u8), &data);
return;
reg_data[0] = data;
reg_data[1] = reg_mask;
- CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE_MASK, reg_off,
+ vnt_control_out(pDevice, MESSAGE_TYPE_WRITE_MASK, reg_off,
reg_type, ARRAY_SIZE(reg_data), reg_data);
return;
#include "device.h"
#include "usbpipe.h"
-#define CONTROLnsRequestOut(Device, Request, Value, Index, Length, Buffer) \
- PIPEnsControlOut(Device, Request, Value, Index, Length, Buffer)
-
#define CONTROLnsRequestIn(Device, Request, Value, Index, Length, Buffer) \
PIPEnsControlIn(Device, Request, Value, Index, Length, Buffer)
wLength = min_t(int, fw->size - ii, FIRMWARE_CHUNK_SIZE);
memcpy(pBuffer, fw->data + ii, wLength);
- NdisStatus = CONTROLnsRequestOut(pDevice,
+ NdisStatus = vnt_control_out(pDevice,
0,
0x1200+ii,
0x0000,
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Branch to Sram\n");
- NdisStatus = CONTROLnsRequestOut(pDevice,
+ NdisStatus = vnt_control_out(pDevice,
1,
0x1200,
0x0000,
//MACvDisableKeyEntry(pDevice, i);
}
}
- if ( wLength != 0 ) {
- CONTROLnsRequestOut(pDevice,
- MESSAGE_TYPE_CLRKEYENTRY,
- 0,
- 0,
- wLength,
- pbyData
- );
- }
+
+ if (wLength != 0)
+ vnt_control_out(pDevice, MESSAGE_TYPE_CLRKEYENTRY,
+ 0, 0, wLength, pbyData);
}
pbyData[i] = (u8) i;
}
pbyData[i] = (u8) i;
- CONTROLnsRequestOut(pDevice,
- MESSAGE_TYPE_CLRKEYENTRY,
- 0,
- 0,
- 11,
- pbyData
- );
+
+ vnt_control_out(pDevice, MESSAGE_TYPE_CLRKEYENTRY,
+ 0, 0, 11, pbyData);
return;
}
{
__le64 le_mc = cpu_to_le64(mc_filter);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE, MAC_REG_MAR0,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE, MAC_REG_MAR0,
MESSAGE_REQUEST_MACREG, sizeof(le_mc), (u8 *)&le_mc);
}
*/
void MACbShutdown(struct vnt_private *priv)
{
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_MACSHUTDOWN, 0, 0, 0, NULL);
+ vnt_control_out(priv, MESSAGE_TYPE_MACSHUTDOWN, 0, 0, 0, NULL);
}
void MACvSetBBType(struct vnt_private *priv, u8 type)
data[0] = type;
data[1] = EnCFG_BBType_MASK;
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE_MASK, MAC_REG_ENCFG0,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE_MASK, MAC_REG_ENCFG0,
MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
}
*/
void MACvDisableKeyEntry(struct vnt_private *priv, u8 entry_idx)
{
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_CLRKEYENTRY, 0, 0,
+ vnt_control_out(priv, MESSAGE_TYPE_CLRKEYENTRY, 0, 0,
sizeof(entry_idx), &entry_idx);
}
dev_dbg(&priv->usb->dev, "offset %d key ctl %d set key %24ph\n",
offset, key_ctl, (u8 *)&set_key);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_SETKEY, offset,
+ vnt_control_out(priv, MESSAGE_TYPE_SETKEY, offset,
(u16)key_idx, sizeof(struct vnt_mac_set_key), (u8 *)&set_key);
}
data[0] = 0;
data[1] = bits;
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE_MASK,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE_MASK,
reg_ofs, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
}
data[0] = bits;
data[1] = bits;
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE_MASK,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE_MASK,
reg_ofs, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
}
data[0] = (u8)(word & 0xff);
data[1] = (u8)(word >> 8);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE,
reg_ofs, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
}
void MACvWriteBSSIDAddress(struct vnt_private *priv, u8 *addr)
{
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE, MAC_REG_BSSID0,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE, MAC_REG_BSSID0,
MESSAGE_REQUEST_MACREG, ETH_ALEN, addr);
}
data[0] = EnCFG_ProtectMd;
data[1] = EnCFG_ProtectMd;
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE_MASK,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE_MASK,
MAC_REG_ENCFG0, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
}
data[0] = 0;
data[1] = EnCFG_ProtectMd;
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE_MASK,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE_MASK,
MAC_REG_ENCFG0, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
}
data[0] = EnCFG_BarkerPream;
data[1] = EnCFG_BarkerPream;
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE_MASK,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE_MASK,
MAC_REG_ENCFG2, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
}
data[0] = 0;
data[1] = EnCFG_BarkerPream;
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE_MASK,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE_MASK,
MAC_REG_ENCFG2, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
}
data[0] = (u8)(interval & 0xff);
data[1] = (u8)(interval >> 8);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE,
MAC_REG_BI, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
}
init_cmd->long_retry_limit = pDevice->byLongRetryLimit;
/* issue card_init command to device */
- ntStatus = CONTROLnsRequestOut(pDevice,
+ ntStatus = vnt_control_out(pDevice,
MESSAGE_TYPE_CARDINIT, 0, 0,
sizeof(struct vnt_cmd_card_init), (u8 *)init_cmd);
if (ntStatus != STATUS_SUCCESS) {
{
/* disable power saving hw function */
- CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_DISABLE_PS, 0,
+ vnt_control_out(pDevice, MESSAGE_TYPE_DISABLE_PS, 0,
0, 0, NULL);
/* clear AutoSleep */
pbyData[2] = (u8)(dwData >> 16);
pbyData[3] = (u8)(dwData >> 24);
- CONTROLnsRequestOut(pDevice,
+ vnt_control_out(pDevice,
MESSAGE_TYPE_WRITE_IFRF, 0, 0, 4, pbyData);
return true;
/* Init Table */
memcpy(array, addr1, length1);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE, 0,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
MESSAGE_REQUEST_RF_INIT, length1, array);
/* Channel Table 0 */
memcpy(array, addr2, length);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE,
value, MESSAGE_REQUEST_RF_CH0, length, array);
length2 -= length;
memcpy(array, addr3, length);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE,
value, MESSAGE_REQUEST_RF_CH1, length, array);
length3 -= length;
memcpy(array, addr1, length1);
/* Init Table 2 */
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE,
0, MESSAGE_REQUEST_RF_INIT2, length1, array);
/* Channel Table 0 */
memcpy(array, addr2, length);
- CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE,
+ vnt_control_out(priv, MESSAGE_TYPE_WRITE,
value, MESSAGE_REQUEST_RF_CH2, length, array);
length2 -= length;
* Date: Mar. 29, 2005
*
* Functions:
- * CONTROLnsRequestOut - Write variable length bytes to MEM/BB/MAC/EEPROM
+ * vnt_control_out - Write variable length bytes to MEM/BB/MAC/EEPROM
* CONTROLnsRequestIn - Read variable length bytes from MEM/BB/MAC/EEPROM
* ControlvWriteByte - Write one byte to MEM/BB/MAC/EEPROM
* ControlvReadByte - Read one byte from MEM/BB/MAC/EEPROM
static void s_nsBulkInUsbIoCompleteRead(struct urb *urb);
static void s_nsBulkOutIoCompleteWrite(struct urb *urb);
-int PIPEnsControlOut(struct vnt_private *priv, u8 request, u16 value,
+int vnt_control_out(struct vnt_private *priv, u8 request, u16 value,
u16 index, u16 length, u8 *buffer)
{
int status = 0;
#include "device.h"
-int PIPEnsControlOut(struct vnt_private *, u8 byRequest, u16 wValue,
- u16 wIndex, u16 wLength, u8 *pbyBuffer);
+int vnt_control_out(struct vnt_private *, u8, u16, u16, u16, u8 *);
int PIPEnsControlIn(struct vnt_private *, u8 byRequest, u16 wValue,
u16 wIndex, u16 wLength, u8 *pbyBuffer);
ControlvReadByte(pDevice, MESSAGE_REQUEST_MACREG, MAC_REG_PSCTL, &byData);
if ((byData & PSCTL_PS) != 0) {
// disable power saving hw function
- CONTROLnsRequestOut(pDevice,
+ vnt_control_out(pDevice,
MESSAGE_TYPE_DISABLE_PS,
0,
0,