{
u32 ulReg;
int bytes;
+ struct bcm_interface_adapter *interfaceAdapter;
/* Program EP2 MAX_PKT_SIZE */
ulReg = ntohl(EP2_MPS_REG);
ulReg = ntohl(EP2_CFG_REG);
BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x132, 4, TRUE);
- if (((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter))->bHighSpeedDevice == TRUE) {
+ interfaceAdapter =
+ (struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter);
+ if (interfaceAdapter->bHighSpeedDevice) {
ulReg = ntohl(EP2_CFG_INT);
BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x136, 4, TRUE);
} else {
pr_err(DRV_NAME "InitCardAndDownloadFirmware failed.\n");
return status;
}
- if (TRUE == psIntfAdapter->psAdapter->fw_download_done) {
+ if (psIntfAdapter->psAdapter->fw_download_done) {
if (StartInterruptUrb(psIntfAdapter)) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
DBG_TYPE_INITEXIT, DRV_ENTRY,
DBG_TYPE_INITEXIT, DRV_ENTRY,
DBG_LVL_ALL,
"BCM16 is applicable on this dongle\n");
- if (retval ||
- (psIntfAdapter->bHighSpeedDevice == false)) {
+ if (retval || !psIntfAdapter->bHighSpeedDevice) {
usedIntOutForBulkTransfer = EP2;
endpoint = &iface_desc->endpoint[EP2].desc;
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
* If Mode is FS then EP2 should be bulk end
* point
*/
- if (((psIntfAdapter->bHighSpeedDevice == TRUE) && (usb_endpoint_is_int_out(endpoint) == false)) ||
- ((psIntfAdapter->bHighSpeedDevice == false) && (usb_endpoint_is_bulk_out(endpoint) == false))) {
+ if ((psIntfAdapter->bHighSpeedDevice &&
+ !usb_endpoint_is_int_out(endpoint)) ||
+ (!psIntfAdapter->bHighSpeedDevice &&
+ !usb_endpoint_is_bulk_out(endpoint))) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
DBG_TYPE_INITEXIT,
DRV_ENTRY, DBG_LVL_ALL,
}
}
- if ((psIntfAdapter->bHighSpeedDevice == false) && usb_endpoint_is_bulk_out(endpoint)) {
+ if (!psIntfAdapter->bHighSpeedDevice &&
+ usb_endpoint_is_bulk_out(endpoint)) {
/* Once BULK is selected in FS mode. Revert it back to INT. Else USB_IF will fail. */
UINT _uiData = ntohl(EP2_CFG_INT);
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
DBG_TYPE_INITEXIT, DRV_ENTRY,
DBG_LVL_ALL,
"Choosing AltSetting as a default setting.\n");
- if (usb_endpoint_is_int_out(endpoint) == false) {
+ if (!usb_endpoint_is_int_out(endpoint)) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
DBG_TYPE_INITEXIT,
DRV_ENTRY, DBG_LVL_ALL,
psIntfAdapter->bSuspended = TRUE;
- if (TRUE == psIntfAdapter->bPreparingForBusSuspend) {
+ if (psIntfAdapter->bPreparingForBusSuspend) {
psIntfAdapter->bPreparingForBusSuspend = false;
if (psIntfAdapter->psAdapter->LinkStatus == LINKUP_DONE) {