Re: [PATCH 0/4] Drivers: hv: vmbus: Eliminate calls to BUG_ON()
On Tue, Aug 26, 2014 at 12:05:22PM -0700, K. Y. Srinivasan wrote: > Cleanup the channel management code and eliminate calls to BUG_ON() > > K. Y. Srinivasan (4): > Drivers: hv: vmbus: Cleanup vmbus_post_msg() > Drivers: hv: vmbus: Cleanup vmbus_teardown_gpadl() > Drivers: hv: vmbus: Cleanup vmbus_close_internal() > Drivers: hv: vmbus: Cleanup vmbus_establish_gpadl() I've applied these on top of 3.17-rc1 and my Hyper-V guest with most verification on bar DEBUG_PAGEALLOC boots without issue so long as I have more than one CPU assigned (that issue is being investigated in https://lkml.org/lkml/2014/8/26/271, [PANIC, hyperv] BUG: unable to handle kernel paging request at 88007784 (hv_ringbuffer_write)). With DEBUG_PAGEALLOC on I hit https://lkml.org/lkml/2014/8/19/227 (BUG: unable to handle kernel paging request at 8801f3febe63 (netvsc_select_queue)) but that's different to the above BUG_ONs. -- Sitsofe | http://sucs.org/~sits/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [hyperv] BUG at drivers/hv/channel.c:462 while changing MTU
On Mon, Aug 25, 2014 at 09:48:31PM +, KY Srinivasan wrote: > > > There is also a case of the BUG_ON at line 460 being hit (from > > https://lkml.org/lkml/2014/8/19/708 ): > > > > 457ret = vmbus_post_msg(msg, > > 458 sizeof(struct > > vmbus_channel_gpadl_teardown)); > > 459 > > 460BUG_ON(ret != 0); > > I will take care of all BUG_ON() instances in channel.c Running a kernel patched with "Drivers: hv: vmbus: Eliminate calls to BUG_ON()" boots but repeatedly changing the MTU with the following script now results in a GPF in netvsc_open: dev=eth1; while true; do ifconfig eth1 down; ifconfig eth1 mtu 1500; ifconfig eth1 up; ifconfig eth1 mtu 9000; done [ 58.031328] hv_netvsc vmbus_0_15: net device safe to remove [ 58.083975] hv_netvsc: hv_netvsc channel opened successfully [ 58.973625] hv_netvsc vmbus_0_15: Send section size: 6144, Section count:2560 [ 59.030456] hv_netvsc vmbus_0_15: Device MAC 00:15:5d:6f:02:a5 link state up [ 59.142723] hv_netvsc vmbus_0_15: net device safe to remove [ 59.184701] hv_netvsc: hv_netvsc channel opened successfully [ 59.867690] hv_netvsc vmbus_0_15: Send section size: 6144, Section count:2560 [ 59.919317] hv_netvsc vmbus_0_15: Device MAC 00:15:5d:6f:02:a5 link state up [ 59.988054] hv_netvsc vmbus_0_15 eth1: unable to teardown receive buffer's gpadl [ 60.038752] hv_netvsc vmbus_0_15: net device safe to remove [ 60.070163] hv_vmbus: Close failed: close post msg return is 4 [ 60.121381] hv_vmbus: Close failed: close post msg return is 4 [ 60.157974] hv_vmbus: Close failed: close post msg return is 4 [ 60.190205] hv_vmbus: Close failed: close post msg return is 4 [ 60.232070] hv_vmbus: Close failed: close post msg return is 4 [ 65.275820] hv_netvsc vmbus_0_15 eth1: unable to open channel: -110 [ 65.325009] general protection fault: [#1] SMP [ 65.356804] CPU: 7 PID: 852 Comm: ifconfig Not tainted 3.17.0-rc1.x86_64-dirty #127 [ 65.356804] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006 05/23/2012 [ 65.356804] task: 8800f268b9f0 ti: 8800eed38000 task.ti: 8800eed38000 [ 65.356804] RIP: 0010:[] [] rndis_filter_open+0x1f/0x60 [ 65.356804] RSP: 0018:8800eed3bd28 EFLAGS: 00010246 [ 65.356804] RAX: RBX: 6b6b6b6b6b6b6b6b RCX: 0006 [ 65.356804] RDX: 0006 RSI: 8800f268c130 RDI: 8801fbb8d480 [ 65.356804] RBP: 8800eed3bd30 R08: R09: [ 65.356804] R10: 0001 R11: 0001 R12: 8801fbb8d480 [ 65.356804] R13: R14: R15: 0001 [ 65.356804] FS: 7fdfdbf94740() GS:880207ce() knlGS: [ 65.356804] CS: 0010 DS: ES: CR0: 80050033 [ 65.356804] CR2: 7fdfdc1b51c4 CR3: ec53b000 CR4: 000406e0 [ 65.356804] Stack: [ 65.356804] 8800f1021160 8800eed3bd58 814e6515 8800f1021160 [ 65.356804] 8188f980 8800eed3bd80 815d0998 [ 65.356804] 8800f1021160 8800f1021160 1043 8800eed3bdb8 [ 65.356804] Call Trace: [ 65.356804] [] netvsc_open+0x25/0xb0 [ 65.356804] [] __dev_open+0x98/0x110 [ 65.356804] [] __dev_change_flags+0xb9/0x160 [ 65.356804] [] dev_change_flags+0x29/0x60 [ 65.356804] [] devinet_ioctl+0x31b/0x6f0 [ 65.356804] [] inet_ioctl+0x6d/0xa0 [ 65.356804] [] sock_ioctl+0x1e0/0x210 [ 65.356804] [] do_vfs_ioctl+0x4d0/0x510 [ 65.356804] [] ? sysret_check+0x22/0x5d [ 65.356804] [] ? trace_hardirqs_on_caller+0x17d/0x210 [ 65.356804] [] SyS_ioctl+0x53/0x90 [ 65.356804] [] system_call_fastpath+0x16/0x1b [ 65.356804] Code: 41 5e 41 5f 5d c3 66 0f 1f 44 00 00 66 66 66 66 90 48 8b 87 20 01 00 00 48 85 c0 74 2f 55 48 89 e5 53 48 8b 98 40 02 00 00 31 c0 <83> 7b 08 02 75 2b be 0d 00 00 00 48 89 df e8 9e f9 ff ff 85 c0 [ 65.356804] RIP [] rndis_filter_open+0x1f/0x60 [ 65.356804] RSP [ 66.789324] ---[ end trace 1b6075f9340eb5bc ]--- -- Sitsofe | http://sucs.org/~sits/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/4] Drivers: hv: vmbus: Cleanup vmbus_close_internal()
On Tue, Aug 26, 2014 at 12:05:51PM -0700, K. Y. Srinivasan wrote: > -static void vmbus_close_internal(struct vmbus_channel *channel) > +static int vmbus_close_internal(struct vmbus_channel *channel) > { > struct vmbus_channel_close_channel *msg; > - int ret; > + int ret = 0; GCC has a feature which warns about uninitialized variables. Those features are there to help prevent bugs. You are turning the feature off here by initializing it with a bogus value. Don't do that. > > channel->state = CHANNEL_OPEN_STATE; > channel->sc_creation_callback = NULL; > @@ -502,11 +502,28 @@ static void vmbus_close_internal(struct vmbus_channel > *channel) > > ret = vmbus_post_msg(msg, sizeof(struct vmbus_channel_close_channel)); > > - BUG_ON(ret != 0); > + if (ret) { > + pr_err("Close failed: close post msg return is %d\n", ret); > + /* > + * If we failed to post the close msg, > + * it is perhaps better to leak memory. > + */ > + goto close_err; Just return directly. Don't introduce do-nothing gotos to lead the reader through a series of pointless goto hops. The goto label is poorly chosen. Label names should be based on the thing which they do. "close_err" implies that something is closed but that's not the case, the label doesn't do anything. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)
On Tue, Aug 26, 2014 at 10:30:54AM +, Dexuan Cui wrote: > > What is baffles me is the whole UP vs SMP thing - why would UP > > make this show up consistently? Perhaps some assertions could be added > > to check that rbi->ring_buffer still has sane values in it after > > operations on it are finished? > With more tests, I found vcpus=2 has the same issue, despite a > small possibility. > vcpus=4 seems fine in my limited tests. > Actually I found the direct cause of the panic: sometimes > vmbus_post_msg() can return 4 (HV_STATUS_INVALID_ALIGNMENT), but > vmbus_open() doesn't propagate this error to the caller > synthvid_connect_vsp(), and vmbus_open() " goto error1" and frees the > ringbuffer! So later the access to ring_buffer->read_index is caught > by CONFIG_DEBUG_PAGEALLOC. > > I don't see any "invalid alignment" here... and I can't explain why > vcpus=4 seems OK... Debugging WIP. > > BTW, please try the attached patch. With it, the VM doesn't panic in > my side with vcpus=1 and can boot to shell prompt(looks the boot-up is > very slow. I have to wait for several minutes...) A quick tip: inline patches tend to be better than attachments on LKML. This is because if the mimetype of the attachment is something like octet/stream then various tools (e.g. https://lkml.org/lkml/2014/8/26/271 and https://patchwork.kernel.org/project/LKML/list/?submitter=100981 ) won't archive/extract the patch... I rebased your patch on top of the K.Y.'s "Drivers: hv: vmbus: Eliminate calls to BUG_ON()" patch set (see below). The combination no longer triggers the bug and it doesn't take too long to boot but the network interface fails to work (which I believe is . Rebased vmbus open fixes patch. --- drivers/hv/channel.c| 4 +++- drivers/hv/connection.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index c7ffd42..964cdc9 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -165,8 +165,10 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, ret = vmbus_post_msg(open_msg, sizeof(struct vmbus_channel_open_channel)); - if (ret != 0) + if (ret != 0) { + err = ret; goto error1; + } t = wait_for_completion_timeout(&open_info->waitevent, 5*HZ); if (t == 0) { diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 16c2ccb..17bf48f 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -433,6 +433,7 @@ int vmbus_post_msg(void *buffer, size_t buflen) switch (ret) { case HV_STATUS_INSUFFICIENT_BUFFERS: case -ENOMEM: + WARN(ret, KERN_ERR "ret = %d\n", ret); break; default: return ret; @@ -441,6 +442,7 @@ int vmbus_post_msg(void *buffer, size_t buflen) retries++; msleep(100); } + WARN(ret, KERN_ERR "ret = %d, retries=%d\n", ret, retries); return ret; } -- 1.9.3 Boot dmesg output (there's no line that mentions retries). The framebuffer window also didn't resize itself: [0.00] Initializing cgroup subsys cpuset [0.00] Initializing cgroup subsys cpu [0.00] Initializing cgroup subsys cpuacct [0.00] Linux version 3.17.0-rc1.x86_64-dirty () (gcc version 4.8.3 20140624 (Red Hat 4.8.3-1) (GCC) ) #129 SMP Wed Aug 27 10:19:17 UTC 2014 [0.00] Command line: ro root=UUID=e78f2b16-8836-4e6a-9e5e-fdc6c9d3cfc3 video=hyperv_fb:800x600 LANG=en_US.UTF-8 elevator=noop console=tty0 console=ttyS0,115200n8 initrd=/boot/initramfs-3.17.0-rc1.x86_64-dirty.img BOOT_IMAGE=/boot/vmlinuz-3.17.0-rc1.x86_64-dirty [0.00] e820: BIOS-provided physical RAM map: [0.00] BIOS-e820: [mem 0x-0x0009fbff] usable [0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved [0.00] BIOS-e820: [mem 0x000e-0x000f] reserved [0.00] BIOS-e820: [mem 0x0010-0xf7fe] usable [0.00] BIOS-e820: [mem 0xf7ff-0xf7ffefff] ACPI data [0.00] BIOS-e820: [mem 0xf7fff000-0xf7ff] ACPI NVS [0.00] BIOS-e820: [mem 0x0001-0x000207ff] usable [0.00] NX (Execute Disable) protection: active [0.00] SMBIOS 2.3 present. [0.00] DMI: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006 05/23/2012 [0.00] Hypervisor detected: Microsoft HyperV [0.00] HyperV: features 0xe7f, hints 0x2c [0.00] HyperV: LAPIC Timer Frequency: 0x30d40 [0.00] e820: update [mem 0x-0x0fff] usable ==> reserved [0.00] e820: remove [mem 0x000a-0x000f] usable [0.00] e820: last_pfn = 0x208000 max_arch_pfn = 0x4 [0.00] MTRR default type: unc
[PATCH 00/38] drivers/staging/bcm/Bcmchar.c variable rename patchset
Hi, this is my variable rename patchset for the drivers/staging/bcm/Bcmchar.c file. Note, as always: As I do not have the appropriate hardware, I cannot test these patches, but I compiled them at least. Kind regards, Matthias Beyer Matthias Beyer (38): Staging: bcm: Bcmchar.c: Renamed variable: "Adapter" -> "ad" Staging: bcm: Bcmchar.c: Renamed variable: "threadReq" -> "thread_req" Staging: bcm: Bcmchar.c: Renamed variable: "IoBuffer" -> "io_buff" Staging: bcm: Bcmchar.c: Renamed variable: "uiBit" -> "bit" Staging: bcm: Bcmchar.c: Renamed variable: "ucRead" -> "read" Staging: bcm: Bcmchar.c: Renamed variable: "Status" -> "status" Staging: bcm: Bcmchar.c: Renamed variable: "ucResetValue" -> "reset_val" Staging: bcm: Bcmchar.c: Renamed variable: "pvBuffer" -> "buff" Staging: bcm: Bcmchar.c: Renamed variable: "ulSFId" -> "sf_id" Staging: bcm: Bcmchar.c: Renamed variable: "psFwInfo" -> "fw_info" Staging: bcm: Bcmchar.c: Renamed variable: "NVMAccess" -> "nvm_access" Staging: bcm: Bcmchar.c: Renamed variable: "uiLoopIndex" -> "i" Staging: bcm: Bcmchar.c: Renamed variable: "uiData" -> "data" Staging: bcm: Bcmchar.c: Renamed variable: "pBulkBuffer" -> "bulk_buff" Staging: bcm: Bcmchar.c: Renamed variable: "uiTempVar" -> "tmp" Staging: bcm: Bcmchar.c: Renamed variable: "uiSectorSize" -> "sector_size" Staging: bcm: Bcmchar.c: Renamed variable: "sUserDebugState" -> "user_debug_state" Staging: bcm: Bcmchar.c: Renamed variable: "stNVMReadWrite" -> "nvm_rw" Staging: bcm: Bcmchar.c: Renamed variable: "pReadData" -> "read_data" Staging: bcm: Bcmchar.c: Renamed variable: "sFlash2xRead" -> "flash_2x_read" Staging: bcm: Bcmchar.c: Renamed variable: "pReadBuff" -> "read_buff" Staging: bcm: Bcmchar.c: Renamed variable: "BuffSize" -> "buff_size" Staging: bcm: Bcmchar.c: Renamed variable: "ReadBytes" -> "read_bytes" Staging: bcm: Bcmchar.c: Renamed variable: "WriteBytes" -> "write_bytes" Staging: bcm: Bcmchar.c: Renamed variable: "pWriteBuff" -> "write_buff" Staging: bcm: Bcmchar.c: Renamed variable: "InputAddr" -> "input_addr" Staging: bcm: Bcmchar.c: Renamed variable: "WriteOffset" -> "write_off" Staging: bcm: Bcmchar.c: Renamed variable: "psFlash2xBitMap" -> "flash_2x_bit_map" Staging: bcm: Bcmchar.c: Renamed variable: "eFlash2xSectionVal" -> "flash_2x_section_val" Staging: bcm: Bcmchar.c: Renamed variable: "sCopySectStrut" -> "copy_sect_strut" Staging: bcm: Bcmchar.c: Renamed variable: "SectOfset" -> "sect_offset" Staging: bcm: Bcmchar.c: Renamed variable: "stNVMRead" -> "nvm_read" Staging: bcm: Bcmchar.c: Renamed variable: "ReadOffset" -> "read_offset" Staging: bcm: Bcmchar.c: Renamed variable: "RxCntrlMsgBitMask" -> "rx_cntrl_msg_bit_mask" Staging: bcm: Bcmchar.c: Renamed variable: "DevInfo" -> "dev_info" Staging: bcm: Bcmchar.c: Renamed variable: "stTimeElapsedSinceNetEntry" -> "time_elapsed_since_net_entry" Staging: bcm: Bcmchar.c: Renamed variable: "pTarang" -> "tarang" Staging: bcm: Bcmchar.c: Renamed variable: "NOB" -> "nob" drivers/staging/bcm/Bcmchar.c | 1930 - 1 file changed, 965 insertions(+), 965 deletions(-) -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/38] Staging: bcm: Bcmchar.c: Renamed variable: "Adapter" -> "ad"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 904 +- 1 file changed, 452 insertions(+), 452 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 8b23ec9..78b09cb 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -587,19 +587,19 @@ static int bcm_char_ioctl_gpio_set_request(void __user *argp, } static int bcm_char_ioctl_led_thread_state_change_req(void __user *argp, - struct bcm_mini_adapter *Adapter) + struct bcm_mini_adapter *ad) { struct bcm_user_thread_req threadReq = {0}; struct bcm_ioctl_buffer IoBuffer; - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "User made LED thread InActive"); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((ad->IdleMode == TRUE) || + (ad->bShutStatus == TRUE) || + (ad->bPreparingForLowPowerMode == TRUE)) { - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "GPIO Can't be set/clear in Low power Mode"); return -EACCES; @@ -618,27 +618,27 @@ static int bcm_char_ioctl_led_thread_state_change_req(void __user *argp, /* if LED thread is running(Actively or Inactively) * set it state to make inactive */ - if (Adapter->LEDInfo.led_thread_running) { + if (ad->LEDInfo.led_thread_running) { if (threadReq.ThreadState == LED_THREAD_ACTIVATION_REQ) { - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Activating thread req"); - Adapter->DriverState = LED_THREAD_ACTIVE; + ad->DriverState = LED_THREAD_ACTIVE; } else { - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "DeActivating Thread req."); - Adapter->DriverState = LED_THREAD_INACTIVE; + ad->DriverState = LED_THREAD_INACTIVE; } /* signal thread. */ - wake_up(&Adapter->LEDInfo.notify_led_event); + wake_up(&ad->LEDInfo.notify_led_event); } return STATUS_SUCCESS; } static int bcm_char_ioctl_gpio_status_request(void __user *argp, - struct bcm_mini_adapter *Adapter) + struct bcm_mini_adapter *ad) { struct bcm_gpio_info gpio_info = {0}; struct bcm_ioctl_buffer IoBuffer; @@ -647,9 +647,9 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp, INT Status; int bytes; - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) + if ((ad->IdleMode == TRUE) || + (ad->bShutStatus == TRUE) || + (ad->bPreparingForLowPowerMode == TRUE)) return -EACCES; if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) @@ -665,12 +665,12 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp, uiBit = gpio_info.uiGpioNumber; /* Set the gpio output register */ - bytes = rdmaltWithLock(Adapter, (UINT)GPIO_PIN_STATE_REGISTER, + bytes = rdmaltWithLock(ad, (UINT)GPIO_PIN_STATE_REGISTER, (PUINT)ucRead, sizeof(UINT)); if (bytes < 0) { Status = bytes; - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, + BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "RDM Failed\n"); return Status; } else { @@ -680,7 +680,7 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp, } static int bcm_char_ioctl_gpio_multi_request(void __user *argp, -struct bcm_mini_adapter *Adapter) +struct bcm_mini_adapter *ad) { struct bcm_gpio_multi_info gpio_multi_info[MAX_IDX]; struct bcm_gpio_multi_info *pgpio_multi_info = @@ -693,9 +693,9 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, memset(pgpio_multi_info, 0, MAX_IDX * sizeof(struct bcm_gpio_multi_info)
[PATCH 04/38] Staging: bcm: Bcmchar.c: Renamed variable: "uiBit" -> "bit"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 404a39a..0c2885b 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -642,7 +642,7 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp, { struct bcm_gpio_info gpio_info = {0}; struct bcm_ioctl_buffer io_buff; - ULONG uiBit = 0; + ULONG bit = 0; UCHAR ucRead[4]; INT Status; int bytes; @@ -662,7 +662,7 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp, io_buff.InputLength)) return -EFAULT; - uiBit = gpio_info.uiGpioNumber; + bit = gpio_info.uiGpioNumber; /* Set the gpio output register */ bytes = rdmaltWithLock(ad, (UINT)GPIO_PIN_STATE_REGISTER, -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/38] Staging: bcm: Bcmchar.c: Renamed variable: "threadReq" -> "thread_req"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 78b09cb..ff55056 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -589,7 +589,7 @@ static int bcm_char_ioctl_gpio_set_request(void __user *argp, static int bcm_char_ioctl_led_thread_state_change_req(void __user *argp, struct bcm_mini_adapter *ad) { - struct bcm_user_thread_req threadReq = {0}; + struct bcm_user_thread_req thread_req = {0}; struct bcm_ioctl_buffer IoBuffer; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, @@ -608,10 +608,10 @@ static int bcm_char_ioctl_led_thread_state_change_req(void __user *argp, if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) return -EFAULT; - if (IoBuffer.InputLength > sizeof(threadReq)) + if (IoBuffer.InputLength > sizeof(thread_req)) return -EINVAL; - if (copy_from_user(&threadReq, IoBuffer.InputBuffer, + if (copy_from_user(&thread_req, IoBuffer.InputBuffer, IoBuffer.InputLength)) return -EFAULT; @@ -619,7 +619,7 @@ static int bcm_char_ioctl_led_thread_state_change_req(void __user *argp, * set it state to make inactive */ if (ad->LEDInfo.led_thread_running) { - if (threadReq.ThreadState == LED_THREAD_ACTIVATION_REQ) { + if (thread_req.ThreadState == LED_THREAD_ACTIVATION_REQ) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Activating thread req"); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/38] Staging: bcm: Bcmchar.c: Renamed variable: "IoBuffer" -> "io_buff"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 252 +- 1 file changed, 126 insertions(+), 126 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index ff55056..404a39a 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -590,7 +590,7 @@ static int bcm_char_ioctl_led_thread_state_change_req(void __user *argp, struct bcm_mini_adapter *ad) { struct bcm_user_thread_req thread_req = {0}; - struct bcm_ioctl_buffer IoBuffer; + struct bcm_ioctl_buffer io_buff; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "User made LED thread InActive"); @@ -605,14 +605,14 @@ static int bcm_char_ioctl_led_thread_state_change_req(void __user *argp, return -EACCES; } - if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) + if (copy_from_user(&io_buff, argp, sizeof(struct bcm_ioctl_buffer))) return -EFAULT; - if (IoBuffer.InputLength > sizeof(thread_req)) + if (io_buff.InputLength > sizeof(thread_req)) return -EINVAL; - if (copy_from_user(&thread_req, IoBuffer.InputBuffer, - IoBuffer.InputLength)) + if (copy_from_user(&thread_req, io_buff.InputBuffer, + io_buff.InputLength)) return -EFAULT; /* if LED thread is running(Actively or Inactively) @@ -641,7 +641,7 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp, struct bcm_mini_adapter *ad) { struct bcm_gpio_info gpio_info = {0}; - struct bcm_ioctl_buffer IoBuffer; + struct bcm_ioctl_buffer io_buff; ULONG uiBit = 0; UCHAR ucRead[4]; INT Status; @@ -652,14 +652,14 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp, (ad->bPreparingForLowPowerMode == TRUE)) return -EACCES; - if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) + if (copy_from_user(&io_buff, argp, sizeof(struct bcm_ioctl_buffer))) return -EFAULT; - if (IoBuffer.InputLength > sizeof(gpio_info)) + if (io_buff.InputLength > sizeof(gpio_info)) return -EINVAL; - if (copy_from_user(&gpio_info, IoBuffer.InputBuffer, - IoBuffer.InputLength)) + if (copy_from_user(&gpio_info, io_buff.InputBuffer, + io_buff.InputLength)) return -EFAULT; uiBit = gpio_info.uiGpioNumber; @@ -685,7 +685,7 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, struct bcm_gpio_multi_info gpio_multi_info[MAX_IDX]; struct bcm_gpio_multi_info *pgpio_multi_info = (struct bcm_gpio_multi_info *)gpio_multi_info; - struct bcm_ioctl_buffer IoBuffer; + struct bcm_ioctl_buffer io_buff; UCHAR ucResetValue[4]; INT Status = STATUS_FAILURE; int bytes; @@ -698,16 +698,16 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, (ad->bPreparingForLowPowerMode == TRUE)) return -EINVAL; - if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) + if (copy_from_user(&io_buff, argp, sizeof(struct bcm_ioctl_buffer))) return -EFAULT; - if (IoBuffer.InputLength > sizeof(gpio_multi_info)) + if (io_buff.InputLength > sizeof(gpio_multi_info)) return -EINVAL; - if (IoBuffer.OutputLength > sizeof(gpio_multi_info)) - IoBuffer.OutputLength = sizeof(gpio_multi_info); + if (io_buff.OutputLength > sizeof(gpio_multi_info)) + io_buff.OutputLength = sizeof(gpio_multi_info); - if (copy_from_user(&gpio_multi_info, IoBuffer.InputBuffer, - IoBuffer.InputLength)) + if (copy_from_user(&gpio_multi_info, io_buff.InputBuffer, + io_buff.InputLength)) return -EFAULT; if (IsReqGpioIsLedInNVM(ad, pgpio_multi_info[WIMAX_IDX].uiGPIOMask) @@ -775,8 +775,8 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, pgpio_multi_info[WIMAX_IDX].uiGPIOMask); } - Status = copy_to_user(IoBuffer.OutputBuffer, &gpio_multi_info, - IoBuffer.OutputLength); + Status = copy_to_user(io_buff.OutputBuffer, &gpio_multi_info, + io_buff.OutputLength); if (Status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Failed while copying Content to IOBufer for user space err:%d", @@ -792,7 +792,7 @@ static int bcm_char_ioctl_gpio_mode_request(void __user *argp, struct bcm_gpio_multi_mode gpio_multi_mode[MAX_IDX]; struct bcm_gpio_multi_mode *pgpio_multi_mode =
[PATCH 05/38] Staging: bcm: Bcmchar.c: Renamed variable: "ucRead" -> "read"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 0c2885b..15410cd 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -643,7 +643,7 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp, struct bcm_gpio_info gpio_info = {0}; struct bcm_ioctl_buffer io_buff; ULONG bit = 0; - UCHAR ucRead[4]; + UCHAR read[4]; INT Status; int bytes; @@ -666,7 +666,7 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp, /* Set the gpio output register */ bytes = rdmaltWithLock(ad, (UINT)GPIO_PIN_STATE_REGISTER, - (PUINT)ucRead, sizeof(UINT)); + (PUINT)read, sizeof(UINT)); if (bytes < 0) { Status = bytes; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/38] Staging: bcm: Bcmchar.c: Renamed variable: "Status" -> "status"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 462 +- 1 file changed, 231 insertions(+), 231 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 15410cd..627498e 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -644,7 +644,7 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp, struct bcm_ioctl_buffer io_buff; ULONG bit = 0; UCHAR read[4]; - INT Status; + INT status; int bytes; if ((ad->IdleMode == TRUE) || @@ -669,14 +669,14 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp, (PUINT)read, sizeof(UINT)); if (bytes < 0) { - Status = bytes; + status = bytes; BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "RDM Failed\n"); - return Status; + return status; } else { - Status = STATUS_SUCCESS; + status = STATUS_SUCCESS; } - return Status; + return status; } static int bcm_char_ioctl_gpio_multi_request(void __user *argp, @@ -687,7 +687,7 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, (struct bcm_gpio_multi_info *)gpio_multi_info; struct bcm_ioctl_buffer io_buff; UCHAR ucResetValue[4]; - INT Status = STATUS_FAILURE; + INT status = STATUS_FAILURE; int bytes; memset(pgpio_multi_info, 0, @@ -729,14 +729,14 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, pgpio_multi_info[WIMAX_IDX].uiGPIOValue; if (*(UINT *) ucResetValue) - Status = wrmaltWithLock(ad, + status = wrmaltWithLock(ad, BCM_GPIO_OUTPUT_SET_REG, (PUINT)ucResetValue, sizeof(ULONG)); - if (Status != STATUS_SUCCESS) { + if (status != STATUS_SUCCESS) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "WRM to BCM_GPIO_OUTPUT_SET_REG Failed."); - return Status; + return status; } /* Clear to 0's in GPIO OUTPUT REGISTER */ @@ -746,14 +746,14 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, (~(pgpio_multi_info[WIMAX_IDX].uiGPIOValue))); if (*(UINT *) ucResetValue) - Status = wrmaltWithLock(ad, + status = wrmaltWithLock(ad, BCM_GPIO_OUTPUT_CLR_REG, (PUINT)ucResetValue, sizeof(ULONG)); - if (Status != STATUS_SUCCESS) { + if (status != STATUS_SUCCESS) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "WRM to BCM_GPIO_OUTPUT_CLR_REG Failed."); - return Status; + return status; } } @@ -762,12 +762,12 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, (PUINT)ucResetValue, sizeof(UINT)); if (bytes < 0) { - Status = bytes; + status = bytes; BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "RDM to GPIO_PIN_STATE_REGISTER Failed."); - return Status; + return status; } else { - Status = STATUS_SUCCESS; + status = STATUS_SUCCESS; } pgpio_multi_info[WIMAX_IDX].uiGPIOValue = @@ -775,15 +775,15 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, pgpio_multi_info[WIMAX_IDX].uiGPIOMask); } - Status = copy_to_user(io_buff.OutputBuffer, &gpio_multi_info, + status = copy_to_user(io_buff.OutputBuffer, &gpio_multi_info, io_buff.OutputLength); - if (Status) { + if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Failed while copying Content to IOBufer for user space err:%d", - Status); + status); return -EFAULT; } - return Status; + return status; } static int bcm_char_ioctl_gpio_mode_request(void __user *argp, @@ -794,7 +794,7 @@ static int bcm_char_ioctl_gpio_mode_request(void __user *argp, (struct bcm_gpio_multi_mode *)gpio_multi_mode; struct bcm_ioctl_buffer io_buff; UCHAR ucResetValue[4]; - INT Status; + INT status; int bytes; if ((ad->IdleMode == TRUE)
[PATCH 08/38] Staging: bcm: Bcmchar.c: Renamed variable: "pvBuffer" -> "buff"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 32ae6ee..ffb842f 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -883,7 +883,7 @@ static int bcm_char_ioctl_misc_request(void __user *argp, struct bcm_mini_adapter *ad) { struct bcm_ioctl_buffer io_buff; - PVOID pvBuffer = NULL; + PVOID buff = NULL; INT status; /* Copy Ioctl Buffer structure */ @@ -896,10 +896,10 @@ static int bcm_char_ioctl_misc_request(void __user *argp, if (io_buff.InputLength > MAX_CNTL_PKT_SIZE) return -EINVAL; - pvBuffer = memdup_user(io_buff.InputBuffer, + buff = memdup_user(io_buff.InputBuffer, io_buff.InputLength); - if (IS_ERR(pvBuffer)) - return PTR_ERR(pvBuffer); + if (IS_ERR(buff)) + return PTR_ERR(buff); down(&ad->LowPowerModeSync); status = wait_event_interruptible_timeout( @@ -916,11 +916,11 @@ static int bcm_char_ioctl_misc_request(void __user *argp, status = STATUS_FAILURE; goto cntrlEnd; } - status = CopyBufferToControlPacket(ad, (PVOID)pvBuffer); + status = CopyBufferToControlPacket(ad, (PVOID)buff); cntrlEnd: up(&ad->LowPowerModeSync); - kfree(pvBuffer); + kfree(buff); return status; } @@ -1315,7 +1315,7 @@ static int bcm_char_ioctl_bulk_wrm(void __user *argp, struct bcm_ioctl_buffer io_buff; UINT uiTempVar = 0; INT status = STATUS_FAILURE; - PCHAR pvBuffer = NULL; + PCHAR buff = NULL; if ((ad->IdleMode == TRUE) || (ad->bShutStatus == TRUE) || @@ -1333,19 +1333,19 @@ static int bcm_char_ioctl_bulk_wrm(void __user *argp, if (io_buff.InputLength < sizeof(ULONG) * 2) return -EINVAL; - pvBuffer = memdup_user(io_buff.InputBuffer, + buff = memdup_user(io_buff.InputBuffer, io_buff.InputLength); - if (IS_ERR(pvBuffer)) - return PTR_ERR(pvBuffer); + if (IS_ERR(buff)) + return PTR_ERR(buff); - pBulkBuffer = (struct bcm_bulk_wrm_buffer *)pvBuffer; + pBulkBuffer = (struct bcm_bulk_wrm_buffer *)buff; if (((ULONG)pBulkBuffer->Register & 0x0F00) != 0x0F00 || ((ULONG)pBulkBuffer->Register & 0x3)) { BCM_DEBUG_PRINT (ad, DBG_TYPE_PRINTK, 0, 0, "WRM Done On invalid Address : %x Access Denied.\n", (int)pBulkBuffer->Register); - kfree(pvBuffer); + kfree(buff); return -EINVAL; } @@ -1357,7 +1357,7 @@ static int bcm_char_ioctl_bulk_wrm(void __user *argp, (uiTempVar == EEPROM_REJECT_REG_4)) && (cmd == IOCTL_BCM_REGISTER_WRITE)) { - kfree(pvBuffer); + kfree(buff); BCM_DEBUG_PRINT (ad, DBG_TYPE_PRINTK, 0, 0, "EEPROM Access Denied, not in VSG Mode\n"); return -EFAULT; @@ -1375,7 +1375,7 @@ static int bcm_char_ioctl_bulk_wrm(void __user *argp, if (status != STATUS_SUCCESS) BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "WRM Failed\n"); - kfree(pvBuffer); + kfree(buff); return status; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/38] Staging: bcm: Bcmchar.c: Renamed variable: "ulSFId" -> "sf_id"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index ffb842f..a831a27 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1248,7 +1248,7 @@ static int bcm_char_ioctl_get_dsx_indication(void __user *argp, struct bcm_mini_adapter *ad) { struct bcm_ioctl_buffer io_buff; - ULONG ulSFId = 0; + ULONG sf_id = 0; if (copy_from_user(&io_buff, argp, sizeof(struct bcm_ioctl_buffer))) return -EFAULT; @@ -1261,12 +1261,12 @@ static int bcm_char_ioctl_get_dsx_indication(void __user *argp, return -EINVAL; } - if (copy_from_user(&ulSFId, io_buff.InputBuffer, sizeof(ulSFId))) + if (copy_from_user(&sf_id, io_buff.InputBuffer, sizeof(sf_id))) return -EFAULT; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, - "Get DSX Data SF ID is =%lx\n", ulSFId); - get_dsx_sf_data_to_application(ad, ulSFId, io_buff.OutputBuffer); + "Get DSX Data SF ID is =%lx\n", sf_id); + get_dsx_sf_data_to_application(ad, sf_id, io_buff.OutputBuffer); return STATUS_SUCCESS; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/38] Staging: bcm: Bcmchar.c: Renamed variable: "pReadData" -> "read_data"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index a588a5f..58bfa46 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1492,7 +1492,7 @@ static int bcm_char_ioctl_nvm_rw(void __user *argp, struct bcm_nvm_readwrite nvm_rw; struct timeval tv0, tv1; struct bcm_ioctl_buffer io_buff; - PUCHAR pReadData = NULL; + PUCHAR read_data = NULL; INT status = STATUS_FAILURE; memset(&tv0, 0, sizeof(struct timeval)); @@ -1535,14 +1535,14 @@ static int bcm_char_ioctl_nvm_rw(void __user *argp, ad->uiNVMDSDSize - nvm_rw.uiNumBytes) return STATUS_FAILURE; - pReadData = memdup_user(nvm_rw.pBuffer, + read_data = memdup_user(nvm_rw.pBuffer, nvm_rw.uiNumBytes); - if (IS_ERR(pReadData)) - return PTR_ERR(pReadData); + if (IS_ERR(read_data)) + return PTR_ERR(read_data); do_gettimeofday(&tv0); if (IOCTL_BCM_NVM_READ == cmd) { - int ret = bcm_handle_nvm_read_cmd(ad, pReadData, + int ret = bcm_handle_nvm_read_cmd(ad, read_data, &nvm_rw); if (ret != STATUS_SUCCESS) return ret; @@ -1557,20 +1557,20 @@ static int bcm_char_ioctl_nvm_rw(void __user *argp, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); up(&ad->NVMRdmWrmLock); - kfree(pReadData); + kfree(read_data); return -EACCES; } ad->bHeaderChangeAllowed = TRUE; if (IsFlash2x(ad)) { int ret = handle_flash2x_adapter(ad, - pReadData, + read_data, &nvm_rw); if (ret != STATUS_SUCCESS) return ret; } - status = BeceemNVMWrite(ad, (PUINT)pReadData, + status = BeceemNVMWrite(ad, (PUINT)read_data, nvm_rw.uiOffset, nvm_rw.uiNumBytes, nvm_rw.bVerify); if (IsFlash2x(ad)) @@ -1581,7 +1581,7 @@ static int bcm_char_ioctl_nvm_rw(void __user *argp, up(&ad->NVMRdmWrmLock); if (status != STATUS_SUCCESS) { - kfree(pReadData); + kfree(read_data); return status; } } @@ -1592,7 +1592,7 @@ static int bcm_char_ioctl_nvm_rw(void __user *argp, (tv1.tv_sec - tv0.tv_sec)*1000 + (tv1.tv_usec - tv0.tv_usec)/1000); - kfree(pReadData); + kfree(read_data); return STATUS_SUCCESS; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/38] Staging: bcm: Bcmchar.c: Renamed variable: "ucResetValue" -> "reset_val"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 627498e..32ae6ee 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -686,7 +686,7 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, struct bcm_gpio_multi_info *pgpio_multi_info = (struct bcm_gpio_multi_info *)gpio_multi_info; struct bcm_ioctl_buffer io_buff; - UCHAR ucResetValue[4]; + UCHAR reset_val[4]; INT status = STATUS_FAILURE; int bytes; @@ -724,14 +724,14 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, if ((pgpio_multi_info[WIMAX_IDX].uiGPIOMask) & (pgpio_multi_info[WIMAX_IDX].uiGPIOCommand)) { /* Set 1's in GPIO OUTPUT REGISTER */ - *(UINT *)ucResetValue = pgpio_multi_info[WIMAX_IDX].uiGPIOMask & + *(UINT *)reset_val = pgpio_multi_info[WIMAX_IDX].uiGPIOMask & pgpio_multi_info[WIMAX_IDX].uiGPIOCommand & pgpio_multi_info[WIMAX_IDX].uiGPIOValue; - if (*(UINT *) ucResetValue) + if (*(UINT *) reset_val) status = wrmaltWithLock(ad, BCM_GPIO_OUTPUT_SET_REG, - (PUINT)ucResetValue, sizeof(ULONG)); + (PUINT)reset_val, sizeof(ULONG)); if (status != STATUS_SUCCESS) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, @@ -740,14 +740,14 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, } /* Clear to 0's in GPIO OUTPUT REGISTER */ - *(UINT *)ucResetValue = + *(UINT *)reset_val = (pgpio_multi_info[WIMAX_IDX].uiGPIOMask & pgpio_multi_info[WIMAX_IDX].uiGPIOCommand & (~(pgpio_multi_info[WIMAX_IDX].uiGPIOValue))); - if (*(UINT *) ucResetValue) + if (*(UINT *) reset_val) status = wrmaltWithLock(ad, - BCM_GPIO_OUTPUT_CLR_REG, (PUINT)ucResetValue, + BCM_GPIO_OUTPUT_CLR_REG, (PUINT)reset_val, sizeof(ULONG)); if (status != STATUS_SUCCESS) { @@ -759,7 +759,7 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, if (pgpio_multi_info[WIMAX_IDX].uiGPIOMask) { bytes = rdmaltWithLock(ad, (UINT)GPIO_PIN_STATE_REGISTER, - (PUINT)ucResetValue, sizeof(UINT)); + (PUINT)reset_val, sizeof(UINT)); if (bytes < 0) { status = bytes; @@ -771,7 +771,7 @@ static int bcm_char_ioctl_gpio_multi_request(void __user *argp, } pgpio_multi_info[WIMAX_IDX].uiGPIOValue = - (*(UINT *)ucResetValue & + (*(UINT *)reset_val & pgpio_multi_info[WIMAX_IDX].uiGPIOMask); } @@ -793,7 +793,7 @@ static int bcm_char_ioctl_gpio_mode_request(void __user *argp, struct bcm_gpio_multi_mode *pgpio_multi_mode = (struct bcm_gpio_multi_mode *)gpio_multi_mode; struct bcm_ioctl_buffer io_buff; - UCHAR ucResetValue[4]; + UCHAR reset_val[4]; INT status; int bytes; @@ -815,7 +815,7 @@ static int bcm_char_ioctl_gpio_mode_request(void __user *argp, return -EFAULT; bytes = rdmaltWithLock(ad, (UINT)GPIO_MODE_REGISTER, - (PUINT)ucResetValue, sizeof(UINT)); + (PUINT)reset_val, sizeof(UINT)); if (bytes < 0) { status = bytes; @@ -838,22 +838,22 @@ static int bcm_char_ioctl_gpio_mode_request(void __user *argp, if (pgpio_multi_mode[WIMAX_IDX].uiGPIOMask) { /* write all OUT's (1's) */ - *(UINT *) ucResetValue |= + *(UINT *) reset_val |= (pgpio_multi_mode[WIMAX_IDX].uiGPIOMode & pgpio_multi_mode[WIMAX_IDX].uiGPIOMask); /* write all IN's (0's) */ - *(UINT *) ucResetValue &= + *(UINT *) reset_val &= ~((~pgpio_multi_mode[WIMAX_IDX].uiGPIOMode) & pgpio_multi_mode[WIMAX_IDX].uiGPIOMask); /* Currently implemented return the modes of all GPIO's * else needs to bit AND with mask */ - pgpio_multi_mode[WIMAX_IDX].uiGPIOMode = *(UINT *)ucResetValue; + pgpio_multi_mode[WIMAX_IDX].uiGPIOMode = *(UINT *)reset_val; st
[PATCH 23/38] Staging: bcm: Bcmchar.c: Renamed variable: "ReadBytes" -> "read_bytes"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 7e0aa5f..be14490 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1604,7 +1604,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, PUCHAR read_buff = NULL; UINT NOB = 0; UINT buff_size = 0; - UINT ReadBytes = 0; + UINT read_bytes = 0; UINT ReadOffset = 0; INT status = STATUS_FAILURE; void __user *OutPutBuff; @@ -1675,13 +1675,13 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, while (NOB) { if (NOB > ad->uiSectorSize) - ReadBytes = ad->uiSectorSize; + read_bytes = ad->uiSectorSize; else - ReadBytes = NOB; + read_bytes = NOB; /* Reading the data from Flash 2.x */ status = BcmFlash2xBulkRead(ad, (PUINT)read_buff, - flash_2x_read.Section, ReadOffset, ReadBytes); + flash_2x_read.Section, ReadOffset, read_bytes); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, @@ -1691,9 +1691,9 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, } BCM_DEBUG_PRINT_BUFFER(ad, DBG_TYPE_OTHERS, OSAL_DBG, - DBG_LVL_ALL, read_buff, ReadBytes); + DBG_LVL_ALL, read_buff, read_bytes); - status = copy_to_user(OutPutBuff, read_buff, ReadBytes); + status = copy_to_user(OutPutBuff, read_buff, read_bytes); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, @@ -1702,10 +1702,10 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, kfree(read_buff); return -EFAULT; } - NOB = NOB - ReadBytes; + NOB = NOB - read_bytes; if (NOB) { - ReadOffset = ReadOffset + ReadBytes; - OutPutBuff = OutPutBuff + ReadBytes; + ReadOffset = ReadOffset + read_bytes; + OutPutBuff = OutPutBuff + read_bytes; } } @@ -2164,7 +2164,7 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, unsigned int NOB; INT buff_size; INT ReadOffset = 0; - UINT ReadBytes = 0; + UINT read_bytes = 0; PUCHAR read_buff; void __user *OutPutBuff; INT status = STATUS_FAILURE; @@ -2220,13 +2220,13 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, while (NOB) { if (NOB > DEFAULT_BUFF_SIZE) - ReadBytes = DEFAULT_BUFF_SIZE; + read_bytes = DEFAULT_BUFF_SIZE; else - ReadBytes = NOB; + read_bytes = NOB; /* Reading the data from Flash 2.x */ status = BeceemNVMRead(ad, (PUINT)read_buff, - ReadOffset, ReadBytes); + ReadOffset, read_bytes); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Flash 2x read err with status :%d", @@ -2235,9 +2235,9 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, } BCM_DEBUG_PRINT_BUFFER(ad, DBG_TYPE_OTHERS, OSAL_DBG, - DBG_LVL_ALL, read_buff, ReadBytes); + DBG_LVL_ALL, read_buff, read_bytes); - status = copy_to_user(OutPutBuff, read_buff, ReadBytes); + status = copy_to_user(OutPutBuff, read_buff, read_bytes); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Copy to use failed with status :%d", @@ -2246,10 +2246,10 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, kfree(read_buff); return -EFAULT; } - NOB = NOB - ReadBytes; + NOB = NOB - read_bytes; if (NOB) { - ReadOffset = ReadOffset + ReadBytes; - OutPutBuff = OutPutBuff + ReadBytes; + ReadOffset = ReadOffset + read_bytes; + OutPutBuff = OutPutBuff + read_bytes; } } ad->bFlashRawRead = false; -- 2.1.0 ___ devel mailing li
[PATCH 22/38] Staging: bcm: Bcmchar.c: Renamed variable: "BuffSize" -> "buff_size"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index be1f4ec..7e0aa5f 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1603,7 +1603,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, struct bcm_ioctl_buffer io_buff; PUCHAR read_buff = NULL; UINT NOB = 0; - UINT BuffSize = 0; + UINT buff_size = 0; UINT ReadBytes = 0; UINT ReadOffset = 0; INT status = STATUS_FAILURE; @@ -1646,13 +1646,13 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, NOB = flash_2x_read.numOfBytes; if (NOB > ad->uiSectorSize) - BuffSize = ad->uiSectorSize; + buff_size = ad->uiSectorSize; else - BuffSize = NOB; + buff_size = NOB; ReadOffset = flash_2x_read.offset; OutPutBuff = io_buff.OutputBuffer; - read_buff = kzalloc(BuffSize , GFP_KERNEL); + read_buff = kzalloc(buff_size , GFP_KERNEL); if (read_buff == NULL) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, @@ -1722,7 +1722,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, PUCHAR pWriteBuff; void __user *InputAddr; UINT NOB = 0; - UINT BuffSize = 0; + UINT buff_size = 0; UINT WriteOffset = 0; UINT WriteBytes = 0; INT status = STATUS_FAILURE; @@ -1773,11 +1773,11 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, NOB = sFlash2xWrite.numOfBytes; if (NOB > ad->uiSectorSize) - BuffSize = ad->uiSectorSize; + buff_size = ad->uiSectorSize; else - BuffSize = NOB; + buff_size = NOB; - pWriteBuff = kmalloc(BuffSize, GFP_KERNEL); + pWriteBuff = kmalloc(buff_size, GFP_KERNEL); if (pWriteBuff == NULL) return -ENOMEM; @@ -2162,7 +2162,7 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, struct bcm_nvm_readwrite stNVMRead; struct bcm_ioctl_buffer io_buff; unsigned int NOB; - INT BuffSize; + INT buff_size; INT ReadOffset = 0; UINT ReadBytes = 0; PUCHAR read_buff; @@ -2190,14 +2190,14 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, /* In Raw-Read max Buff size : 64MB */ if (NOB > DEFAULT_BUFF_SIZE) - BuffSize = DEFAULT_BUFF_SIZE; + buff_size = DEFAULT_BUFF_SIZE; else - BuffSize = NOB; + buff_size = NOB; ReadOffset = stNVMRead.uiOffset; OutPutBuff = stNVMRead.pBuffer; - read_buff = kzalloc(BuffSize , GFP_KERNEL); + read_buff = kzalloc(buff_size , GFP_KERNEL); if (read_buff == NULL) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Memory allocation failed for Flash 2.x Read Structure"); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 26/38] Staging: bcm: Bcmchar.c: Renamed variable: "InputAddr" -> "input_addr"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index eda1ba6..0698ca5 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1720,7 +1720,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, struct bcm_flash2x_readwrite sFlash2xWrite = {0}; struct bcm_ioctl_buffer io_buff; PUCHAR write_buff; - void __user *InputAddr; + void __user *input_addr; UINT NOB = 0; UINT buff_size = 0; UINT WriteOffset = 0; @@ -1768,7 +1768,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, if (validateFlash2xReadWrite(ad, &sFlash2xWrite) == false) return STATUS_FAILURE; - InputAddr = sFlash2xWrite.pDataBuff; + input_addr = sFlash2xWrite.pDataBuff; WriteOffset = sFlash2xWrite.offset; NOB = sFlash2xWrite.numOfBytes; @@ -1807,7 +1807,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, BcmFlash2xCorruptSig(ad, sFlash2xWrite.Section); do { - status = copy_from_user(write_buff, InputAddr, write_bytes); + status = copy_from_user(write_buff, input_addr, write_bytes); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Copy to user failed with status :%d", status); @@ -1834,7 +1834,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, NOB = NOB - write_bytes; if (NOB) { WriteOffset = WriteOffset + write_bytes; - InputAddr = InputAddr + write_bytes; + input_addr = input_addr + write_bytes; if (NOB > ad->uiSectorSize) write_bytes = ad->uiSectorSize; else -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 25/38] Staging: bcm: Bcmchar.c: Renamed variable: "pWriteBuff" -> "write_buff"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 964ab91..eda1ba6 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1719,7 +1719,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, { struct bcm_flash2x_readwrite sFlash2xWrite = {0}; struct bcm_ioctl_buffer io_buff; - PUCHAR pWriteBuff; + PUCHAR write_buff; void __user *InputAddr; UINT NOB = 0; UINT buff_size = 0; @@ -1777,9 +1777,9 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, else buff_size = NOB; - pWriteBuff = kmalloc(buff_size, GFP_KERNEL); + write_buff = kmalloc(buff_size, GFP_KERNEL); - if (pWriteBuff == NULL) + if (write_buff == NULL) return -ENOMEM; /* extracting the remainder of the given offset. */ @@ -1801,25 +1801,25 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); up(&ad->NVMRdmWrmLock); - kfree(pWriteBuff); + kfree(write_buff); return -EACCES; } BcmFlash2xCorruptSig(ad, sFlash2xWrite.Section); do { - status = copy_from_user(pWriteBuff, InputAddr, write_bytes); + status = copy_from_user(write_buff, InputAddr, write_bytes); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Copy to user failed with status :%d", status); up(&ad->NVMRdmWrmLock); - kfree(pWriteBuff); + kfree(write_buff); return -EFAULT; } BCM_DEBUG_PRINT_BUFFER(ad, DBG_TYPE_OTHERS, - OSAL_DBG, DBG_LVL_ALL, pWriteBuff, write_bytes); + OSAL_DBG, DBG_LVL_ALL, write_buff, write_bytes); /* Writing the data from Flash 2.x */ - status = BcmFlash2xBulkWrite(ad, (PUINT)pWriteBuff, + status = BcmFlash2xBulkWrite(ad, (PUINT)write_buff, sFlash2xWrite.Section, WriteOffset, write_bytes, @@ -1844,7 +1844,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, BcmFlash2xWriteSig(ad, sFlash2xWrite.Section); up(&ad->NVMRdmWrmLock); - kfree(pWriteBuff); + kfree(write_buff); return status; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 24/38] Staging: bcm: Bcmchar.c: Renamed variable: "WriteBytes" -> "write_bytes"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index be14490..964ab91 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1724,7 +1724,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, UINT NOB = 0; UINT buff_size = 0; UINT WriteOffset = 0; - UINT WriteBytes = 0; + UINT write_bytes = 0; INT status = STATUS_FAILURE; if (IsFlash2x(ad) != TRUE) { @@ -1783,14 +1783,14 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, return -ENOMEM; /* extracting the remainder of the given offset. */ - WriteBytes = ad->uiSectorSize; + write_bytes = ad->uiSectorSize; if (WriteOffset % ad->uiSectorSize) { - WriteBytes = ad->uiSectorSize - + write_bytes = ad->uiSectorSize - (WriteOffset % ad->uiSectorSize); } - if (NOB < WriteBytes) - WriteBytes = NOB; + if (NOB < write_bytes) + write_bytes = NOB; down(&ad->NVMRdmWrmLock); @@ -1807,7 +1807,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, BcmFlash2xCorruptSig(ad, sFlash2xWrite.Section); do { - status = copy_from_user(pWriteBuff, InputAddr, WriteBytes); + status = copy_from_user(pWriteBuff, InputAddr, write_bytes); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Copy to user failed with status :%d", status); @@ -1816,13 +1816,13 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, return -EFAULT; } BCM_DEBUG_PRINT_BUFFER(ad, DBG_TYPE_OTHERS, - OSAL_DBG, DBG_LVL_ALL, pWriteBuff, WriteBytes); + OSAL_DBG, DBG_LVL_ALL, pWriteBuff, write_bytes); /* Writing the data from Flash 2.x */ status = BcmFlash2xBulkWrite(ad, (PUINT)pWriteBuff, sFlash2xWrite.Section, WriteOffset, -WriteBytes, +write_bytes, sFlash2xWrite.bVerify); if (status) { @@ -1831,14 +1831,14 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, break; } - NOB = NOB - WriteBytes; + NOB = NOB - write_bytes; if (NOB) { - WriteOffset = WriteOffset + WriteBytes; - InputAddr = InputAddr + WriteBytes; + WriteOffset = WriteOffset + write_bytes; + InputAddr = InputAddr + write_bytes; if (NOB > ad->uiSectorSize) - WriteBytes = ad->uiSectorSize; + write_bytes = ad->uiSectorSize; else - WriteBytes = NOB; + write_bytes = NOB; } } while (NOB > 0); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/38] Staging: bcm: Bcmchar.c: Renamed variable: "sFlash2xRead" -> "flash_2x_read"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 58bfa46..28188c7 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1599,7 +1599,7 @@ static int bcm_char_ioctl_nvm_rw(void __user *argp, static int bcm_char_ioctl_flash2x_section_read(void __user *argp, struct bcm_mini_adapter *ad) { - struct bcm_flash2x_readwrite sFlash2xRead = {0}; + struct bcm_flash2x_readwrite flash_2x_read = {0}; struct bcm_ioctl_buffer io_buff; PUCHAR pReadBuff = NULL; UINT NOB = 0; @@ -1621,36 +1621,36 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, return -EFAULT; /* Reading FLASH 2.x READ structure */ - if (copy_from_user(&sFlash2xRead, io_buff.InputBuffer, + if (copy_from_user(&flash_2x_read, io_buff.InputBuffer, sizeof(struct bcm_flash2x_readwrite))) return -EFAULT; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, - "\nsFlash2xRead.Section :%x", - sFlash2xRead.Section); + "\nflash_2x_read.Section :%x", + flash_2x_read.Section); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, - "\nsFlash2xRead.offset :%x", - sFlash2xRead.offset); + "\nflash_2x_read.offset :%x", + flash_2x_read.offset); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, - "\nsFlash2xRead.numOfBytes :%x", - sFlash2xRead.numOfBytes); + "\nflash_2x_read.numOfBytes :%x", + flash_2x_read.numOfBytes); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, - "\nsFlash2xRead.bVerify :%x\n", - sFlash2xRead.bVerify); + "\nflash_2x_read.bVerify :%x\n", + flash_2x_read.bVerify); /* This was internal to driver for raw read. * now it has ben exposed to user space app. */ - if (validateFlash2xReadWrite(ad, &sFlash2xRead) == false) + if (validateFlash2xReadWrite(ad, &flash_2x_read) == false) return STATUS_FAILURE; - NOB = sFlash2xRead.numOfBytes; + NOB = flash_2x_read.numOfBytes; if (NOB > ad->uiSectorSize) BuffSize = ad->uiSectorSize; else BuffSize = NOB; - ReadOffset = sFlash2xRead.offset; + ReadOffset = flash_2x_read.offset; OutPutBuff = io_buff.OutputBuffer; pReadBuff = kzalloc(BuffSize , GFP_KERNEL); @@ -1681,7 +1681,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, /* Reading the data from Flash 2.x */ status = BcmFlash2xBulkRead(ad, (PUINT)pReadBuff, - sFlash2xRead.Section, ReadOffset, ReadBytes); + flash_2x_read.Section, ReadOffset, ReadBytes); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 27/38] Staging: bcm: Bcmchar.c: Renamed variable: "WriteOffset" -> "write_off"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 0698ca5..5730b26 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1723,7 +1723,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, void __user *input_addr; UINT NOB = 0; UINT buff_size = 0; - UINT WriteOffset = 0; + UINT write_off = 0; UINT write_bytes = 0; INT status = STATUS_FAILURE; @@ -1769,7 +1769,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, return STATUS_FAILURE; input_addr = sFlash2xWrite.pDataBuff; - WriteOffset = sFlash2xWrite.offset; + write_off = sFlash2xWrite.offset; NOB = sFlash2xWrite.numOfBytes; if (NOB > ad->uiSectorSize) @@ -1784,9 +1784,9 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, /* extracting the remainder of the given offset. */ write_bytes = ad->uiSectorSize; - if (WriteOffset % ad->uiSectorSize) { + if (write_off % ad->uiSectorSize) { write_bytes = ad->uiSectorSize - - (WriteOffset % ad->uiSectorSize); + (write_off % ad->uiSectorSize); } if (NOB < write_bytes) @@ -1821,7 +1821,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, /* Writing the data from Flash 2.x */ status = BcmFlash2xBulkWrite(ad, (PUINT)write_buff, sFlash2xWrite.Section, -WriteOffset, +write_off, write_bytes, sFlash2xWrite.bVerify); @@ -1833,7 +1833,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, NOB = NOB - write_bytes; if (NOB) { - WriteOffset = WriteOffset + write_bytes; + write_off = write_off + write_bytes; input_addr = input_addr + write_bytes; if (NOB > ad->uiSectorSize) write_bytes = ad->uiSectorSize; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 28/38] Staging: bcm: Bcmchar.c: Renamed variable: "psFlash2xBitMap" -> "flash_2x_bit_map"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 5730b26..f47168b 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1851,7 +1851,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, static int bcm_char_ioctl_flash2x_section_bitmap(void __user *argp, struct bcm_mini_adapter *ad) { - struct bcm_flash2x_bitmap *psFlash2xBitMap; + struct bcm_flash2x_bitmap *flash_2x_bit_map; struct bcm_ioctl_buffer io_buff; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, @@ -1863,10 +1863,10 @@ BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, if (io_buff.OutputLength != sizeof(struct bcm_flash2x_bitmap)) return -EINVAL; - psFlash2xBitMap = kzalloc(sizeof(struct bcm_flash2x_bitmap), + flash_2x_bit_map = kzalloc(sizeof(struct bcm_flash2x_bitmap), GFP_KERNEL); - if (psFlash2xBitMap == NULL) { + if (flash_2x_bit_map == NULL) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Memory is not available"); return -ENOMEM; @@ -1882,19 +1882,19 @@ BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); up(&ad->NVMRdmWrmLock); - kfree(psFlash2xBitMap); + kfree(flash_2x_bit_map); return -EACCES; } - BcmGetFlash2xSectionalBitMap(ad, psFlash2xBitMap); + BcmGetFlash2xSectionalBitMap(ad, flash_2x_bit_map); up(&ad->NVMRdmWrmLock); - if (copy_to_user(io_buff.OutputBuffer, psFlash2xBitMap, + if (copy_to_user(io_buff.OutputBuffer, flash_2x_bit_map, sizeof(struct bcm_flash2x_bitmap))) { - kfree(psFlash2xBitMap); + kfree(flash_2x_bit_map); return -EFAULT; } - kfree(psFlash2xBitMap); + kfree(flash_2x_bit_map); return STATUS_FAILURE; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/38] Staging: bcm: Bcmchar.c: Renamed variable: "pReadBuff" -> "read_buff"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 28188c7..be1f4ec 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1601,7 +1601,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, { struct bcm_flash2x_readwrite flash_2x_read = {0}; struct bcm_ioctl_buffer io_buff; - PUCHAR pReadBuff = NULL; + PUCHAR read_buff = NULL; UINT NOB = 0; UINT BuffSize = 0; UINT ReadBytes = 0; @@ -1652,9 +1652,9 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, ReadOffset = flash_2x_read.offset; OutPutBuff = io_buff.OutputBuffer; - pReadBuff = kzalloc(BuffSize , GFP_KERNEL); + read_buff = kzalloc(BuffSize , GFP_KERNEL); - if (pReadBuff == NULL) { + if (read_buff == NULL) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Memory allocation failed for Flash 2.x Read Structure"); return -ENOMEM; @@ -1669,7 +1669,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); up(&ad->NVMRdmWrmLock); - kfree(pReadBuff); + kfree(read_buff); return -EACCES; } @@ -1680,7 +1680,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, ReadBytes = NOB; /* Reading the data from Flash 2.x */ - status = BcmFlash2xBulkRead(ad, (PUINT)pReadBuff, + status = BcmFlash2xBulkRead(ad, (PUINT)read_buff, flash_2x_read.Section, ReadOffset, ReadBytes); if (status) { BCM_DEBUG_PRINT(ad, @@ -1691,15 +1691,15 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, } BCM_DEBUG_PRINT_BUFFER(ad, DBG_TYPE_OTHERS, OSAL_DBG, - DBG_LVL_ALL, pReadBuff, ReadBytes); + DBG_LVL_ALL, read_buff, ReadBytes); - status = copy_to_user(OutPutBuff, pReadBuff, ReadBytes); + status = copy_to_user(OutPutBuff, read_buff, ReadBytes); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Copy to use failed with status :%d", status); up(&ad->NVMRdmWrmLock); - kfree(pReadBuff); + kfree(read_buff); return -EFAULT; } NOB = NOB - ReadBytes; @@ -1710,7 +1710,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, } up(&ad->NVMRdmWrmLock); - kfree(pReadBuff); + kfree(read_buff); return status; } @@ -2165,7 +2165,7 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, INT BuffSize; INT ReadOffset = 0; UINT ReadBytes = 0; - PUCHAR pReadBuff; + PUCHAR read_buff; void __user *OutPutBuff; INT status = STATUS_FAILURE; @@ -2197,8 +2197,8 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, ReadOffset = stNVMRead.uiOffset; OutPutBuff = stNVMRead.pBuffer; - pReadBuff = kzalloc(BuffSize , GFP_KERNEL); - if (pReadBuff == NULL) { + read_buff = kzalloc(BuffSize , GFP_KERNEL); + if (read_buff == NULL) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Memory allocation failed for Flash 2.x Read Structure"); return -ENOMEM; @@ -2211,7 +2211,7 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); - kfree(pReadBuff); + kfree(read_buff); up(&ad->NVMRdmWrmLock); return -EACCES; } @@ -2225,7 +2225,7 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, ReadBytes = NOB; /* Reading the data from Flash 2.x */ - status = BeceemNVMRead(ad, (PUINT)pReadBuff, + status = BeceemNVMRead(ad, (PUINT)read_buff, ReadOffset, ReadBytes); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, @@ -2235,15 +2235,15 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, } BCM_DEBUG_PRINT_BUFFER(ad, DBG_TYPE_OTHERS, OSAL_DBG, - DBG_LVL_ALL, pReadBuff, ReadByt
[PATCH 2/3] Staging: bcm: Bcmnet.c: Renamed variable: "psIntfAdapter" -> "intf_ad"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c index 4cbe5b2..800c1ef 100644 --- a/drivers/staging/bcm/Bcmnet.c +++ b/drivers/staging/bcm/Bcmnet.c @@ -143,8 +143,8 @@ static void bcm_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { struct bcm_mini_adapter *ad = GET_BCM_ADAPTER(dev); - struct bcm_interface_adapter *psIntfAdapter = ad->pvInterfaceAdapter; - struct usb_device *udev = interface_to_usbdev(psIntfAdapter->interface); + struct bcm_interface_adapter *intf_ad = ad->pvInterfaceAdapter; + struct usb_device *udev = interface_to_usbdev(intf_ad->interface); strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); strlcpy(info->version, DRV_VERSION, sizeof(info->version)); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/3] Staging: bcm: Bcmnet.c: Renamed variable: "IntfAdapter" -> "intf_ad"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmnet.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c index 800c1ef..e577676 100644 --- a/drivers/staging/bcm/Bcmnet.c +++ b/drivers/staging/bcm/Bcmnet.c @@ -187,9 +187,9 @@ static const struct ethtool_ops bcm_ethtool_ops = { int register_networkdev(struct bcm_mini_adapter *ad) { struct net_device *net = ad->dev; - struct bcm_interface_adapter *IntfAdapter = ad->pvInterfaceAdapter; - struct usb_interface *udev = IntfAdapter->interface; - struct usb_device *xdev = IntfAdapter->udev; + struct bcm_interface_adapter *intf_ad = ad->pvInterfaceAdapter; + struct usb_interface *udev = intf_ad->interface; + struct usb_device *xdev = intf_ad->udev; int result; @@ -228,9 +228,9 @@ int register_networkdev(struct bcm_mini_adapter *ad) void unregister_networkdev(struct bcm_mini_adapter *ad) { struct net_device *net = ad->dev; - struct bcm_interface_adapter *IntfAdapter = ad->pvInterfaceAdapter; - struct usb_interface *udev = IntfAdapter->interface; - struct usb_device *xdev = IntfAdapter->udev; + struct bcm_interface_adapter *intf_ad = ad->pvInterfaceAdapter; + struct usb_interface *udev = intf_ad->interface; + struct usb_device *xdev = intf_ad->udev; if (netif_msg_probe(ad)) dev_info(&udev->dev, PFX "%s: unregister usb-%s%s\n", -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/3] Staging: bcm: Bcmnet.c: Renamed variable: "Adapter" -> "ad"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmnet.c | 91 ++-- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c index 95a2358..4cbe5b2 100644 --- a/drivers/staging/bcm/Bcmnet.c +++ b/drivers/staging/bcm/Bcmnet.c @@ -4,23 +4,23 @@ struct net_device *gblpnetdev; static INT bcm_open(struct net_device *dev) { - struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev); + struct bcm_mini_adapter *ad = GET_BCM_ADAPTER(dev); - if (Adapter->fw_download_done == false) { + if (ad->fw_download_done == false) { pr_notice(PFX "%s: link up failed (download in progress)\n", dev->name); return -EBUSY; } - if (netif_msg_ifup(Adapter)) + if (netif_msg_ifup(ad)) pr_info(PFX "%s: enabling interface\n", dev->name); - if (Adapter->LinkUpStatus) { - if (netif_msg_link(Adapter)) + if (ad->LinkUpStatus) { + if (netif_msg_link(ad)) pr_info(PFX "%s: link up\n", dev->name); - netif_carrier_on(Adapter->dev); - netif_start_queue(Adapter->dev); + netif_carrier_on(ad->dev); + netif_start_queue(ad->dev); } return 0; @@ -28,9 +28,9 @@ static INT bcm_open(struct net_device *dev) static INT bcm_close(struct net_device *dev) { - struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev); + struct bcm_mini_adapter *ad = GET_BCM_ADAPTER(dev); - if (netif_msg_ifdown(Adapter)) + if (netif_msg_ifdown(ad)) pr_info(PFX "%s: disabling interface\n", dev->name); netif_carrier_off(dev); @@ -60,42 +60,42 @@ static u16 bcm_select_queue(struct net_device *dev, struct sk_buff *skb, static netdev_tx_t bcm_transmit(struct sk_buff *skb, struct net_device *dev) { - struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev); + struct bcm_mini_adapter *ad = GET_BCM_ADAPTER(dev); u16 qindex = skb_get_queue_mapping(skb); - if (Adapter->device_removed || !Adapter->LinkUpStatus) + if (ad->device_removed || !ad->LinkUpStatus) goto drop; - if (Adapter->TransferMode != IP_PACKET_ONLY_MODE) + if (ad->TransferMode != IP_PACKET_ONLY_MODE) goto drop; if (INVALID_QUEUE_INDEX == qindex) goto drop; - if (Adapter->PackInfo[qindex].uiCurrentPacketsOnHost >= + if (ad->PackInfo[qindex].uiCurrentPacketsOnHost >= SF_MAX_ALLOWED_PACKETS_TO_BACKUP) return NETDEV_TX_BUSY; /* Now Enqueue the packet */ - if (netif_msg_tx_queued(Adapter)) + if (netif_msg_tx_queued(ad)) pr_info(PFX "%s: enqueueing packet to queue %d\n", dev->name, qindex); - spin_lock(&Adapter->PackInfo[qindex].SFQueueLock); - Adapter->PackInfo[qindex].uiCurrentBytesOnHost += skb->len; - Adapter->PackInfo[qindex].uiCurrentPacketsOnHost++; + spin_lock(&ad->PackInfo[qindex].SFQueueLock); + ad->PackInfo[qindex].uiCurrentBytesOnHost += skb->len; + ad->PackInfo[qindex].uiCurrentPacketsOnHost++; *((B_UINT32 *) skb->cb + SKB_CB_LATENCY_OFFSET) = jiffies; - ENQUEUEPACKET(Adapter->PackInfo[qindex].FirstTxQueue, - Adapter->PackInfo[qindex].LastTxQueue, skb); - atomic_inc(&Adapter->TotalPacketCount); - spin_unlock(&Adapter->PackInfo[qindex].SFQueueLock); + ENQUEUEPACKET(ad->PackInfo[qindex].FirstTxQueue, + ad->PackInfo[qindex].LastTxQueue, skb); + atomic_inc(&ad->TotalPacketCount); + spin_unlock(&ad->PackInfo[qindex].SFQueueLock); /* FIXME - this is racy and incorrect, replace with work queue */ - if (!atomic_read(&Adapter->TxPktAvail)) { - atomic_set(&Adapter->TxPktAvail, 1); - wake_up(&Adapter->tx_packet_wait_queue); + if (!atomic_read(&ad->TxPktAvail)) { + atomic_set(&ad->TxPktAvail, 1); + wake_up(&ad->tx_packet_wait_queue); } return NETDEV_TX_OK; @@ -142,39 +142,38 @@ static int bcm_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) static void bcm_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { - struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev); - struct bcm_interface_adapter *psIntfAdapter = - Adapter->pvInterfaceAdapter; + struct bcm_mini_adapter *ad = GET_BCM_ADAPTER(dev); + struct bcm_interface_adapter *psIntfAdapter = ad->pvInterfaceAdapter; struct usb_device *udev = interface_to_usbdev(psIntfAdapter->interface); strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); strlcpy(info->version, DRV_VERS
[PATCH 0/3] drivers/staging/bcm/Bcmnet.c variable rename patchset
Hi, this is my variable rename patchset for the drivers/staging/bcm/Bcmnet.c file. Note, as always: As I do not have the appropriate hardware, I cannot test these patches, but I compiled them at least. Kind regards, Matthias Beyer Matthias Beyer (3): Staging: bcm: Bcmnet.c: Renamed variable: "Adapter" -> "ad" Staging: bcm: Bcmnet.c: Renamed variable: "psIntfAdapter" -> "intf_ad" Staging: bcm: Bcmnet.c: Renamed variable: "IntfAdapter" -> "intf_ad" drivers/staging/bcm/Bcmnet.c | 101 +-- 1 file changed, 50 insertions(+), 51 deletions(-) -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/38] Staging: bcm: Bcmchar.c: Renamed variable: "uiData" -> "data"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 7283bd5..658cde1 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1156,12 +1156,12 @@ static int bcm_char_ioctl_qos_threshold(ULONG arg, static int bcm_char_ioctl_switch_transfer_mode(void __user *argp, struct bcm_mini_adapter *ad) { - UINT uiData = 0; + UINT data = 0; - if (copy_from_user(&uiData, argp, sizeof(UINT))) + if (copy_from_user(&data, argp, sizeof(UINT))) return -EFAULT; - if (uiData) { + if (data) { /* Allow All Packets */ BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_SWITCH_TRANSFER_MODE: ETH_PACKET_TUNNELING_MODE\n"); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/38] Staging: bcm: Bcmchar.c: Renamed variable: "uiLoopIndex" -> "i"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index c7f79a2..7283bd5 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1142,10 +1142,10 @@ static int bcm_char_ioctl_chip_reset(struct bcm_mini_adapter *ad) static int bcm_char_ioctl_qos_threshold(ULONG arg, struct bcm_mini_adapter *ad) { - USHORT uiLoopIndex; + USHORT i; - for (uiLoopIndex = 0; uiLoopIndex < NO_OF_QUEUES; uiLoopIndex++) { - if (get_user(ad->PackInfo[uiLoopIndex].uiThreshold, + for (i = 0; i < NO_OF_QUEUES; i++) { + if (get_user(ad->PackInfo[i].uiThreshold, (unsigned long __user *)arg)) { return -EFAULT; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/38] Staging: bcm: Bcmchar.c: Renamed variable: "psFwInfo" -> "fw_info"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index a831a27..9f30744 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -964,7 +964,7 @@ static int bcm_char_ioctl_buffer_download_start( static int bcm_char_ioctl_buffer_download(void __user *argp, struct bcm_mini_adapter *ad) { - struct bcm_firmware_info *psFwInfo = NULL; + struct bcm_firmware_info *fw_info = NULL; struct bcm_ioctl_buffer io_buff; INT status; @@ -992,35 +992,35 @@ static int bcm_char_ioctl_buffer_download(void __user *argp, return -EINVAL; } - psFwInfo = kmalloc(sizeof(*psFwInfo), GFP_KERNEL); - if (!psFwInfo) { + fw_info = kmalloc(sizeof(*fw_info), GFP_KERNEL); + if (!fw_info) { up(&ad->fw_download_sema); return -ENOMEM; } - if (copy_from_user(psFwInfo, io_buff.InputBuffer, + if (copy_from_user(fw_info, io_buff.InputBuffer, io_buff.InputLength)) { up(&ad->fw_download_sema); - kfree(psFwInfo); + kfree(fw_info); return -EFAULT; } - if (!psFwInfo->pvMappedFirmwareAddress || - (psFwInfo->u32FirmwareLength == 0)) { + if (!fw_info->pvMappedFirmwareAddress || + (fw_info->u32FirmwareLength == 0)) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Something else is wrong %lu\n", - psFwInfo->u32FirmwareLength); + fw_info->u32FirmwareLength); up(&ad->fw_download_sema); - kfree(psFwInfo); + kfree(fw_info); status = -EINVAL; return status; } - status = bcm_ioctl_fw_download(ad, psFwInfo); + status = bcm_ioctl_fw_download(ad, fw_info); if (status != STATUS_SUCCESS) { - if (psFwInfo->u32StartingAddress == CONFIG_BEGIN_ADDR) + if (fw_info->u32StartingAddress == CONFIG_BEGIN_ADDR) BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "IOCTL: Configuration File Upload Failed\n"); else @@ -1042,7 +1042,7 @@ static int bcm_char_ioctl_buffer_download(void __user *argp, BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, OSAL_DBG, DBG_LVL_ALL, "IOCTL: Firmware File Uploaded\n"); - kfree(psFwInfo); + kfree(fw_info); return status; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/38] Staging: bcm: Bcmchar.c: Renamed variable: "NVMAccess" -> "nvm_access"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 9f30744..c7f79a2 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1121,10 +1121,10 @@ static int bcm_char_ioctl_buffer_download_stop(void __user *argp, static int bcm_char_ioctl_chip_reset(struct bcm_mini_adapter *ad) { INT status; - INT NVMAccess; + INT nvm_access; - NVMAccess = down_trylock(&ad->NVMRdmWrmLock); - if (NVMAccess) { + nvm_access = down_trylock(&ad->NVMRdmWrmLock); + if (nvm_access) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, " IOCTL_BCM_CHIP_RESET not allowed as EEPROM Read/Write is in progress\n"); return -EACCES; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/38] Staging: bcm: Bcmchar.c: Renamed variable: "pBulkBuffer" -> "bulk_buff"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 658cde1..f8ea279 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1311,7 +1311,7 @@ static int bcm_char_ioctl_get_host_mibs(void __user *argp, static int bcm_char_ioctl_bulk_wrm(void __user *argp, struct bcm_mini_adapter *ad, UINT cmd) { - struct bcm_bulk_wrm_buffer *pBulkBuffer; + struct bcm_bulk_wrm_buffer *bulk_buff; struct bcm_ioctl_buffer io_buff; UINT uiTempVar = 0; INT status = STATUS_FAILURE; @@ -1338,18 +1338,18 @@ static int bcm_char_ioctl_bulk_wrm(void __user *argp, if (IS_ERR(buff)) return PTR_ERR(buff); - pBulkBuffer = (struct bcm_bulk_wrm_buffer *)buff; + bulk_buff = (struct bcm_bulk_wrm_buffer *)buff; - if (((ULONG)pBulkBuffer->Register & 0x0F00) != 0x0F00 || - ((ULONG)pBulkBuffer->Register & 0x3)) { + if (((ULONG)bulk_buff->Register & 0x0F00) != 0x0F00 || + ((ULONG)bulk_buff->Register & 0x3)) { BCM_DEBUG_PRINT (ad, DBG_TYPE_PRINTK, 0, 0, "WRM Done On invalid Address : %x Access Denied.\n", - (int)pBulkBuffer->Register); + (int)bulk_buff->Register); kfree(buff); return -EINVAL; } - uiTempVar = pBulkBuffer->Register & EEPROM_REJECT_MASK; + uiTempVar = bulk_buff->Register & EEPROM_REJECT_MASK; if (!((ad->pstargetparams->m_u32Customize)&VSG_MODE) && ((uiTempVar == EEPROM_REJECT_REG_1) || (uiTempVar == EEPROM_REJECT_REG_2) || @@ -1363,13 +1363,13 @@ static int bcm_char_ioctl_bulk_wrm(void __user *argp, return -EFAULT; } - if (pBulkBuffer->SwapEndian == false) - status = wrmWithLock(ad, (UINT)pBulkBuffer->Register, - (PCHAR)pBulkBuffer->Values, + if (bulk_buff->SwapEndian == false) + status = wrmWithLock(ad, (UINT)bulk_buff->Register, + (PCHAR)bulk_buff->Values, io_buff.InputLength - 2*sizeof(ULONG)); else - status = wrmaltWithLock(ad, (UINT)pBulkBuffer->Register, - (PUINT)pBulkBuffer->Values, + status = wrmaltWithLock(ad, (UINT)bulk_buff->Register, + (PUINT)bulk_buff->Values, io_buff.InputLength - 2*sizeof(ULONG)); if (status != STATUS_SUCCESS) -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/38] Staging: bcm: Bcmchar.c: Renamed variable: "uiTempVar" -> "tmp"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index f8ea279..4e923f6 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1313,7 +1313,7 @@ static int bcm_char_ioctl_bulk_wrm(void __user *argp, { struct bcm_bulk_wrm_buffer *bulk_buff; struct bcm_ioctl_buffer io_buff; - UINT uiTempVar = 0; + UINT tmp = 0; INT status = STATUS_FAILURE; PCHAR buff = NULL; @@ -1349,12 +1349,12 @@ static int bcm_char_ioctl_bulk_wrm(void __user *argp, return -EINVAL; } - uiTempVar = bulk_buff->Register & EEPROM_REJECT_MASK; + tmp = bulk_buff->Register & EEPROM_REJECT_MASK; if (!((ad->pstargetparams->m_u32Customize)&VSG_MODE) && - ((uiTempVar == EEPROM_REJECT_REG_1) || - (uiTempVar == EEPROM_REJECT_REG_2) || - (uiTempVar == EEPROM_REJECT_REG_3) || - (uiTempVar == EEPROM_REJECT_REG_4)) && + ((tmp == EEPROM_REJECT_REG_1) || + (tmp == EEPROM_REJECT_REG_2) || + (tmp == EEPROM_REJECT_REG_3) || + (tmp == EEPROM_REJECT_REG_4)) && (cmd == IOCTL_BCM_REGISTER_WRITE)) { kfree(buff); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/38] Staging: bcm: Bcmchar.c: Renamed variable: "sUserDebugState" -> "user_debug_state"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 243933a..771173f 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1448,38 +1448,38 @@ static int bcm_char_ioctl_set_debug(void __user *argp, { #ifdef DEBUG struct bcm_ioctl_buffer io_buff; - struct bcm_user_debug_state sUserDebugState; + struct bcm_user_debug_state user_debug_state; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "In SET_DEBUG ioctl\n"); if (copy_from_user(&io_buff, argp, sizeof(struct bcm_ioctl_buffer))) return -EFAULT; - if (copy_from_user(&sUserDebugState, io_buff.InputBuffer, + if (copy_from_user(&user_debug_state, io_buff.InputBuffer, sizeof(struct bcm_user_debug_state))) return -EFAULT; BCM_DEBUG_PRINT (ad, DBG_TYPE_PRINTK, 0, 0, "IOCTL_BCM_SET_DEBUG: OnOff=%d Type = 0x%x ", - sUserDebugState.OnOff, sUserDebugState.Type); - /* sUserDebugState.Subtype <<= 1; */ - sUserDebugState.Subtype = 1 << sUserDebugState.Subtype; + user_debug_state.OnOff, user_debug_state.Type); + /* user_debug_state.Subtype <<= 1; */ + user_debug_state.Subtype = 1 << user_debug_state.Subtype; BCM_DEBUG_PRINT (ad, DBG_TYPE_PRINTK, 0, 0, - "actual Subtype=0x%x\n", sUserDebugState.Subtype); + "actual Subtype=0x%x\n", user_debug_state.Subtype); /* Update new 'DebugState' in the ad */ - ad->stDebugState.type |= sUserDebugState.Type; + ad->stDebugState.type |= user_debug_state.Type; /* Subtype: A bitmap of 32 bits for Subtype per Type. * Valid indexes in 'subtype' array: 1,2,4,8 * corresponding to valid Type values. Hence we can use the 'Type' field * as the index value, ignoring the array entries 0,3,5,6,7 ! */ - if (sUserDebugState.OnOff) - ad->stDebugState.subtype[sUserDebugState.Type] |= - sUserDebugState.Subtype; + if (user_debug_state.OnOff) + ad->stDebugState.subtype[user_debug_state.Type] |= + user_debug_state.Subtype; else - ad->stDebugState.subtype[sUserDebugState.Type] &= - ~sUserDebugState.Subtype; + ad->stDebugState.subtype[user_debug_state.Type] &= + ~user_debug_state.Subtype; BCM_SHOW_DEBUG_BITMAP(ad); #endif -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/38] Staging: bcm: Bcmchar.c: Renamed variable: "stNVMReadWrite" -> "nvm_rw"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 771173f..a588a5f 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1489,7 +1489,7 @@ static int bcm_char_ioctl_set_debug(void __user *argp, static int bcm_char_ioctl_nvm_rw(void __user *argp, struct bcm_mini_adapter *ad, UINT cmd) { - struct bcm_nvm_readwrite stNVMReadWrite; + struct bcm_nvm_readwrite nvm_rw; struct timeval tv0, tv1; struct bcm_ioctl_buffer io_buff; PUCHAR pReadData = NULL; @@ -1519,7 +1519,7 @@ static int bcm_char_ioctl_nvm_rw(void __user *argp, if (copy_from_user(&io_buff, argp, sizeof(struct bcm_ioctl_buffer))) return -EFAULT; - if (copy_from_user(&stNVMReadWrite, + if (copy_from_user(&nvm_rw, (IOCTL_BCM_NVM_READ == cmd) ? io_buff.OutputBuffer : io_buff.InputBuffer, sizeof(struct bcm_nvm_readwrite))) @@ -1528,22 +1528,22 @@ static int bcm_char_ioctl_nvm_rw(void __user *argp, /* * Deny the access if the offset crosses the cal area limit. */ - if (stNVMReadWrite.uiNumBytes > ad->uiNVMDSDSize) + if (nvm_rw.uiNumBytes > ad->uiNVMDSDSize) return STATUS_FAILURE; - if (stNVMReadWrite.uiOffset > - ad->uiNVMDSDSize - stNVMReadWrite.uiNumBytes) + if (nvm_rw.uiOffset > + ad->uiNVMDSDSize - nvm_rw.uiNumBytes) return STATUS_FAILURE; - pReadData = memdup_user(stNVMReadWrite.pBuffer, - stNVMReadWrite.uiNumBytes); + pReadData = memdup_user(nvm_rw.pBuffer, + nvm_rw.uiNumBytes); if (IS_ERR(pReadData)) return PTR_ERR(pReadData); do_gettimeofday(&tv0); if (IOCTL_BCM_NVM_READ == cmd) { int ret = bcm_handle_nvm_read_cmd(ad, pReadData, - &stNVMReadWrite); + &nvm_rw); if (ret != STATUS_SUCCESS) return ret; } else { @@ -1565,14 +1565,14 @@ static int bcm_char_ioctl_nvm_rw(void __user *argp, if (IsFlash2x(ad)) { int ret = handle_flash2x_adapter(ad, pReadData, - &stNVMReadWrite); + &nvm_rw); if (ret != STATUS_SUCCESS) return ret; } status = BeceemNVMWrite(ad, (PUINT)pReadData, - stNVMReadWrite.uiOffset, stNVMReadWrite.uiNumBytes, - stNVMReadWrite.bVerify); + nvm_rw.uiOffset, nvm_rw.uiNumBytes, + nvm_rw.bVerify); if (IsFlash2x(ad)) BcmFlash2xWriteSig(ad, ad->eActiveDSD); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/38] Staging: bcm: Bcmchar.c: Renamed variable: "uiSectorSize" -> "sector_size"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 4e923f6..243933a 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1400,7 +1400,7 @@ static int bcm_char_ioctl_cal_init(void __user *argp, struct bcm_mini_adapter *ad) { struct bcm_ioctl_buffer io_buff; - UINT uiSectorSize = 0; + UINT sector_size = 0; INT status = STATUS_FAILURE; if (ad->eNVMType == NVM_FLASH) { @@ -1408,12 +1408,12 @@ static int bcm_char_ioctl_cal_init(void __user *argp, sizeof(struct bcm_ioctl_buffer))) return -EFAULT; - if (copy_from_user(&uiSectorSize, io_buff.InputBuffer, + if (copy_from_user(§or_size, io_buff.InputBuffer, sizeof(UINT))) return -EFAULT; - if ((uiSectorSize < MIN_SECTOR_SIZE) || - (uiSectorSize > MAX_SECTOR_SIZE)) { + if ((sector_size < MIN_SECTOR_SIZE) || + (sector_size > MAX_SECTOR_SIZE)) { if (copy_to_user(io_buff.OutputBuffer, &ad->uiSectorSize, sizeof(UINT))) return -EFAULT; @@ -1431,7 +1431,7 @@ static int bcm_char_ioctl_cal_init(void __user *argp, return -EACCES; } - ad->uiSectorSize = uiSectorSize; + ad->uiSectorSize = sector_size; BcmUpdateSectorSize(ad, ad->uiSectorSize); } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 29/38] Staging: bcm: Bcmchar.c: Renamed variable: "eFlash2xSectionVal" -> "flash_2x_section_val"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index f47168b..c33e9ef 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1901,7 +1901,7 @@ BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, static int bcm_char_ioctl_set_active_section(void __user *argp, struct bcm_mini_adapter *ad) { - enum bcm_flash2x_section_val eFlash2xSectionVal = 0; + enum bcm_flash2x_section_val flash_2x_section_val = 0; INT status = STATUS_FAILURE; struct bcm_ioctl_buffer io_buff; @@ -1922,7 +1922,7 @@ static int bcm_char_ioctl_set_active_section(void __user *argp, return -EFAULT; } - status = copy_from_user(&eFlash2xSectionVal, + status = copy_from_user(&flash_2x_section_val, io_buff.InputBuffer, sizeof(INT)); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, @@ -1942,7 +1942,7 @@ static int bcm_char_ioctl_set_active_section(void __user *argp, return -EACCES; } - status = BcmSetActiveSection(ad, eFlash2xSectionVal); + status = BcmSetActiveSection(ad, flash_2x_section_val); if (status) BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Failed to make it's priority Highest. status %d", @@ -2102,9 +2102,9 @@ static int bcm_char_ioctl_select_dsd(void __user *argp, struct bcm_ioctl_buffer io_buff; INT status = STATUS_FAILURE; UINT SectOfset = 0; - enum bcm_flash2x_section_val eFlash2xSectionVal; + enum bcm_flash2x_section_val flash_2x_section_val; - eFlash2xSectionVal = NO_SECTION_VAL; + flash_2x_section_val = NO_SECTION_VAL; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_SELECT_DSD Called"); @@ -2121,7 +2121,7 @@ static int bcm_char_ioctl_select_dsd(void __user *argp, "Copy of IOCTL BUFFER failed"); return -EFAULT; } - status = copy_from_user(&eFlash2xSectionVal, io_buff.InputBuffer, + status = copy_from_user(&flash_2x_section_val, io_buff.InputBuffer, sizeof(INT)); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, @@ -2130,28 +2130,28 @@ static int bcm_char_ioctl_select_dsd(void __user *argp, } BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, - "Read Section :%d", eFlash2xSectionVal); - if ((eFlash2xSectionVal != DSD0) && - (eFlash2xSectionVal != DSD1) && - (eFlash2xSectionVal != DSD2)) { + "Read Section :%d", flash_2x_section_val); + if ((flash_2x_section_val != DSD0) && + (flash_2x_section_val != DSD1) && + (flash_2x_section_val != DSD2)) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Passed section<%x> is not DSD section", - eFlash2xSectionVal); + flash_2x_section_val); return STATUS_FAILURE; } - SectOfset = BcmGetSectionValStartOffset(ad, eFlash2xSectionVal); + SectOfset = BcmGetSectionValStartOffset(ad, flash_2x_section_val); if (SectOfset == INVALID_OFFSET) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Provided Section val <%d> does not exist in Flash 2.x", - eFlash2xSectionVal); + flash_2x_section_val); return -EINVAL; } ad->bAllDSDWriteAllow = TRUE; ad->ulFlashCalStart = SectOfset; - ad->eActiveDSD = eFlash2xSectionVal; + ad->eActiveDSD = flash_2x_section_val; return STATUS_SUCCESS; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 33/38] Staging: bcm: Bcmchar.c: Renamed variable: "ReadOffset" -> "read_offset"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 3d384c5..3fead74 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1605,7 +1605,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, UINT NOB = 0; UINT buff_size = 0; UINT read_bytes = 0; - UINT ReadOffset = 0; + UINT read_offset = 0; INT status = STATUS_FAILURE; void __user *OutPutBuff; @@ -1650,7 +1650,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, else buff_size = NOB; - ReadOffset = flash_2x_read.offset; + read_offset = flash_2x_read.offset; OutPutBuff = io_buff.OutputBuffer; read_buff = kzalloc(buff_size , GFP_KERNEL); @@ -1681,7 +1681,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, /* Reading the data from Flash 2.x */ status = BcmFlash2xBulkRead(ad, (PUINT)read_buff, - flash_2x_read.Section, ReadOffset, read_bytes); + flash_2x_read.Section, read_offset, read_bytes); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, @@ -1704,7 +1704,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, } NOB = NOB - read_bytes; if (NOB) { - ReadOffset = ReadOffset + read_bytes; + read_offset = read_offset + read_bytes; OutPutBuff = OutPutBuff + read_bytes; } } @@ -2163,7 +2163,7 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, struct bcm_ioctl_buffer io_buff; unsigned int NOB; INT buff_size; - INT ReadOffset = 0; + INT read_offset = 0; UINT read_bytes = 0; PUCHAR read_buff; void __user *OutPutBuff; @@ -2194,7 +2194,7 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, else buff_size = NOB; - ReadOffset = nvm_read.uiOffset; + read_offset = nvm_read.uiOffset; OutPutBuff = nvm_read.pBuffer; read_buff = kzalloc(buff_size , GFP_KERNEL); @@ -2226,7 +2226,7 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, /* Reading the data from Flash 2.x */ status = BeceemNVMRead(ad, (PUINT)read_buff, - ReadOffset, read_bytes); + read_offset, read_bytes); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Flash 2x read err with status :%d", @@ -2248,7 +2248,7 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, } NOB = NOB - read_bytes; if (NOB) { - ReadOffset = ReadOffset + read_bytes; + read_offset = read_offset + read_bytes; OutPutBuff = OutPutBuff + read_bytes; } } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 31/38] Staging: bcm: Bcmchar.c: Renamed variable: "SectOfset" -> "sect_offset"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index ed56313..5c29327 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -2101,7 +2101,7 @@ static int bcm_char_ioctl_select_dsd(void __user *argp, { struct bcm_ioctl_buffer io_buff; INT status = STATUS_FAILURE; - UINT SectOfset = 0; + UINT sect_offset = 0; enum bcm_flash2x_section_val flash_2x_section_val; flash_2x_section_val = NO_SECTION_VAL; @@ -2141,8 +2141,8 @@ static int bcm_char_ioctl_select_dsd(void __user *argp, return STATUS_FAILURE; } - SectOfset = BcmGetSectionValStartOffset(ad, flash_2x_section_val); - if (SectOfset == INVALID_OFFSET) { + sect_offset = BcmGetSectionValStartOffset(ad, flash_2x_section_val); + if (sect_offset == INVALID_OFFSET) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "Provided Section val <%d> does not exist in Flash 2.x", flash_2x_section_val); @@ -2150,7 +2150,7 @@ static int bcm_char_ioctl_select_dsd(void __user *argp, } ad->bAllDSDWriteAllow = TRUE; - ad->ulFlashCalStart = SectOfset; + ad->ulFlashCalStart = sect_offset; ad->eActiveDSD = flash_2x_section_val; return STATUS_SUCCESS; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 32/38] Staging: bcm: Bcmchar.c: Renamed variable: "stNVMRead" -> "nvm_read"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 5c29327..3d384c5 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -2159,7 +2159,7 @@ static int bcm_char_ioctl_select_dsd(void __user *argp, static int bcm_char_ioctl_nvm_raw_read(void __user *argp, struct bcm_mini_adapter *ad) { - struct bcm_nvm_readwrite stNVMRead; + struct bcm_nvm_readwrite nvm_read; struct bcm_ioctl_buffer io_buff; unsigned int NOB; INT buff_size; @@ -2182,11 +2182,11 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, return -EFAULT; } - if (copy_from_user(&stNVMRead, io_buff.OutputBuffer, + if (copy_from_user(&nvm_read, io_buff.OutputBuffer, sizeof(struct bcm_nvm_readwrite))) return -EFAULT; - NOB = stNVMRead.uiNumBytes; + NOB = nvm_read.uiNumBytes; /* In Raw-Read max Buff size : 64MB */ if (NOB > DEFAULT_BUFF_SIZE) @@ -2194,8 +2194,8 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, else buff_size = NOB; - ReadOffset = stNVMRead.uiOffset; - OutPutBuff = stNVMRead.pBuffer; + ReadOffset = nvm_read.uiOffset; + OutPutBuff = nvm_read.pBuffer; read_buff = kzalloc(buff_size , GFP_KERNEL); if (read_buff == NULL) { -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 37/38] Staging: bcm: Bcmchar.c: Renamed variable: "pTarang" -> "tarang"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index a748108..6fae4de 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1272,7 +1272,7 @@ static int bcm_char_ioctl_get_dsx_indication(void __user *argp, static int bcm_char_ioctl_get_host_mibs(void __user *argp, struct bcm_mini_adapter *ad, - struct bcm_tarang_data *pTarang) + struct bcm_tarang_data *tarang) { struct bcm_ioctl_buffer io_buff; INT status = STATUS_FAILURE; @@ -1294,7 +1294,7 @@ static int bcm_char_ioctl_get_host_mibs(void __user *argp, return STATUS_FAILURE; status = ProcessGetHostMibs(ad, temp_buff); - GetDroppedAppCntrlPktMibs(temp_buff, pTarang); + GetDroppedAppCntrlPktMibs(temp_buff, tarang); if (status != STATUS_FAILURE) { if (copy_to_user(io_buff.OutputBuffer, temp_buff, @@ -2260,7 +2260,7 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, static int bcm_char_ioctl_cntrlmsg_mask(void __user *argp, struct bcm_mini_adapter *ad, - struct bcm_tarang_data *pTarang) + struct bcm_tarang_data *tarang) { struct bcm_ioctl_buffer io_buff; INT status = STATUS_FAILURE; @@ -2288,7 +2288,7 @@ static int bcm_char_ioctl_cntrlmsg_mask(void __user *argp, BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "\n Got user defined cntrl msg bit mask :%lx", rx_cntrl_msg_bit_mask); - pTarang->RxCntrlMsgBitMask = rx_cntrl_msg_bit_mask; + tarang->RxCntrlMsgBitMask = rx_cntrl_msg_bit_mask; return status; } @@ -2349,9 +2349,9 @@ static int bcm_char_ioctl_time_since_net_entry(void __user *argp, static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) { - struct bcm_tarang_data *pTarang = filp->private_data; + struct bcm_tarang_data *tarang = filp->private_data; void __user *argp = (void __user *)arg; - struct bcm_mini_adapter *ad = pTarang->Adapter; + struct bcm_mini_adapter *ad = tarang->Adapter; INT status = STATUS_FAILURE; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, @@ -2512,7 +2512,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) return status; case IOCTL_BCM_GET_HOST_MIBS: - status = bcm_char_ioctl_get_host_mibs(argp, ad, pTarang); + status = bcm_char_ioctl_get_host_mibs(argp, ad, tarang); return status; case IOCTL_BCM_WAKE_UP_DEVICE_FROM_IDLE: @@ -2588,7 +2588,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) return status; case IOCTL_BCM_CNTRLMSG_MASK: - status = bcm_char_ioctl_cntrlmsg_mask(argp, ad, pTarang); + status = bcm_char_ioctl_cntrlmsg_mask(argp, ad, tarang); return status; case IOCTL_BCM_GET_DEVICE_DRIVER_INFO: -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 35/38] Staging: bcm: Bcmchar.c: Renamed variable: "DevInfo" -> "dev_info"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 6b60db8..35cfc70 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -2296,26 +2296,26 @@ static int bcm_char_ioctl_cntrlmsg_mask(void __user *argp, static int bcm_char_ioctl_get_device_driver_info(void __user *argp, struct bcm_mini_adapter *ad) { - struct bcm_driver_info DevInfo; + struct bcm_driver_info dev_info; struct bcm_ioctl_buffer io_buff; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Called IOCTL_BCM_GET_DEVICE_DRIVER_INFO\n"); - memset(&DevInfo, 0, sizeof(DevInfo)); - DevInfo.MaxRDMBufferSize = BUFFER_4K; - DevInfo.u32DSDStartOffset = EEPROM_CALPARAM_START; - DevInfo.u32RxAlignmentCorrection = 0; - DevInfo.u32NVMType = ad->eNVMType; - DevInfo.u32InterfaceType = BCM_USB; + memset(&dev_info, 0, sizeof(dev_info)); + dev_info.MaxRDMBufferSize = BUFFER_4K; + dev_info.u32DSDStartOffset = EEPROM_CALPARAM_START; + dev_info.u32RxAlignmentCorrection = 0; + dev_info.u32NVMType = ad->eNVMType; + dev_info.u32InterfaceType = BCM_USB; if (copy_from_user(&io_buff, argp, sizeof(struct bcm_ioctl_buffer))) return -EFAULT; - if (io_buff.OutputLength < sizeof(DevInfo)) + if (io_buff.OutputLength < sizeof(dev_info)) return -EINVAL; - if (copy_to_user(io_buff.OutputBuffer, &DevInfo, sizeof(DevInfo))) + if (copy_to_user(io_buff.OutputBuffer, &dev_info, sizeof(dev_info))) return -EFAULT; return STATUS_SUCCESS; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 36/38] Staging: bcm: Bcmchar.c: Renamed variable: "stTimeElapsedSinceNetEntry" -> "time_elapsed_since_net_entry"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 35cfc70..a748108 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -2324,7 +2324,7 @@ static int bcm_char_ioctl_get_device_driver_info(void __user *argp, static int bcm_char_ioctl_time_since_net_entry(void __user *argp, struct bcm_mini_adapter *ad) { - struct bcm_time_elapsed stTimeElapsedSinceNetEntry = {0}; + struct bcm_time_elapsed time_elapsed_since_net_entry = {0}; struct bcm_ioctl_buffer io_buff; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, @@ -2336,10 +2336,10 @@ static int bcm_char_ioctl_time_since_net_entry(void __user *argp, if (io_buff.OutputLength < sizeof(struct bcm_time_elapsed)) return -EINVAL; - stTimeElapsedSinceNetEntry.ul64TimeElapsedSinceNetEntry = + time_elapsed_since_net_entry.ul64TimeElapsedSinceNetEntry = get_seconds() - ad->liTimeSinceLastNetEntry; - if (copy_to_user(io_buff.OutputBuffer, &stTimeElapsedSinceNetEntry, + if (copy_to_user(io_buff.OutputBuffer, &time_elapsed_since_net_entry, sizeof(struct bcm_time_elapsed))) return -EFAULT; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 38/38] Staging: bcm: Bcmchar.c: Renamed variable: "NOB" -> "nob"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 60 +-- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 6fae4de..1eade1c 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1602,7 +1602,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, struct bcm_flash2x_readwrite flash_2x_read = {0}; struct bcm_ioctl_buffer io_buff; PUCHAR read_buff = NULL; - UINT NOB = 0; + UINT nob = 0; UINT buff_size = 0; UINT read_bytes = 0; UINT read_offset = 0; @@ -1644,11 +1644,11 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, if (validateFlash2xReadWrite(ad, &flash_2x_read) == false) return STATUS_FAILURE; - NOB = flash_2x_read.numOfBytes; - if (NOB > ad->uiSectorSize) + nob = flash_2x_read.numOfBytes; + if (nob > ad->uiSectorSize) buff_size = ad->uiSectorSize; else - buff_size = NOB; + buff_size = nob; read_offset = flash_2x_read.offset; OutPutBuff = io_buff.OutputBuffer; @@ -1673,11 +1673,11 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, return -EACCES; } - while (NOB) { - if (NOB > ad->uiSectorSize) + while (nob) { + if (nob > ad->uiSectorSize) read_bytes = ad->uiSectorSize; else - read_bytes = NOB; + read_bytes = nob; /* Reading the data from Flash 2.x */ status = BcmFlash2xBulkRead(ad, (PUINT)read_buff, @@ -1702,8 +1702,8 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp, kfree(read_buff); return -EFAULT; } - NOB = NOB - read_bytes; - if (NOB) { + nob = nob - read_bytes; + if (nob) { read_offset = read_offset + read_bytes; OutPutBuff = OutPutBuff + read_bytes; } @@ -1721,7 +1721,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, struct bcm_ioctl_buffer io_buff; PUCHAR write_buff; void __user *input_addr; - UINT NOB = 0; + UINT nob = 0; UINT buff_size = 0; UINT write_off = 0; UINT write_bytes = 0; @@ -1770,12 +1770,12 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, input_addr = sFlash2xWrite.pDataBuff; write_off = sFlash2xWrite.offset; - NOB = sFlash2xWrite.numOfBytes; + nob = sFlash2xWrite.numOfBytes; - if (NOB > ad->uiSectorSize) + if (nob > ad->uiSectorSize) buff_size = ad->uiSectorSize; else - buff_size = NOB; + buff_size = nob; write_buff = kmalloc(buff_size, GFP_KERNEL); @@ -1789,8 +1789,8 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, (write_off % ad->uiSectorSize); } - if (NOB < write_bytes) - write_bytes = NOB; + if (nob < write_bytes) + write_bytes = nob; down(&ad->NVMRdmWrmLock); @@ -1831,16 +1831,16 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, break; } - NOB = NOB - write_bytes; - if (NOB) { + nob = nob - write_bytes; + if (nob) { write_off = write_off + write_bytes; input_addr = input_addr + write_bytes; - if (NOB > ad->uiSectorSize) + if (nob > ad->uiSectorSize) write_bytes = ad->uiSectorSize; else - write_bytes = NOB; + write_bytes = nob; } - } while (NOB > 0); + } while (nob > 0); BcmFlash2xWriteSig(ad, sFlash2xWrite.Section); up(&ad->NVMRdmWrmLock); @@ -1995,7 +1995,7 @@ static int bcm_char_ioctl_copy_section(void __user *argp, BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "offset :%x", copy_sect_strut.offset); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, - "NOB :%x", copy_sect_strut.numOfBytes); + "nob :%x", copy_sect_strut.numOfBytes); if (IsSectionExistInFlash(ad, copy_sect_strut.SrcSection) == false) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, @@ -2161,7 +2161,7 @@ static int bcm_char_ioctl_nvm_raw_read(void __user *argp, { struct bcm_nvm_readwrite nvm_read; struct bcm_i
[PATCH 34/38] Staging: bcm: Bcmchar.c: Renamed variable: "RxCntrlMsgBitMask" -> "rx_cntrl_msg_bit_mask"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/Bcmchar.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 3fead74..6b60db8 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -2264,7 +2264,7 @@ static int bcm_char_ioctl_cntrlmsg_mask(void __user *argp, { struct bcm_ioctl_buffer io_buff; INT status = STATUS_FAILURE; - ULONG RxCntrlMsgBitMask = 0; + ULONG rx_cntrl_msg_bit_mask = 0; /* Copy Ioctl Buffer structure */ status = copy_from_user(&io_buff, argp, @@ -2278,7 +2278,7 @@ static int bcm_char_ioctl_cntrlmsg_mask(void __user *argp, if (io_buff.InputLength != sizeof(unsigned long)) return -EINVAL; - status = copy_from_user(&RxCntrlMsgBitMask, io_buff.InputBuffer, + status = copy_from_user(&rx_cntrl_msg_bit_mask, io_buff.InputBuffer, io_buff.InputLength); if (status) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, @@ -2287,8 +2287,8 @@ static int bcm_char_ioctl_cntrlmsg_mask(void __user *argp, } BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "\n Got user defined cntrl msg bit mask :%lx", - RxCntrlMsgBitMask); - pTarang->RxCntrlMsgBitMask = RxCntrlMsgBitMask; + rx_cntrl_msg_bit_mask); + pTarang->RxCntrlMsgBitMask = rx_cntrl_msg_bit_mask; return status; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 35/57] Staging: bcm: CmHost.c: Renamed variable: "ulAddrSFParamSet" -> "addr_sf_param_set"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 92b5a89..d27759e 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1407,34 +1407,34 @@ static VOID DumpCmControlPacket(PVOID buffer) } static inline ULONG RestoreSFParam(struct bcm_mini_adapter *ad, - ULONG ulAddrSFParamSet, PUCHAR pucDestBuffer) + ULONG addr_sf_param_set, PUCHAR pucDestBuffer) { UINT nBytesToRead = sizeof(struct bcm_connect_mgr_params); - if (ulAddrSFParamSet == 0 || NULL == pucDestBuffer) { + if (addr_sf_param_set == 0 || NULL == pucDestBuffer) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Got Param address as 0!!"); return 0; } - ulAddrSFParamSet = ntohl(ulAddrSFParamSet); + addr_sf_param_set = ntohl(addr_sf_param_set); /* Read out the SF Param Set At the indicated Location */ - if (rdm(ad, ulAddrSFParamSet, (PUCHAR)pucDestBuffer, nBytesToRead) < 0) + if (rdm(ad, addr_sf_param_set, (PUCHAR)pucDestBuffer, nBytesToRead) < 0) return STATUS_FAILURE; return 1; } static ULONG StoreSFParam(struct bcm_mini_adapter *ad, PUCHAR pucSrcBuffer, - ULONG ulAddrSFParamSet) + ULONG addr_sf_param_set) { UINT nBytesToWrite = sizeof(struct bcm_connect_mgr_params); int ret = 0; - if (ulAddrSFParamSet == 0 || NULL == pucSrcBuffer) + if (addr_sf_param_set == 0 || NULL == pucSrcBuffer) return 0; - ret = wrm(ad, ulAddrSFParamSet, (u8 *)pucSrcBuffer, nBytesToWrite); + ret = wrm(ad, addr_sf_param_set, (u8 *)pucSrcBuffer, nBytesToWrite); if (ret < 0) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "%s:%d WRM failed", __func__, __LINE__); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/57] Staging: bcm: CmHost.c: Renamed variable: "bFreeAll" -> "free_all"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 65cea92..7349821 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -264,7 +264,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, } } -void ClearTargetDSXBuffer(struct bcm_mini_adapter *ad, B_UINT16 TID, bool bFreeAll) +void ClearTargetDSXBuffer(struct bcm_mini_adapter *ad, B_UINT16 TID, bool free_all) { int i; struct bcm_targetdsx_buffer *curr_buf; @@ -275,7 +275,7 @@ void ClearTargetDSXBuffer(struct bcm_mini_adapter *ad, B_UINT16 TID, bool bFreeA if (curr_buf->valid) continue; - if ((bFreeAll) || (curr_buf->tid == TID)) { + if ((free_all) || (curr_buf->tid == TID)) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "ClearTargetDSXBuffer: found tid %d buffer cleared %lx\n", TID, curr_buf->ulTargetDsxBuffer); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/57] Staging: bcm: CmHost.c: Renamed variable: "nSizeOfIPAddressInBytes" -> "ip_addr_byte_len"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index fe4c164..1f84d7c 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -133,13 +133,13 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, bool ip_v6, enum bcm_ipaddr_context ip_addr_context) { int i = 0; - UINT nSizeOfIPAddressInBytes = IP_LENGTH_OF_ADDRESS; + UINT ip_addr_byte_len = IP_LENGTH_OF_ADDRESS; UCHAR *ptrClassifierIpAddress = NULL; UCHAR *ptrClassifierIpMask = NULL; struct bcm_mini_adapter *ad = GET_BCM_ADAPTER(gblpnetdev); if (ip_v6) - nSizeOfIPAddressInBytes = IPV6_ADDRESS_SIZEINBYTES; + ip_addr_byte_len = IPV6_ADDRESS_SIZEINBYTES; /* Destination Ip Address */ BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, @@ -155,12 +155,12 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, /* * checking both the mask and address togethor in Classification. -* So length will be : TotalLengthInBytes/nSizeOfIPAddressInBytes * 2 -* (nSizeOfIPAddressInBytes for address and nSizeOfIPAddressInBytes for mask) +* So length will be : TotalLengthInBytes/ip_addr_byte_len * 2 +* (ip_addr_byte_len for address and ip_addr_byte_len for mask) */ if (ip_addr_context == eDestIpAddress) { classifier_entry->ucIPDestinationAddressLength = - ip_addr_len/(nSizeOfIPAddressInBytes * 2); + ip_addr_len/(ip_addr_byte_len * 2); if (ip_v6) { ptrClassifierIpAddress = st_dest_ip->ucIpv6Address; @@ -174,7 +174,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, } } else if (ip_addr_context == eSrcIpAddress) { classifier_entry->ucIPSourceAddressLength = - ip_addr_len/(nSizeOfIPAddressInBytes * 2); + ip_addr_len/(ip_addr_byte_len * 2); if (ip_v6) { ptrClassifierIpAddress = st_src_ip->ucIpv6Address; @@ -188,13 +188,13 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Address Length:0x%X\n", classifier_entry->ucIPDestinationAddressLength); - while ((ip_addr_len >= nSizeOfIPAddressInBytes) + while ((ip_addr_len >= ip_addr_byte_len) && (i < MAX_IP_RANGE_LENGTH)) { memcpy(ptrClassifierIpAddress + - (i * nSizeOfIPAddressInBytes), + (i * ip_addr_byte_len), (ip_addr_mask_src - + (i * nSizeOfIPAddressInBytes * 2)), - nSizeOfIPAddressInBytes); + + (i * ip_addr_byte_len * 2)), + ip_addr_byte_len); if (!ip_v6) { if (ip_addr_context == eSrcIpAddress) { @@ -217,14 +217,14 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, st_dest_ip->ulIpv4Addr[i]); } } - ip_addr_len -= nSizeOfIPAddressInBytes; - if (ip_addr_len >= nSizeOfIPAddressInBytes) { + ip_addr_len -= ip_addr_byte_len; + if (ip_addr_len >= ip_addr_byte_len) { memcpy(ptrClassifierIpMask + - (i * nSizeOfIPAddressInBytes), + (i * ip_addr_byte_len), (ip_addr_mask_src - + nSizeOfIPAddressInBytes - + (i * nSizeOfIPAddressInBytes * 2)), - nSizeOfIPAddressInBytes); + + ip_addr_byte_len + + (i * ip_addr_byte_len * 2)), + ip_addr_byte_len); if (!ip_v6) { if (ip_addr_context == eSrcIpAddress) { @@ -247,7 +247,7 @@ CopyIp
[PATCH 03/57] Staging: bcm: CmHost.c: Renamed function: "restore_endianess_of_pstClassifierEntry" -> "restore_endianess_of_classifier_entry"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index a188db7..d8796a2 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -15,7 +15,7 @@ enum E_CLASSIFIER_ACTION { static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *ad, B_UINT16 tid); -static void restore_endianess_of_pstClassifierEntry( +static void restore_endianess_of_classifier_entry( struct bcm_classifier_rule *classifier_entry, enum bcm_ipaddr_context eIpAddrContext); @@ -256,7 +256,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, } if (bIpVersion6) { /* Restore EndianNess of Struct */ - restore_endianess_of_pstClassifierEntry( + restore_endianess_of_classifier_entry( classifier_entry, eIpAddrContext ); @@ -2147,7 +2147,7 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *ad, } } -static void restore_endianess_of_pstClassifierEntry( +static void restore_endianess_of_classifier_entry( struct bcm_classifier_rule *classifier_entry, enum bcm_ipaddr_context eIpAddrContext) { -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 27/57] Staging: bcm: CmHost.c: Renamed variable: "psfLocalSet" -> "local_set"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 80 ++-- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index e8416dc..13d6344 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -542,7 +542,7 @@ VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *ad, * @ingroup ctrl_pkt_functions */ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* u32SFID)); + "%s: SFID= %x ", __func__, ntohl(local_set->u32SFID)); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Updating Queue %d", search_rule_idx); - sf_id = ntohl(psfLocalSet->u32SFID); + sf_id = ntohl(local_set->u32SFID); /* Store IP Version used */ /* Get The Version Of IP used (IPv6 or IPv4) from CSSpecification field of SF */ @@ -578,8 +578,8 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* u8CSSpecification); - switch (psfLocalSet->u8CSSpecification) { + local_set->u8CSSpecification); + switch (local_set->u8CSSpecification) { case eCSPacketIPV4: curr_packinfo->bIPCSSupport = IPV4_CS; break; @@ -624,25 +624,25 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* bETHCSEnabled) curr_packinfo->bEthCSSupport = 0; - if (psfLocalSet->u8ServiceClassNameLength > 0 && psfLocalSet->u8ServiceClassNameLength < 32) + if (local_set->u8ServiceClassNameLength > 0 && local_set->u8ServiceClassNameLength < 32) memcpy(curr_packinfo->ucServiceClassName, - psfLocalSet->u8ServiceClassName, - psfLocalSet->u8ServiceClassNameLength); + local_set->u8ServiceClassName, + local_set->u8ServiceClassNameLength); - curr_packinfo->u8QueueType = psfLocalSet->u8ServiceFlowSchedulingType; + curr_packinfo->u8QueueType = local_set->u8ServiceFlowSchedulingType; if (curr_packinfo->u8QueueType == BE && curr_packinfo->ucDirection) ad->usBestEffortQueueIndex = search_rule_idx; - curr_packinfo->ulSFID = ntohl(psfLocalSet->u32SFID); + curr_packinfo->ulSFID = ntohl(local_set->u32SFID); - curr_packinfo->u8TrafficPriority = psfLocalSet->u8TrafficPriority; + curr_packinfo->u8TrafficPriority = local_set->u8TrafficPriority; /* copy all the classifier in the Service Flow param structure */ - for (i = 0; i < psfLocalSet->u8TotalClassifiers; i++) { + for (i = 0; i < local_set->u8TotalClassifiers; i++) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Classifier index =%d", i); - cs_type = &psfLocalSet->cConvergenceSLTypes[i]; + cs_type = &local_set->cConvergenceSLTypes[i]; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Classifier index =%d", i); @@ -744,8 +744,8 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* u8TotalClassifiers; i++) { - cs_type = &psfLocalSet->cConvergenceSLTypes[i]; + for (i = 0; i < local_set->u8TotalClassifiers; i++) { + cs_type = &local_set->cConvergenceSLTypes[i]; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "cs_type->u8PhsDSCAction : 0x%x\n", cs_type->u8PhsDSCAction); @@ -794,24 +794,24 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* u32MaxSustainedTrafficRate == 0) { + if (local_set->u32MaxSustainedTrafficRate == 0) { /* No Rate Limit . Set Max Sustained Traffic Rate to Maximum */ curr_packinfo->uiMaxAllowedRate = WIMAX_MAX_ALLOWED_RATE; - } else if (ntohl(psfLocalSet->u32MaxSustainedTrafficRate) > WIMAX_MAX_ALLOWED_RATE) { + } else if (ntohl(local_set->u32MaxSustainedTrafficRate) > WIMAX_MAX_ALLOWED_RATE) { /* Too large Allowed Rate specified. Limiting to Wi Max Allowed rate */ curr_packinfo->uiMaxAllowedRate = WIMAX_MAX_ALLOWED_RATE; } else { curr_packinfo->uiMaxAllowedRate = - ntohl(psfLocalSet->u32MaxSustainedTrafficRate); + ntohl(local_set->u32MaxSustainedTrafficRate); } - curr_packinfo->uiMaxLatency = ntohl(psfLocalSet->u32MaximumLatency); + curr_packinfo->uiMaxLatency = ntohl(local_set->u32MaximumLatency); if (curr_packinfo->uiMaxLatency == 0) /* 0 should be treated as infinite */ curr_packinfo->uiMaxLatency = MAX_LATENCY_ALLOWED; if ((curr_packinfo->u8QueueType == ERTPS || curr_packinfo
[PATCH 46/57] Staging: bcm: CmHost.c: Renamed variable: "ulCntTargetBuffers" -> "n_target_buffs"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 53538d1..4c5850d 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1696,7 +1696,7 @@ failed_restore_sf_param: ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *ad) { ULONG target_dsx_buffers_base = 0; - ULONG ulCntTargetBuffers; + ULONG n_target_buffs; ULONG i; int Status; @@ -1729,12 +1729,12 @@ ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *ad) target_dsx_buffers_base); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Tgt Buffer is Now %lx :", target_dsx_buffers_base); - ulCntTargetBuffers = DSX_MESSAGE_EXCHANGE_BUFFER_SIZE / + n_target_buffs = DSX_MESSAGE_EXCHANGE_BUFFER_SIZE / sizeof(struct bcm_connect_mgr_params); ad->ulTotalTargetBuffersAvailable = - ulCntTargetBuffers > MAX_TARGET_DSX_BUFFERS ? - MAX_TARGET_DSX_BUFFERS : ulCntTargetBuffers; + n_target_buffs > MAX_TARGET_DSX_BUFFERS ? + MAX_TARGET_DSX_BUFFERS : n_target_buffs; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " Total Target DSX Buffer setup %lx ", -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 45/57] Staging: bcm: CmHost.c: Renamed variable: "ulTargetDsxBuffersBase" -> "target_dsx_buffers_base"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 0209408..53538d1 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1695,7 +1695,7 @@ failed_restore_sf_param: ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *ad) { - ULONG ulTargetDsxBuffersBase = 0; + ULONG target_dsx_buffers_base = 0; ULONG ulCntTargetBuffers; ULONG i; int Status; @@ -1717,7 +1717,7 @@ ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *ad) DSX_MESSAGE_EXCHANGE_BUFFER); Status = rdmalt(ad, DSX_MESSAGE_EXCHANGE_BUFFER, - (PUINT)&ulTargetDsxBuffersBase, sizeof(UINT)); + (PUINT)&target_dsx_buffers_base, sizeof(UINT)); if (Status < 0) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "RDM failed!!"); @@ -1726,9 +1726,9 @@ ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *ad) BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Base Address Of DSX Target Buffer : 0x%lx", - ulTargetDsxBuffersBase); + target_dsx_buffers_base); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, - "Tgt Buffer is Now %lx :", ulTargetDsxBuffersBase); + "Tgt Buffer is Now %lx :", target_dsx_buffers_base); ulCntTargetBuffers = DSX_MESSAGE_EXCHANGE_BUFFER_SIZE / sizeof(struct bcm_connect_mgr_params); @@ -1741,10 +1741,10 @@ ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *ad) ad->ulTotalTargetBuffersAvailable); for (i = 0; i < ad->ulTotalTargetBuffersAvailable; i++) { - ad->astTargetDsxBuffer[i].ulTargetDsxBuffer = ulTargetDsxBuffersBase; + ad->astTargetDsxBuffer[i].ulTargetDsxBuffer = target_dsx_buffers_base; ad->astTargetDsxBuffer[i].valid = 1; ad->astTargetDsxBuffer[i].tid = 0; - ulTargetDsxBuffersBase += sizeof(struct bcm_connect_mgr_params); + target_dsx_buffers_base += sizeof(struct bcm_connect_mgr_params); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " Target DSX Buffer %lx setup at 0x%lx", i, ad->astTargetDsxBuffer[i].ulTargetDsxBuffer); } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/57] Staging: bcm: CmHost.c: Renamed variable: "psfCSType" -> "cs_type"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 178 +-- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 6121cbc..afdf275 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -291,7 +291,7 @@ void ClearTargetDSXBuffer(struct bcm_mini_adapter *ad, B_UINT16 tid, bool free_a * copy classifier rule into the specified SF index */ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, - struct bcm_convergence_types *psfCSType, + struct bcm_convergence_types *cs_type, UINT search_rule_idx, UINT nClassifierIndex) { @@ -302,7 +302,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, /* ULONG ulPhsStatus; */ struct bcm_packet_class_rules *pack_class_rule = - &psfCSType->cCPacketClassificationRule; + &cs_type->cCPacketClassificationRule; if (ad->PackInfo[search_rule_idx].usVCID_Value == 0 || nClassifierIndex > (MAX_CLASSIFIERS-1)) @@ -553,7 +553,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* PackInfo[search_rule_idx]; @@ -642,20 +642,20 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* u8TotalClassifiers; i++) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Classifier index =%d", i); - psfCSType = &psfLocalSet->cConvergenceSLTypes[i]; + cs_type = &psfLocalSet->cConvergenceSLTypes[i]; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Classifier index =%d", i); - if (psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority) + if (cs_type->cCPacketClassificationRule.u8ClassifierRulePriority) curr_packinfo->bClassifierPriority = TRUE; - if (psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority) + if (cs_type->cCPacketClassificationRule.u8ClassifierRulePriority) curr_packinfo->bClassifierPriority = TRUE; if (ucDsxType == DSA_ACK) { eClassifierAction = eAddClassifier; } else if (ucDsxType == DSC_ACK) { - switch (psfCSType->u8ClassfierDSCAction) { + switch (cs_type->u8ClassfierDSCAction) { case 0: /* DSC Add Classifier */ eClassifierAction = eAddClassifier; break; @@ -670,7 +670,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* cCPacketClassificationRule.u16PacketClassificationRuleIndex); + u16PacketClassificationRuleIndex = ntohs(cs_type->cCPacketClassificationRule.u16PacketClassificationRuleIndex); switch (eClassifierAction) { case eAddClassifier: @@ -692,7 +692,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* u8TotalClassifiers; i++) { - psfCSType = &psfLocalSet->cConvergenceSLTypes[i]; + cs_type = &psfLocalSet->cConvergenceSLTypes[i]; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, - "psfCSType->u8PhsDSCAction : 0x%x\n", - psfCSType->u8PhsDSCAction); + "cs_type->u8PhsDSCAction : 0x%x\n", + cs_type->u8PhsDSCAction); - switch (psfCSType->u8PhsDSCAction) { + switch (cs_type->u8PhsDSCAction) { case eDeleteAllPHSRules: BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, @@ -765,15 +765,15 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* cPhsRule.u8PHSI) + if (cs_type->cPhsRule.u8PHSI) PhsDeletePHSRule(&ad->stBCMPhsContext, vcid, - psfCSType->cCPacketClassificationRule.u8AssociatedPHSI); + cs_type->cCPacketClassificationRule.u8AssociatedPHSI); break; default: if (ucDsxType == DSC_ACK) { - /* BCM_DEBUG_PRINT(CONN_MSG,("Invalid PHS DSC Action For DSC\n",psfCSType->cPhsRule.u8PHSI)); */ + /* BCM_DEBUG_PRINT(CONN_MSG,("Invalid PHS DSC Action For DSC\n",cs_type->cPhsRule.u8PHSI)); */ break; /* FOr DSC ACK Case PHS DSC Action must be in valid set */ } /* Proceed To Add PHS rule for DSA_ACK case
[PATCH 20/57] Staging: bcm: CmHost.c: Renamed variable: "TID" -> "tid"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 7349821..6121cbc 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -264,7 +264,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, } } -void ClearTargetDSXBuffer(struct bcm_mini_adapter *ad, B_UINT16 TID, bool free_all) +void ClearTargetDSXBuffer(struct bcm_mini_adapter *ad, B_UINT16 tid, bool free_all) { int i; struct bcm_targetdsx_buffer *curr_buf; @@ -275,10 +275,10 @@ void ClearTargetDSXBuffer(struct bcm_mini_adapter *ad, B_UINT16 TID, bool free_a if (curr_buf->valid) continue; - if ((free_all) || (curr_buf->tid == TID)) { + if ((free_all) || (curr_buf->tid == tid)) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "ClearTargetDSXBuffer: found tid %d buffer cleared %lx\n", - TID, curr_buf->ulTargetDsxBuffer); + tid, curr_buf->ulTargetDsxBuffer); curr_buf->valid = 1; curr_buf->tid = 0; ad->ulFreeTargetBufferCnt++; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 55/57] Staging: bcm: CmHost.c: Renamed variable: "uiClassifierIndex" -> "i"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index c93a244..3d72f56 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -2174,13 +2174,13 @@ static void apply_phs_rule_to_all_classifiers( struct bcm_phs_rules *c_phs_rules, struct bcm_add_indication_alt *add_indication) { - unsigned int uiClassifierIndex = 0; + unsigned int i = 0; struct bcm_classifier_rule *curr_classifier = NULL; if (add_indication->u8Direction == UPLINK_DIR) { - for (uiClassifierIndex = 0; uiClassifierIndex < MAX_CLASSIFIERS; uiClassifierIndex++) { + for (i = 0; i < MAX_CLASSIFIERS; i++) { curr_classifier = - &ad->astClassifierTable[uiClassifierIndex]; + &ad->astClassifierTable[i]; if ((curr_classifier->bUsed) && (curr_classifier->ulSFID == ad->PackInfo[search_rule_idx].ulSFID) && (curr_classifier->u8AssociatedPHSI == c_phs_rules->u8PHSI)) { -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 57/57] Staging: bcm: CmHost: Whitespace cleanup
This patch does some follow-up whitespace cleanup for lines which got more whitespace with the variable-rename patches. Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 106 +-- 1 file changed, 51 insertions(+), 55 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index eff1480..5ea0982 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -14,7 +14,7 @@ enum E_CLASSIFIER_ACTION { }; static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *ad, - B_UINT16 tid); +B_UINT16 tid); static void restore_endianess_of_classifier_entry( struct bcm_classifier_rule *classifier_entry, enum bcm_ipaddr_context ip_addr_context); @@ -80,8 +80,8 @@ static int SearchFreeSfid(struct bcm_mini_adapter *ad) * Return: int :Classifier table index of matching entry */ static int SearchClsid(struct bcm_mini_adapter *ad, - ULONG sf_id, - B_UINT16 classifier_id) + ULONG sf_id, + B_UINT16 classifier_id) { int i; @@ -113,8 +113,7 @@ static int SearchFreeClsid(struct bcm_mini_adapter *ad /**ad Context*/) return MAX_CLASSIFIERS+1; } -static VOID deleteSFBySfid(struct bcm_mini_adapter *ad, - UINT search_rule_idx) +static VOID deleteSFBySfid(struct bcm_mini_adapter *ad, UINT search_rule_idx) { /* deleting all the packet held in the SF */ flush_queue(ad, search_rule_idx); @@ -129,8 +128,10 @@ static VOID deleteSFBySfid(struct bcm_mini_adapter *ad, static inline VOID CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, - B_UINT8 ip_addr_len, B_UINT8 *ip_addr_mask_src, - bool ip_v6, enum bcm_ipaddr_context ip_addr_context) + B_UINT8 ip_addr_len, + B_UINT8 *ip_addr_mask_src, + bool ip_v6, + enum bcm_ipaddr_context ip_addr_context) { int i = 0; UINT ip_addr_byte_len = IP_LENGTH_OF_ADDRESS; @@ -162,26 +163,20 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, classifier_entry->ucIPDestinationAddressLength = ip_addr_len/(ip_addr_byte_len * 2); if (ip_v6) { - classifier_ip_addr = - st_dest_ip->ucIpv6Address; - classifier_ip_mask = - st_dest_ip->ucIpv6Mask; + classifier_ip_addr = st_dest_ip->ucIpv6Address; + classifier_ip_mask = st_dest_ip->ucIpv6Mask; } else { - classifier_ip_addr = - st_dest_ip->ucIpv4Address; - classifier_ip_mask = - st_dest_ip->ucIpv4Mask; + classifier_ip_addr = st_dest_ip->ucIpv4Address; + classifier_ip_mask = st_dest_ip->ucIpv4Mask; } } else if (ip_addr_context == eSrcIpAddress) { classifier_entry->ucIPSourceAddressLength = ip_addr_len/(ip_addr_byte_len * 2); if (ip_v6) { - classifier_ip_addr = - st_src_ip->ucIpv6Address; + classifier_ip_addr = st_src_ip->ucIpv6Address; classifier_ip_mask = st_src_ip->ucIpv6Mask; } else { - classifier_ip_addr = - st_src_ip->ucIpv4Address; + classifier_ip_addr = st_src_ip->ucIpv4Address; classifier_ip_mask = st_src_ip->ucIpv4Mask; } } @@ -190,11 +185,9 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, classifier_entry->ucIPDestinationAddressLength); while ((ip_addr_len >= ip_addr_byte_len) && (i < MAX_IP_RANGE_LENGTH)) { - memcpy(classifier_ip_addr + - (i * ip_addr_byte_len), - (ip_addr_mask_src - + (i * ip_addr_byte_len * 2)), - ip_addr_byte_len); + memcpy(classifier_ip_addr + (i * ip_addr_byte_len), + (ip_addr_mask_src + (i * ip_addr_byte_len * 2)), + ip_addr_byte_len); if (!ip_v6) {
[PATCH 04/57] Staging: bcm: CmHost.c: Renamed variable: "eIpAddrContext" -> "ip_addr_context"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index d8796a2..1e4af0b 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -17,7 +17,7 @@ static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *ad, B_UINT16 tid); static void restore_endianess_of_classifier_entry( struct bcm_classifier_rule *classifier_entry, - enum bcm_ipaddr_context eIpAddrContext); + enum bcm_ipaddr_context ip_addr_context); static void apply_phs_rule_to_all_classifiers( register struct bcm_mini_adapter *ad, @@ -130,7 +130,7 @@ static VOID deleteSFBySfid(struct bcm_mini_adapter *ad, static inline VOID CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, B_UINT8 u8IpAddressLen, B_UINT8 *pu8IpAddressMaskSrc, - bool bIpVersion6, enum bcm_ipaddr_context eIpAddrContext) + bool bIpVersion6, enum bcm_ipaddr_context ip_addr_context) { int i = 0; UINT nSizeOfIPAddressInBytes = IP_LENGTH_OF_ADDRESS; @@ -158,7 +158,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, * So length will be : TotalLengthInBytes/nSizeOfIPAddressInBytes * 2 * (nSizeOfIPAddressInBytes for address and nSizeOfIPAddressInBytes for mask) */ - if (eIpAddrContext == eDestIpAddress) { + if (ip_addr_context == eDestIpAddress) { classifier_entry->ucIPDestinationAddressLength = u8IpAddressLen/(nSizeOfIPAddressInBytes * 2); if (bIpVersion6) { @@ -172,7 +172,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, ptrClassifierIpMask = st_dest_ip->ucIpv4Mask; } - } else if (eIpAddrContext == eSrcIpAddress) { + } else if (ip_addr_context == eSrcIpAddress) { classifier_entry->ucIPSourceAddressLength = u8IpAddressLen/(nSizeOfIPAddressInBytes * 2); if (bIpVersion6) { @@ -197,7 +197,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, nSizeOfIPAddressInBytes); if (!bIpVersion6) { - if (eIpAddrContext == eSrcIpAddress) { + if (ip_addr_context == eSrcIpAddress) { st_src_ip->ulIpv4Addr[i] = ntohl(st_src_ip->ulIpv4Addr[i]); BCM_DEBUG_PRINT(ad, @@ -206,7 +206,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, DBG_LVL_ALL, "Src Ip Address:0x%luX ", st_src_ip->ulIpv4Addr[i]); - } else if (eIpAddrContext == eDestIpAddress) { + } else if (ip_addr_context == eDestIpAddress) { st_dest_ip->ulIpv4Addr[i] = ntohl(st_dest_ip->ulIpv4Addr[i]); BCM_DEBUG_PRINT(ad, @@ -227,7 +227,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, nSizeOfIPAddressInBytes); if (!bIpVersion6) { - if (eIpAddrContext == eSrcIpAddress) { + if (ip_addr_context == eSrcIpAddress) { st_src_ip->ulIpv4Mask[i] = ntohl(st_src_ip->ulIpv4Mask[i]); BCM_DEBUG_PRINT(ad, @@ -236,7 +236,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, DBG_LVL_ALL, "Src Ip Mask Address:0x%luX ", st_src_ip->ulIpv4Mask[i]); - } else if (eIpAddrContext == eDestIpAddress) { + } else if (ip_addr_context == eDestIpAddress) { st_dest_ip->ulIpv4Mask[i] = ntohl(st_dest_ip->ulIpv4Mask[i]); BCM_DEBUG_PRINT(ad, @
[PATCH 18/57] Staging: bcm: CmHost.c: Renamed variable: "ptrClassifierIpMask" -> "classifier_ip_mask"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index cea877e..65cea92 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -135,7 +135,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, int i = 0; UINT ip_addr_byte_len = IP_LENGTH_OF_ADDRESS; UCHAR *classifier_ip_addr = NULL; - UCHAR *ptrClassifierIpMask = NULL; + UCHAR *classifier_ip_mask = NULL; struct bcm_mini_adapter *ad = GET_BCM_ADAPTER(gblpnetdev); if (ip_v6) @@ -164,12 +164,12 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, if (ip_v6) { classifier_ip_addr = st_dest_ip->ucIpv6Address; - ptrClassifierIpMask = + classifier_ip_mask = st_dest_ip->ucIpv6Mask; } else { classifier_ip_addr = st_dest_ip->ucIpv4Address; - ptrClassifierIpMask = + classifier_ip_mask = st_dest_ip->ucIpv4Mask; } } else if (ip_addr_context == eSrcIpAddress) { @@ -178,11 +178,11 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, if (ip_v6) { classifier_ip_addr = st_src_ip->ucIpv6Address; - ptrClassifierIpMask = st_src_ip->ucIpv6Mask; + classifier_ip_mask = st_src_ip->ucIpv6Mask; } else { classifier_ip_addr = st_src_ip->ucIpv4Address; - ptrClassifierIpMask = st_src_ip->ucIpv4Mask; + classifier_ip_mask = st_src_ip->ucIpv4Mask; } } BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, @@ -219,7 +219,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, } ip_addr_len -= ip_addr_byte_len; if (ip_addr_len >= ip_addr_byte_len) { - memcpy(ptrClassifierIpMask + + memcpy(classifier_ip_mask + (i * ip_addr_byte_len), (ip_addr_mask_src + ip_addr_byte_len -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/57] Staging: bcm: CmHost.c: Renamed variable: "ulSFID" -> "sf_id"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 2a345da..6ae3601 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -80,7 +80,7 @@ static int SearchFreeSfid(struct bcm_mini_adapter *ad) * Return: int :Classifier table index of matching entry */ static int SearchClsid(struct bcm_mini_adapter *ad, - ULONG ulSFID, + ULONG sf_id, B_UINT16 uiClassifierID) { int i; @@ -89,7 +89,7 @@ static int SearchClsid(struct bcm_mini_adapter *ad, if ((ad->astClassifierTable[i].bUsed) && (ad->astClassifierTable[i].uiClassifierRuleIndex == uiClassifierID) && - (ad->astClassifierTable[i].ulSFID == ulSFID)) + (ad->astClassifierTable[i].ulSFID == sf_id)) return i; } @@ -548,7 +548,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* u32SFID); + sf_id = ntohl(psfLocalSet->u32SFID); /* Store IP Version used */ /* Get The Version Of IP used (IPv6 or IPv4) from CSSpecification field of SF */ @@ -677,7 +677,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* MAX_CLASSIFIERS) { @@ -707,7 +707,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* MAX_CLASSIFIERS) { /* Failed To search the classifier */ @@ -723,7 +723,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* MAX_CLASSIFIERS) { /* Failed To search the classifier */ @@ -1450,7 +1450,7 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *ad, struct bcm_add_indication *add_indication = NULL; struct bcm_del_request *pstDeletionRequest; UINT search_rule_idx; - ULONG ulSFID; + ULONG sf_id; pstAddIndicationAlt = pvBuffer; @@ -1461,8 +1461,8 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *ad, if (pstAddIndicationAlt->u8Type == DSD_REQ) { pstDeletionRequest = pvBuffer; - ulSFID = ntohl(pstDeletionRequest->u32SFID); - search_rule_idx = SearchSfid(ad, ulSFID); + sf_id = ntohl(pstDeletionRequest->u32SFID); + search_rule_idx = SearchSfid(ad, sf_id); if (search_rule_idx < NO_OF_QUEUES) { deleteSFBySfid(ad, search_rule_idx); @@ -1827,7 +1827,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *ad, /* PLength = sizeof(struct bcm_del_indication); *((struct bcm_del_indication *)&(ad->caDsxReqResp[LEADER_SIZE])) = *((struct bcm_del_indication *)add_indication); - ulSFID = ntohl(((struct bcm_del_indication *)add_indication)->u32SFID); - search_rule_idx = SearchSfid(ad, ulSFID); + sf_id = ntohl(((struct bcm_del_indication *)add_indication)->u32SFID); + search_rule_idx = SearchSfid(ad, sf_id); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "DSD - Removing connection %x", search_rule_idx); if (search_rule_idx < NO_OF_QUEUES) { @@ -2093,7 +2093,7 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *ad, B_UINT32 u32NumofSFsinMsg = ntohl(*(puiBuffer + 1)); struct bcm_stim_sfhostnotify *pHostInfo = NULL; UINT search_rule_idx = 0; - ULONG ulSFID = 0; + ULONG sf_id = 0; puiBuffer += 2; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, @@ -2104,17 +2104,17 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *ad, pHostInfo = (struct bcm_stim_sfhostnotify *)puiBuffer; puiBuffer = (PUINT)(pHostInfo + 1); - ulSFID = ntohl(pHostInfo->SFID); - search_rule_idx = SearchSfid(ad, ulSFID); + sf_id = ntohl(pHostInfo->SFID); + search_rule_idx = SearchSfid(ad, sf_id); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, - "SFID: 0x%lx\n", ulSFID); + "SFID: 0x%lx\n", sf_id); if (search_rule_idx >= NO_OF_QUEUES || search_rule_idx == HiPriority) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "The SFID <%lx> doesn't exist in host entry or is Invalid\n", - ulSFID); + sf_id); continue; } -- 2.1.0 ___ devel mailing list de...@linuxdrive
[PATCH 36/57] Staging: bcm: CmHost.c: Renamed variable: "pucDestBuffer" -> "dest_buff"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index d27759e..2838ffa 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1407,11 +1407,11 @@ static VOID DumpCmControlPacket(PVOID buffer) } static inline ULONG RestoreSFParam(struct bcm_mini_adapter *ad, - ULONG addr_sf_param_set, PUCHAR pucDestBuffer) + ULONG addr_sf_param_set, PUCHAR dest_buff) { UINT nBytesToRead = sizeof(struct bcm_connect_mgr_params); - if (addr_sf_param_set == 0 || NULL == pucDestBuffer) { + if (addr_sf_param_set == 0 || NULL == dest_buff) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Got Param address as 0!!"); return 0; @@ -1419,7 +1419,7 @@ static inline ULONG RestoreSFParam(struct bcm_mini_adapter *ad, addr_sf_param_set = ntohl(addr_sf_param_set); /* Read out the SF Param Set At the indicated Location */ - if (rdm(ad, addr_sf_param_set, (PUCHAR)pucDestBuffer, nBytesToRead) < 0) + if (rdm(ad, addr_sf_param_set, (PUCHAR)dest_buff, nBytesToRead) < 0) return STATUS_FAILURE; return 1; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 52/57] Staging: bcm: CmHost.c: Renamed variable: "pHostInfo" -> "host_info"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 38822fc..ac6ae01 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -2091,7 +2091,7 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *ad, PUINT buff) { B_UINT32 n_sf_sin_msg = ntohl(*(buff + 1)); - struct bcm_stim_sfhostnotify *pHostInfo = NULL; + struct bcm_stim_sfhostnotify *host_info = NULL; UINT search_rule_idx = 0; ULONG sf_id = 0; @@ -2101,10 +2101,10 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *ad, while (n_sf_sin_msg != 0 && n_sf_sin_msg < NO_OF_QUEUES) { n_sf_sin_msg--; - pHostInfo = (struct bcm_stim_sfhostnotify *)buff; - buff = (PUINT)(pHostInfo + 1); + host_info = (struct bcm_stim_sfhostnotify *)buff; + buff = (PUINT)(host_info + 1); - sf_id = ntohl(pHostInfo->SFID); + sf_id = ntohl(host_info->SFID); search_rule_idx = SearchSfid(ad, sf_id); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SFID: 0x%lx\n", sf_id); @@ -2118,7 +2118,7 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *ad, continue; } - if (pHostInfo->RetainSF == false) { + if (host_info->RetainSF == false) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Going to Delete SF"); deleteSFBySfid(ad, search_rule_idx); @@ -2126,20 +2126,20 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *ad, struct bcm_packet_info *packinfo = &ad->PackInfo[search_rule_idx]; - packinfo->usVCID_Value = ntohs(pHostInfo->VCID); - packinfo->usCID = ntohs(pHostInfo->newCID); + packinfo->usVCID_Value = ntohs(host_info->VCID); + packinfo->usCID = ntohs(host_info->newCID); packinfo->bActive = false; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, - "pHostInfo->QoSParamSet: 0x%x\n", - pHostInfo->QoSParamSet); + "host_info->QoSParamSet: 0x%x\n", + host_info->QoSParamSet); - if (pHostInfo->QoSParamSet & 0x1) + if (host_info->QoSParamSet & 0x1) packinfo->bAuthorizedSet = TRUE; - if (pHostInfo->QoSParamSet & 0x2) + if (host_info->QoSParamSet & 0x2) packinfo->bAdmittedSet = TRUE; - if (pHostInfo->QoSParamSet & 0x4) { + if (host_info->QoSParamSet & 0x4) { packinfo->bActiveSet = TRUE; packinfo->bActive = TRUE; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 31/57] Staging: bcm: CmHost.c: Renamed variable: "uiLoopIndex" -> "i"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index fe32beb..f6b8c16 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -887,7 +887,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* cCPacketClassificationRule.u8IPTypeOfService[1], cs_type->cCPacketClassificationRule.u8IPTypeOfService[2]); - for (uiLoopIndex = 0; uiLoopIndex < 1; uiLoopIndex++) + for (i = 0; i < 1; i++) BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Protocol: 0x%02X ", cs_type->cCPacketClassificationRule.u8Protocol); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddressLength: 0x%X ", cs_type->cCPacketClassificationRule.u8IPMaskedSourceAddressLength); - for (uiLoopIndex = 0; uiLoopIndex < 32; uiLoopIndex++) + for (i = 0; i < 32; i++) BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddress[32]: 0x%02X ", - cs_type->cCPacketClassificationRule.u8IPMaskedSourceAddress[uiLoopIndex]); + cs_type->cCPacketClassificationRule.u8IPMaskedSourceAddress[i]); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddressLength: 0x%X ", cs_type->cCPacketClassificationRule.u8IPDestinationAddressLength); - for (uiLoopIndex = 0; uiLoopIndex < 32; uiLoopIndex++) + for (i = 0; i < 32; i++) BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddress[32]: 0x%02X ", - cs_type->cCPacketClassificationRule.u8IPDestinationAddress[uiLoopIndex]); + cs_type->cCPacketClassificationRule.u8IPDestinationAddress[i]); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolSourcePortRangeLength:0x%X ", cs_type->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength); @@ -1128,22 +1128,22 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) DBG_LVL_ALL, "u8IPTypeOfService[3]: 0x%*ph", 3, cs_type->cCPacketClassificationRule. u8IPTypeOfService); - for (uiLoopIndex = 0; uiLoopIndex < 1; uiLoopIndex++) + for (i = 0; i < 1; i++) BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Protocol: 0x%02X ", cs_type->cCPacketClassificationRule.u8Protocol); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddressLength: 0x%02X ", cs_type->cCPacketClassificationRule.u8IPMaskedSourceAddressLength); - for (uiLoopIndex = 0; uiLoopIndex < 32; uiLoopIndex++) + for (i = 0; i < 32; i++) BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddress[32]: 0x%02X ", - cs_type->cCPacketClassificationRule.u8IPMaskedSourceAddress[uiLoopIndex]); + cs_type->cCPacketClassificationRule.u8IPMaskedSourceAddress[i]); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddressLength: 0x%02X ", cs_type->cCPacketClassificationRule.u8IPDestinationAddressLength); - for (uiLoopIndex = 0; uiLoopIndex < 32; uiLoopIndex++) + for (i = 0; i < 32; i++) BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddress[32]: 0x%02X ", - cs_type->cCPacketClassificationRule.u8IPDestinationAddress[uiLoopIndex]); + cs_type->cCPacketClassificationRule.u8IPDestinationAddress[i]); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolSourcePortRangeLength: 0x%02X ", cs_type->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength); @@ -1274,7 +1274,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) clsRule->u8IPTypeOfService[1], clsRule->u8IPTypeOfService[2]); - for (uiLoopIndex = 0; uiLoopIndex < 1; uiLoopIndex++) + for (i = 0; i < 1; i++) BCM_DEBUG_PRINT(ad, DBG_TYPE_
[PATCH 43/57] Staging: bcm: CmHost.c: Renamed variable: "ulStatus" -> "status"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 4840f71..5205662 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1574,7 +1574,7 @@ static inline struct bcm_add_indication_alt *RestoreCmControlResponseMessage(register struct bcm_mini_adapter *ad, register PVOID buffer) { - ULONG ulStatus = 0; + ULONG status = 0; struct bcm_add_indication *add_indication = NULL; struct bcm_add_indication_alt *pstAddIndicationDest = NULL; @@ -1638,10 +1638,10 @@ static inline struct bcm_add_indication_alt BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Restoring Active Set "); - ulStatus = RestoreSFParam(ad, + status = RestoreSFParam(ad, (ULONG)add_indication->psfActiveSet, (PUCHAR)&pstAddIndicationDest->sfActiveSet); - if (ulStatus != 1) + if (status != 1) goto failed_restore_sf_param; if (pstAddIndicationDest->sfActiveSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF) @@ -1650,10 +1650,10 @@ static inline struct bcm_add_indication_alt BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Restoring Admitted Set "); - ulStatus = RestoreSFParam(ad, + status = RestoreSFParam(ad, (ULONG)add_indication->psfAdmittedSet, (PUCHAR)&pstAddIndicationDest->sfAdmittedSet); - if (ulStatus != 1) + if (status != 1) goto failed_restore_sf_param; if (pstAddIndicationDest->sfAdmittedSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF) @@ -1662,10 +1662,10 @@ static inline struct bcm_add_indication_alt BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Restoring Authorized Set "); - ulStatus = RestoreSFParam(ad, + status = RestoreSFParam(ad, (ULONG)add_indication->psfAuthorizedSet, (PUCHAR)&pstAddIndicationDest->sfAuthorizedSet); - if (ulStatus != 1) + if (status != 1) goto failed_restore_sf_param; if (pstAddIndicationDest->sfAuthorizedSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF) -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 33/57] Staging: bcm: CmHost.c: Renamed variable: "nCurClassifierCnt" -> "curr_classifier_cnt"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index c2ff7a7..fd89715 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -890,7 +890,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) int i; int n; struct bcm_add_indication_alt *add_indication; - UINT nCurClassifierCnt; + UINT curr_classifier_cnt; struct bcm_mini_adapter *ad = GET_BCM_ADAPTER(gblpnetdev); add_indication = pvBuffer; @@ -962,15 +962,15 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) add_indication->sfAuthorizedSet.u8TrafficIndicationPreference); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Received: 0x%X", add_indication->sfAuthorizedSet.u8TotalClassifiers); - nCurClassifierCnt = add_indication->sfAuthorizedSet.u8TotalClassifiers; - if (nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF) - nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF; + curr_classifier_cnt = add_indication->sfAuthorizedSet.u8TotalClassifiers; + if (curr_classifier_cnt > MAX_CLASSIFIERS_IN_SF) + curr_classifier_cnt = MAX_CLASSIFIERS_IN_SF; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "add_indication->sfAuthorizedSet.bValid %d", add_indication->sfAuthorizedSet.bValid); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "add_indication->sfAuthorizedSet.u16MacOverhead %x", add_indication->sfAuthorizedSet.u16MacOverhead); if (!add_indication->sfAuthorizedSet.bValid) add_indication->sfAuthorizedSet.bValid = 1; - for (n = 0; n < nCurClassifierCnt; n++) { + for (n = 0; n < curr_classifier_cnt; n++) { struct bcm_convergence_types *cs_type = NULL; cs_type = &add_indication->sfAuthorizedSet.cConvergenceSLTypes[n]; @@ -,11 +,11 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) add_indication->sfAdmittedSet.u8TrafficIndicationPreference); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Received: 0x%X", add_indication->sfAdmittedSet.u8TotalClassifiers); - nCurClassifierCnt = add_indication->sfAdmittedSet.u8TotalClassifiers; - if (nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF) - nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF; + curr_classifier_cnt = add_indication->sfAdmittedSet.u8TotalClassifiers; + if (curr_classifier_cnt > MAX_CLASSIFIERS_IN_SF) + curr_classifier_cnt = MAX_CLASSIFIERS_IN_SF; - for (n = 0; n < nCurClassifierCnt; n++) { + for (n = 0; n < curr_classifier_cnt; n++) { struct bcm_convergence_types *cs_type = NULL; cs_type = &add_indication->sfAdmittedSet.cConvergenceSLTypes[n]; @@ -1248,11 +1248,11 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) add_indication->sfActiveSet.u8TrafficIndicationPreference); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Received: 0x%X", add_indication->sfActiveSet.u8TotalClassifiers); - nCurClassifierCnt = add_indication->sfActiveSet.u8TotalClassifiers; - if (nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF) - nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF; + curr_classifier_cnt = add_indication->sfActiveSet.u8TotalClassifiers; + if (curr_classifier_cnt > MAX_CLASSIFIERS_IN_SF) + curr_classifier_cnt = MAX_CLASSIFIERS_IN_SF; - for (n = 0; n < nCurClassifierCnt; n++) { + for (n = 0; n < curr_classifier_cnt; n++) { struct bcm_convergence_types *cs_type = NULL; struct bcm_packet_class_rules *clsRule = NULL; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 39/57] Staging: bcm: CmHost.c: Renamed variable: "nBytesToWrite" -> "bytes_to_write"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 328ba4d..67b770d 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1428,13 +1428,13 @@ static inline ULONG RestoreSFParam(struct bcm_mini_adapter *ad, static ULONG StoreSFParam(struct bcm_mini_adapter *ad, PUCHAR src_buff, ULONG addr_sf_param_set) { - UINT nBytesToWrite = sizeof(struct bcm_connect_mgr_params); + UINT bytes_to_write = sizeof(struct bcm_connect_mgr_params); int ret = 0; if (addr_sf_param_set == 0 || NULL == src_buff) return 0; - ret = wrm(ad, addr_sf_param_set, (u8 *)src_buff, nBytesToWrite); + ret = wrm(ad, addr_sf_param_set, (u8 *)src_buff, bytes_to_write); if (ret < 0) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "%s:%d WRM failed", __func__, __LINE__); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 49/57] Staging: bcm: CmHost.c: Renamed variable: "psSfInfo" -> "sf_info"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 0f3d2bb..7fae315 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -2062,7 +2062,7 @@ int get_dsx_sf_data_to_application(struct bcm_mini_adapter *ad, UINT sf_id, void __user *user_buffer) { int status = 0; - struct bcm_packet_info *psSfInfo = NULL; + struct bcm_packet_info *sf_info = NULL; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "status =%d", status); @@ -2074,9 +2074,9 @@ int get_dsx_sf_data_to_application(struct bcm_mini_adapter *ad, } BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "status =%d", status); - psSfInfo = &ad->PackInfo[status]; - if (psSfInfo->pstSFIndication - && copy_to_user(user_buffer, psSfInfo->pstSFIndication, + sf_info = &ad->PackInfo[status]; + if (sf_info->pstSFIndication + && copy_to_user(user_buffer, sf_info->pstSFIndication, sizeof(struct bcm_add_indication_alt))) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "copy to user failed SFID %d, present in queue !!!", -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/57] Staging: bcm: CmHost.c: Renamed variable: "pu8IpAddressMaskSrc" -> "ip_addr_mask_src"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index e8a5cc4..714d881 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -129,7 +129,7 @@ static VOID deleteSFBySfid(struct bcm_mini_adapter *ad, static inline VOID CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, - B_UINT8 ip_addr_len, B_UINT8 *pu8IpAddressMaskSrc, + B_UINT8 ip_addr_len, B_UINT8 *ip_addr_mask_src, bool bIpVersion6, enum bcm_ipaddr_context ip_addr_context) { int i = 0; @@ -192,7 +192,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, && (i < MAX_IP_RANGE_LENGTH)) { memcpy(ptrClassifierIpAddress + (i * nSizeOfIPAddressInBytes), - (pu8IpAddressMaskSrc + (ip_addr_mask_src + (i * nSizeOfIPAddressInBytes * 2)), nSizeOfIPAddressInBytes); @@ -221,7 +221,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, if (ip_addr_len >= nSizeOfIPAddressInBytes) { memcpy(ptrClassifierIpMask + (i * nSizeOfIPAddressInBytes), - (pu8IpAddressMaskSrc + (ip_addr_mask_src + nSizeOfIPAddressInBytes + (i * nSizeOfIPAddressInBytes * 2)), nSizeOfIPAddressInBytes); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 25/57] Staging: bcm: CmHost.c: Renamed variable: "pvPHsContext" -> "phs_context"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 252f0de..9fd4a4f 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -296,7 +296,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, UINT classifier_idx) { struct bcm_classifier_rule *classifier_entry = NULL; - /* VOID *pvPhsContext = NULL; */ + /* VOID *phs_context = NULL; */ int i; /* UCHAR ucProtocolLength=0; */ /* ULONG ulPhsStatus; */ @@ -478,7 +478,7 @@ static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *ad, struct bcm_classifier_rule *classifier_entry = NULL; B_UINT16 packet_classification_rule_idx; USHORT vcid; - /* VOID *pvPhsContext = NULL; */ + /* VOID *phs_context = NULL; */ /*ULONG ulPhsStatus; */ vcid = ad->PackInfo[search_rule_idx].usVCID_Value; @@ -514,7 +514,7 @@ VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *ad, int i; /* B_UINT16 packet_classification_rule_idx; */ USHORT ulVCID; - /* VOID *pvPhsContext = NULL; */ + /* VOID *phs_context = NULL; */ /* ULONG ulPhsStatus; */ ulVCID = ad->PackInfo[search_rule_idx].usVCID_Value; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 30/57] Staging: bcm: CmHost.c: Renamed variable: "UGIValue" -> "gi_value"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 5627326..fe32beb 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -558,7 +558,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* PackInfo[search_rule_idx]; USHORT vcid = curr_packinfo->usVCID_Value; - UINT UGIValue = 0; + UINT gi_value = 0; curr_packinfo->bValid = TRUE; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, @@ -811,10 +811,10 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* u8QueueType == ERTPS || curr_packinfo->u8QueueType == UGS)) - UGIValue = ntohs(local_set->u16UnsolicitedGrantInterval); + gi_value = ntohs(local_set->u16UnsolicitedGrantInterval); - if (UGIValue == 0) - UGIValue = DEFAULT_UG_INTERVAL; + if (gi_value == 0) + gi_value = DEFAULT_UG_INTERVAL; /* * For UGI based connections... @@ -823,7 +823,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* uiMaxBucketSize = - (DEFAULT_UGI_FACTOR*curr_packinfo->uiMaxAllowedRate*UGIValue)/1000; + (DEFAULT_UGI_FACTOR*curr_packinfo->uiMaxAllowedRate*gi_value)/1000; if (curr_packinfo->uiMaxBucketSize < WIMAX_MAX_MTU*8) { UINT UGIFactor = 0; @@ -832,11 +832,11 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* TokenCount), will get dropped. * 3. We can allow packets of MaxSize from Host->FW that can go out from FW in multiple SDUs by fragmentation at Wimax Layer */ - UGIFactor = (curr_packinfo->uiMaxLatency/UGIValue + 1); + UGIFactor = (curr_packinfo->uiMaxLatency/gi_value + 1); if (UGIFactor > DEFAULT_UGI_FACTOR) curr_packinfo->uiMaxBucketSize = - (UGIFactor*curr_packinfo->uiMaxAllowedRate*UGIValue)/1000; + (UGIFactor*curr_packinfo->uiMaxAllowedRate*gi_value)/1000; if (curr_packinfo->uiMaxBucketSize > WIMAX_MAX_MTU*8) curr_packinfo->uiMaxBucketSize = WIMAX_MAX_MTU*8; @@ -844,7 +844,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* uiMaxLatency, - UGIValue); + gi_value); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "uiMaxAllowedRate: 0x%x, u32MaxSustainedTrafficRate: 0x%x ,uiMaxBucketSize: 0x%x", curr_packinfo->uiMaxAllowedRate, -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/57] Staging: bcm: CmHost.c: Renamed variable: "u8IpAddressLen" -> "ip_addr_len"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index a180917..e8a5cc4 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -129,7 +129,7 @@ static VOID deleteSFBySfid(struct bcm_mini_adapter *ad, static inline VOID CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, - B_UINT8 u8IpAddressLen, B_UINT8 *pu8IpAddressMaskSrc, + B_UINT8 ip_addr_len, B_UINT8 *pu8IpAddressMaskSrc, bool bIpVersion6, enum bcm_ipaddr_context ip_addr_context) { int i = 0; @@ -143,9 +143,9 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, /* Destination Ip Address */ BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, - "Ip Address Range Length:0x%X ", u8IpAddressLen); + "Ip Address Range Length:0x%X ", ip_addr_len); if ((bIpVersion6 ? (IPV6_ADDRESS_SIZEINBYTES * MAX_IP_RANGE_LENGTH * 2) : - (TOTAL_MASKED_ADDRESS_IN_BYTES)) >= u8IpAddressLen) { + (TOTAL_MASKED_ADDRESS_IN_BYTES)) >= ip_addr_len) { union u_ip_address *st_dest_ip = &classifier_entry->stDestIpAddress; @@ -160,7 +160,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, */ if (ip_addr_context == eDestIpAddress) { classifier_entry->ucIPDestinationAddressLength = - u8IpAddressLen/(nSizeOfIPAddressInBytes * 2); + ip_addr_len/(nSizeOfIPAddressInBytes * 2); if (bIpVersion6) { ptrClassifierIpAddress = st_dest_ip->ucIpv6Address; @@ -174,7 +174,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, } } else if (ip_addr_context == eSrcIpAddress) { classifier_entry->ucIPSourceAddressLength = - u8IpAddressLen/(nSizeOfIPAddressInBytes * 2); + ip_addr_len/(nSizeOfIPAddressInBytes * 2); if (bIpVersion6) { ptrClassifierIpAddress = st_src_ip->ucIpv6Address; @@ -188,7 +188,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Address Length:0x%X\n", classifier_entry->ucIPDestinationAddressLength); - while ((u8IpAddressLen >= nSizeOfIPAddressInBytes) + while ((ip_addr_len >= nSizeOfIPAddressInBytes) && (i < MAX_IP_RANGE_LENGTH)) { memcpy(ptrClassifierIpAddress + (i * nSizeOfIPAddressInBytes), @@ -217,8 +217,8 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, st_dest_ip->ulIpv4Addr[i]); } } - u8IpAddressLen -= nSizeOfIPAddressInBytes; - if (u8IpAddressLen >= nSizeOfIPAddressInBytes) { + ip_addr_len -= nSizeOfIPAddressInBytes; + if (ip_addr_len >= nSizeOfIPAddressInBytes) { memcpy(ptrClassifierIpMask + (i * nSizeOfIPAddressInBytes), (pu8IpAddressMaskSrc @@ -247,9 +247,9 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, st_dest_ip->ulIpv4Mask[i]); } } - u8IpAddressLen -= nSizeOfIPAddressInBytes; + ip_addr_len -= nSizeOfIPAddressInBytes; } - if (u8IpAddressLen == 0) + if (ip_addr_len == 0) classifier_entry->bDestIpValid = TRUE; i++; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 23/57] Staging: bcm: CmHost.c: Renamed variable: "u16PacketClassificationRuleIndex" -> "packet_classification_rule_idx"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 102b4ed..0986b37 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -476,7 +476,7 @@ static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *ad, UINT search_rule_idx, UINT classifier_idx) { struct bcm_classifier_rule *classifier_entry = NULL; - B_UINT16 u16PacketClassificationRuleIndex; + B_UINT16 packet_classification_rule_idx; USHORT usVCID; /* VOID *pvPhsContext = NULL; */ /*ULONG ulPhsStatus; */ @@ -489,7 +489,7 @@ static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *ad, if (usVCID == 0) return; - u16PacketClassificationRuleIndex = + packet_classification_rule_idx = ad->astClassifierTable[classifier_idx].uiClassifierRuleIndex; classifier_entry = &ad->astClassifierTable[classifier_idx]; if (classifier_entry) { @@ -500,7 +500,7 @@ static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *ad, /* Delete the PHS Rule for this classifier */ PhsDeleteClassifierRule(&ad->stBCMPhsContext, usVCID, - u16PacketClassificationRuleIndex); + packet_classification_rule_idx); } } @@ -512,7 +512,7 @@ VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *ad, { struct bcm_classifier_rule *classifier_entry = NULL; int i; - /* B_UINT16 u16PacketClassificationRuleIndex; */ + /* B_UINT16 packet_classification_rule_idx; */ USHORT ulVCID; /* VOID *pvPhsContext = NULL; */ /* ULONG ulPhsStatus; */ @@ -551,7 +551,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* cCPacketClassificationRule.u16PacketClassificationRuleIndex); + packet_classification_rule_idx = ntohs(cs_type->cCPacketClassificationRule.u16PacketClassificationRuleIndex); switch (eClassifierAction) { case eAddClassifier: @@ -678,7 +678,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* MAX_CLASSIFIERS) { classifier_idx = SearchFreeClsid(ad); @@ -701,14 +701,14 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* MAX_CLASSIFIERS) { /* Failed To search the classifier */ BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, @@ -724,7 +724,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* MAX_CLASSIFIERS) { /* Failed To search the classifier */ BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, @@ -1046,7 +1046,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16UserPriority: 0x%X ", cs_type->cCPacketClassificationRule.u16UserPriority); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16VLANID: 0x%X ", cs_type->cCPacketClassificationRule.u16VLANID); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8AssociatedPHSI: 0x%02X ", cs_type->cCPacketClassificationRule.u8AssociatedPHSI); - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16PacketClassificationRuleIndex: 0x%X ", + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "packet_classification_rule_idx: 0x%X ", cs_type->cCPacketClassificationRule.u16PacketClassificationRuleIndex); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificClassifierParamLength: 0x%X ", @@ -1186,7 +1186,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16UserPriority: 0x%X ", cs_type->cCPacketClassificationRule.u16UserPriority); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16VLANID: 0x%X ", cs_type->cCPacketClassificationRule.u16VLANID); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8AssociatedPHSI: 0x%02X ", cs_type->cCPacketClassificationRule.u8AssociatedPHSI); - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16PacketClassificationRuleIndex: 0x%X ", + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "packet_classification_rule_idx: 0x%X ", cs_type->cCPacketClassificationRule.u16PacketClassificationRuleIndex); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificClassifierParamLength: 0x%02X",
[PATCH 54/57] Staging: bcm: CmHost.c: Renamed variable: "stDest" -> "dest"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 989495d..c93a244 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -2153,15 +2153,15 @@ static void restore_endianess_of_classifier_entry( { int i; union u_ip_address *src = &classifier_entry->stSrcIpAddress; - union u_ip_address *stDest = &classifier_entry->stDestIpAddress; + union u_ip_address *dest = &classifier_entry->stDestIpAddress; for (i = 0; i < MAX_IP_RANGE_LENGTH * 4; i++) { if (ip_addr_context == eSrcIpAddress) { src->ulIpv6Addr[i] = ntohl(src->ulIpv6Addr[i]); src->ulIpv6Mask[i] = ntohl(src->ulIpv6Mask[i]); } else if (ip_addr_context == eDestIpAddress) { - stDest->ulIpv6Addr[i] = ntohl(stDest->ulIpv6Addr[i]); - stDest->ulIpv6Mask[i] = ntohl(stDest->ulIpv6Mask[i]); + dest->ulIpv6Addr[i] = ntohl(dest->ulIpv6Addr[i]); + dest->ulIpv6Mask[i] = ntohl(dest->ulIpv6Mask[i]); } } } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 26/57] Staging: bcm: CmHost.c: Renamed variable: "ulPhsStatus" -> "phs_status"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 9fd4a4f..e8416dc 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -299,7 +299,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, /* VOID *phs_context = NULL; */ int i; /* UCHAR ucProtocolLength=0; */ - /* ULONG ulPhsStatus; */ + /* ULONG phs_status; */ struct bcm_packet_class_rules *pack_class_rule = &cs_type->cCPacketClassificationRule; @@ -479,7 +479,7 @@ static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *ad, B_UINT16 packet_classification_rule_idx; USHORT vcid; /* VOID *phs_context = NULL; */ - /*ULONG ulPhsStatus; */ + /*ULONG phs_status; */ vcid = ad->PackInfo[search_rule_idx].usVCID_Value; @@ -515,7 +515,7 @@ VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *ad, /* B_UINT16 packet_classification_rule_idx; */ USHORT ulVCID; /* VOID *phs_context = NULL; */ - /* ULONG ulPhsStatus; */ + /* ULONG phs_status; */ ulVCID = ad->PackInfo[search_rule_idx].usVCID_Value; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/57] Staging: bcm: CmHost.c: Renamed variable: "bIpVersion6" -> "ip_v6"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 714d881..fe4c164 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -130,7 +130,7 @@ static VOID deleteSFBySfid(struct bcm_mini_adapter *ad, static inline VOID CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, B_UINT8 ip_addr_len, B_UINT8 *ip_addr_mask_src, - bool bIpVersion6, enum bcm_ipaddr_context ip_addr_context) + bool ip_v6, enum bcm_ipaddr_context ip_addr_context) { int i = 0; UINT nSizeOfIPAddressInBytes = IP_LENGTH_OF_ADDRESS; @@ -138,13 +138,13 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, UCHAR *ptrClassifierIpMask = NULL; struct bcm_mini_adapter *ad = GET_BCM_ADAPTER(gblpnetdev); - if (bIpVersion6) + if (ip_v6) nSizeOfIPAddressInBytes = IPV6_ADDRESS_SIZEINBYTES; /* Destination Ip Address */ BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Ip Address Range Length:0x%X ", ip_addr_len); - if ((bIpVersion6 ? (IPV6_ADDRESS_SIZEINBYTES * MAX_IP_RANGE_LENGTH * 2) : + if ((ip_v6 ? (IPV6_ADDRESS_SIZEINBYTES * MAX_IP_RANGE_LENGTH * 2) : (TOTAL_MASKED_ADDRESS_IN_BYTES)) >= ip_addr_len) { union u_ip_address *st_dest_ip = @@ -161,7 +161,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, if (ip_addr_context == eDestIpAddress) { classifier_entry->ucIPDestinationAddressLength = ip_addr_len/(nSizeOfIPAddressInBytes * 2); - if (bIpVersion6) { + if (ip_v6) { ptrClassifierIpAddress = st_dest_ip->ucIpv6Address; ptrClassifierIpMask = @@ -175,7 +175,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, } else if (ip_addr_context == eSrcIpAddress) { classifier_entry->ucIPSourceAddressLength = ip_addr_len/(nSizeOfIPAddressInBytes * 2); - if (bIpVersion6) { + if (ip_v6) { ptrClassifierIpAddress = st_src_ip->ucIpv6Address; ptrClassifierIpMask = st_src_ip->ucIpv6Mask; @@ -196,7 +196,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, + (i * nSizeOfIPAddressInBytes * 2)), nSizeOfIPAddressInBytes); - if (!bIpVersion6) { + if (!ip_v6) { if (ip_addr_context == eSrcIpAddress) { st_src_ip->ulIpv4Addr[i] = ntohl(st_src_ip->ulIpv4Addr[i]); @@ -226,7 +226,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, + (i * nSizeOfIPAddressInBytes * 2)), nSizeOfIPAddressInBytes); - if (!bIpVersion6) { + if (!ip_v6) { if (ip_addr_context == eSrcIpAddress) { st_src_ip->ulIpv4Mask[i] = ntohl(st_src_ip->ulIpv4Mask[i]); @@ -254,7 +254,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, i++; } - if (bIpVersion6) { + if (ip_v6) { /* Restore EndianNess of Struct */ restore_endianess_of_classifier_entry( classifier_entry, -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 51/57] Staging: bcm: CmHost.c: Renamed variable: "u32NumofSFsinMsg" -> "n_sf_sin_msg"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 58c70b5..38822fc 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -2090,17 +2090,17 @@ int get_dsx_sf_data_to_application(struct bcm_mini_adapter *ad, VOID OverrideServiceFlowParams(struct bcm_mini_adapter *ad, PUINT buff) { - B_UINT32 u32NumofSFsinMsg = ntohl(*(buff + 1)); + B_UINT32 n_sf_sin_msg = ntohl(*(buff + 1)); struct bcm_stim_sfhostnotify *pHostInfo = NULL; UINT search_rule_idx = 0; ULONG sf_id = 0; buff += 2; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, - "u32NumofSFsinMsg: 0x%x\n", u32NumofSFsinMsg); + "n_sf_sin_msg: 0x%x\n", n_sf_sin_msg); - while (u32NumofSFsinMsg != 0 && u32NumofSFsinMsg < NO_OF_QUEUES) { - u32NumofSFsinMsg--; + while (n_sf_sin_msg != 0 && n_sf_sin_msg < NO_OF_QUEUES) { + n_sf_sin_msg--; pHostInfo = (struct bcm_stim_sfhostnotify *)buff; buff = (PUINT)(pHostInfo + 1); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/57] Staging: bcm: CmHost.c: Renamed variable: "uVCID" -> "vcid"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index de28a20..f6edf3e 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -22,7 +22,7 @@ static void restore_endianess_of_classifier_entry( static void apply_phs_rule_to_all_classifiers( register struct bcm_mini_adapter *ad, register UINT search_rule_idx, - USHORT uVCID, + USHORT vcid, struct bcm_phs_rule *sPhsRule, struct bcm_phs_rules *cPhsRule, struct bcm_add_indication_alt *pstAddIndication); @@ -557,7 +557,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* PackInfo[search_rule_idx]; - USHORT uVCID = curr_packinfo->usVCID_Value; + USHORT vcid = curr_packinfo->usVCID_Value; UINT UGIValue = 0; curr_packinfo->bValid = TRUE; @@ -755,10 +755,10 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* stBCMPhsContext, uVCID); + PhsDeleteSFRules(&ad->stBCMPhsContext, vcid); break; case eDeletePHSRule: BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, @@ -767,7 +767,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* cPhsRule.u8PHSI) PhsDeletePHSRule(&ad->stBCMPhsContext, - uVCID, + vcid, psfCSType->cCPacketClassificationRule.u8AssociatedPHSI); break; @@ -785,7 +785,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* cPhsRule, pstAddIndication); @@ -2169,7 +2169,7 @@ static void restore_endianess_of_classifier_entry( static void apply_phs_rule_to_all_classifiers( register struct bcm_mini_adapter *ad, /* stBCMPhsContext, - uVCID, + vcid, curr_classifier->uiClassifierRuleIndex, sPhsRule, curr_classifier->u8AssociatedPHSI); @@ -2246,7 +2246,7 @@ static void apply_phs_rule_to_all_classifiers( */ PhsUpdateClassifierRule( &ad->stBCMPhsContext, - uVCID, + vcid, sPhsRule->u8PHSI, sPhsRule, sPhsRule->u8PHSI); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/57] Staging: bcm: CmHost.c: Renamed variable: "uiSearchRuleIndex" -> "search_rule_idx"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 172 +-- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 1e4af0b..de28a20 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -21,7 +21,7 @@ static void restore_endianess_of_classifier_entry( static void apply_phs_rule_to_all_classifiers( register struct bcm_mini_adapter *ad, - register UINT uiSearchRuleIndex, + register UINT search_rule_idx, USHORT uVCID, struct bcm_phs_rule *sPhsRule, struct bcm_phs_rules *cPhsRule, @@ -114,16 +114,16 @@ static int SearchFreeClsid(struct bcm_mini_adapter *ad /**ad Context*/) } static VOID deleteSFBySfid(struct bcm_mini_adapter *ad, - UINT uiSearchRuleIndex) + UINT search_rule_idx) { /* deleting all the packet held in the SF */ - flush_queue(ad, uiSearchRuleIndex); + flush_queue(ad, search_rule_idx); /* Deleting the all classifiers for this SF */ - DeleteAllClassifiersForSF(ad, uiSearchRuleIndex); + DeleteAllClassifiersForSF(ad, search_rule_idx); /* Resetting only MIBS related entries in the SF */ - memset((PVOID)&ad->PackInfo[uiSearchRuleIndex], 0, + memset((PVOID)&ad->PackInfo[search_rule_idx], 0, sizeof(struct bcm_mibs_table)); } @@ -292,7 +292,7 @@ void ClearTargetDSXBuffer(struct bcm_mini_adapter *ad, B_UINT16 TID, bool bFreeA */ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, struct bcm_convergence_types *psfCSType, - UINT uiSearchRuleIndex, + UINT search_rule_idx, UINT nClassifierIndex) { struct bcm_classifier_rule *classifier_entry = NULL; @@ -304,7 +304,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, struct bcm_packet_class_rules *pack_class_rule = &psfCSType->cCPacketClassificationRule; - if (ad->PackInfo[uiSearchRuleIndex].usVCID_Value == 0 || + if (ad->PackInfo[search_rule_idx].usVCID_Value == 0 || nClassifierIndex > (MAX_CLASSIFIERS-1)) return; @@ -319,7 +319,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, if (classifier_entry) { /* Store if Ipv6 */ classifier_entry->bIpv6Protocol = - (ad->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? TRUE : false; + (ad->PackInfo[search_rule_idx].ucIpVersion == IPV6) ? TRUE : false; /* Destinaiton Port */ classifier_entry->ucDestPortRangeLength = @@ -377,7 +377,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, CopyIpAddrToClassifier(classifier_entry, pack_class_rule->u8IPDestinationAddressLength, pack_class_rule->u8IPDestinationAddress, - (ad->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? + (ad->PackInfo[search_rule_idx].ucIpVersion == IPV6) ? TRUE : false, eDestIpAddress); /* Source Ip Address and Mask */ @@ -387,7 +387,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, CopyIpAddrToClassifier(classifier_entry, pack_class_rule->u8IPMaskedSourceAddressLength, pack_class_rule->u8IPMaskedSourceAddress, - (ad->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? TRUE : false, + (ad->PackInfo[search_rule_idx].ucIpVersion == IPV6) ? TRUE : false, eSrcIpAddress); /* TOS */ @@ -418,16 +418,16 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, /* store the classifier rule ID and set this classifier entry as valid */ classifier_entry->ucDirection = - ad->PackInfo[uiSearchRuleIndex].ucDirection; + ad->PackInfo[search_rule_idx].ucDirection; classifier_entry->uiClassifierRuleIndex = ntohs(pack_class_rule->u16PacketClassificationRuleIndex); classifier_entry->usVCID_Value = - ad->PackInfo[uiSearchRuleIndex].usVCID_Value; + ad->PackInfo[search_rule_idx].usVCID_Value; classifier_entry->ulSFID = - ad->PackInfo[uiSearchRuleIndex].ulSFID; + ad->PackInfo[search_rule_idx].ulSFID; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Sear
[PATCH 50/57] Staging: bcm: CmHost.c: Renamed variable: "puiBuffer" -> "buff"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 7fae315..58c70b5 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -2088,21 +2088,21 @@ int get_dsx_sf_data_to_application(struct bcm_mini_adapter *ad, } VOID OverrideServiceFlowParams(struct bcm_mini_adapter *ad, - PUINT puiBuffer) + PUINT buff) { - B_UINT32 u32NumofSFsinMsg = ntohl(*(puiBuffer + 1)); + B_UINT32 u32NumofSFsinMsg = ntohl(*(buff + 1)); struct bcm_stim_sfhostnotify *pHostInfo = NULL; UINT search_rule_idx = 0; ULONG sf_id = 0; - puiBuffer += 2; + buff += 2; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "u32NumofSFsinMsg: 0x%x\n", u32NumofSFsinMsg); while (u32NumofSFsinMsg != 0 && u32NumofSFsinMsg < NO_OF_QUEUES) { u32NumofSFsinMsg--; - pHostInfo = (struct bcm_stim_sfhostnotify *)puiBuffer; - puiBuffer = (PUINT)(pHostInfo + 1); + pHostInfo = (struct bcm_stim_sfhostnotify *)buff; + buff = (PUINT)(pHostInfo + 1); sf_id = ntohl(pHostInfo->SFID); search_rule_idx = SearchSfid(ad, sf_id); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 32/57] Staging: bcm: CmHost.c: Renamed variable: "nIndex" -> "n"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index f6b8c16..c2ff7a7 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -888,7 +888,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* sfAuthorizedSet.u16MacOverhead %x", add_indication->sfAuthorizedSet.u16MacOverhead); if (!add_indication->sfAuthorizedSet.bValid) add_indication->sfAuthorizedSet.bValid = 1; - for (nIndex = 0; nIndex < nCurClassifierCnt; nIndex++) { + for (n = 0; n < nCurClassifierCnt; n++) { struct bcm_convergence_types *cs_type = NULL; - cs_type = &add_indication->sfAuthorizedSet.cConvergenceSLTypes[nIndex]; + cs_type = &add_indication->sfAuthorizedSet.cConvergenceSLTypes[n]; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "cs_type = %p", cs_type); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "CCPacketClassificationRuleSI>"); @@ -1115,10 +1115,10 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) if (nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF) nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF; - for (nIndex = 0; nIndex < nCurClassifierCnt; nIndex++) { + for (n = 0; n < nCurClassifierCnt; n++) { struct bcm_convergence_types *cs_type = NULL; - cs_type = &add_indication->sfAdmittedSet.cConvergenceSLTypes[nIndex]; + cs_type = &add_indication->sfAdmittedSet.cConvergenceSLTypes[n]; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " CCPacketClassificationRuleSI>"); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ClassifierRulePriority: 0x%02X ", cs_type->cCPacketClassificationRule.u8ClassifierRulePriority); @@ -1252,11 +1252,11 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) if (nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF) nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF; - for (nIndex = 0; nIndex < nCurClassifierCnt; nIndex++) { + for (n = 0; n < nCurClassifierCnt; n++) { struct bcm_convergence_types *cs_type = NULL; struct bcm_packet_class_rules *clsRule = NULL; - cs_type = &add_indication->sfActiveSet.cConvergenceSLTypes[nIndex]; + cs_type = &add_indication->sfActiveSet.cConvergenceSLTypes[n]; clsRule = &cs_type->cCPacketClassificationRule; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 28/57] Staging: bcm: CmHost.c: Renamed variable: "ucDsxType" -> "dsx_type"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 13d6344..6f8a96e 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -544,7 +544,7 @@ VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *ad, static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* cCPacketClassificationRule.u8ClassifierRulePriority) curr_packinfo->bClassifierPriority = TRUE; - if (ucDsxType == DSA_ACK) { + if (dsx_type == DSA_ACK) { eClassifierAction = eAddClassifier; - } else if (ucDsxType == DSC_ACK) { + } else if (dsx_type == DSC_ACK) { switch (cs_type->u8ClassfierDSCAction) { case 0: /* DSC Add Classifier */ eClassifierAction = eAddClassifier; @@ -772,7 +772,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* cPhsRule.u8PHSI)); */ break; /* FOr DSC ACK Case PHS DSC Action must be in valid set */ } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 22/57] Staging: bcm: CmHost.c: Renamed variable: "nClassifierIndex" -> "classifier_idx"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index afdf275..102b4ed 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -293,7 +293,7 @@ void ClearTargetDSXBuffer(struct bcm_mini_adapter *ad, B_UINT16 tid, bool free_a static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, struct bcm_convergence_types *cs_type, UINT search_rule_idx, - UINT nClassifierIndex) + UINT classifier_idx) { struct bcm_classifier_rule *classifier_entry = NULL; /* VOID *pvPhsContext = NULL; */ @@ -305,17 +305,17 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, &cs_type->cCPacketClassificationRule; if (ad->PackInfo[search_rule_idx].usVCID_Value == 0 || - nClassifierIndex > (MAX_CLASSIFIERS-1)) + classifier_idx > (MAX_CLASSIFIERS-1)) return; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Storing Classifier Rule Index : %X", ntohs(pack_class_rule->u16PacketClassificationRuleIndex)); - if (nClassifierIndex > MAX_CLASSIFIERS-1) + if (classifier_idx > MAX_CLASSIFIERS-1) return; - classifier_entry = &ad->astClassifierTable[nClassifierIndex]; + classifier_entry = &ad->astClassifierTable[classifier_idx]; if (classifier_entry) { /* Store if Ipv6 */ classifier_entry->bIpv6Protocol = @@ -473,7 +473,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *ad, * @ingroup ctrl_pkt_functions */ static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *ad, - UINT search_rule_idx, UINT nClassifierIndex) + UINT search_rule_idx, UINT classifier_idx) { struct bcm_classifier_rule *classifier_entry = NULL; B_UINT16 u16PacketClassificationRuleIndex; @@ -483,15 +483,15 @@ static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *ad, usVCID = ad->PackInfo[search_rule_idx].usVCID_Value; - if (nClassifierIndex > MAX_CLASSIFIERS-1) + if (classifier_idx > MAX_CLASSIFIERS-1) return; if (usVCID == 0) return; u16PacketClassificationRuleIndex = - ad->astClassifierTable[nClassifierIndex].uiClassifierRuleIndex; - classifier_entry = &ad->astClassifierTable[nClassifierIndex]; + ad->astClassifierTable[classifier_idx].uiClassifierRuleIndex; + classifier_entry = &ad->astClassifierTable[classifier_idx]; if (classifier_entry) { classifier_entry->bUsed = false; classifier_entry->uiClassifierRuleIndex = 0; @@ -549,7 +549,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* MAX_CLASSIFIERS) { - nClassifierIndex = SearchFreeClsid(ad); - if (nClassifierIndex > MAX_CLASSIFIERS) { + if (classifier_idx > MAX_CLASSIFIERS) { + classifier_idx = SearchFreeClsid(ad); + if (classifier_idx > MAX_CLASSIFIERS) { /* Failed To get a free Entry */ BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, @@ -694,7 +694,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* MAX_CLASSIFIERS) { + if (classifier_idx > MAX_CLASSIFIERS) { /* Failed To search the classifier */ BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, @@ -718,14 +718,14 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* MAX_CLASSIFIERS) { + if (classifier_idx > MAX_CLASSIFIERS) { /* Failed To search the classifier */ BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, @@ -735,7 +735,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 37/57] Staging: bcm: CmHost.c: Renamed variable: "nBytesToRead" -> "bytes_to_read"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 2838ffa..e9e0a3c 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1409,7 +1409,7 @@ static VOID DumpCmControlPacket(PVOID buffer) static inline ULONG RestoreSFParam(struct bcm_mini_adapter *ad, ULONG addr_sf_param_set, PUCHAR dest_buff) { - UINT nBytesToRead = sizeof(struct bcm_connect_mgr_params); + UINT bytes_to_read = sizeof(struct bcm_connect_mgr_params); if (addr_sf_param_set == 0 || NULL == dest_buff) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, @@ -1419,7 +1419,7 @@ static inline ULONG RestoreSFParam(struct bcm_mini_adapter *ad, addr_sf_param_set = ntohl(addr_sf_param_set); /* Read out the SF Param Set At the indicated Location */ - if (rdm(ad, addr_sf_param_set, (PUCHAR)dest_buff, nBytesToRead) < 0) + if (rdm(ad, addr_sf_param_set, (PUCHAR)dest_buff, bytes_to_read) < 0) return STATUS_FAILURE; return 1; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 48/57] Staging: bcm: CmHost.c: Renamed variable: "uiSFId" -> "sf_id"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index dce9c8d..0f3d2bb 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -2059,17 +2059,17 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *ad, /* = NO_OF_QUEUES) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, - "SFID %d not present in queue !!!", uiSFId); + "SFID %d not present in queue !!!", sf_id); return -EINVAL; } BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, @@ -2080,7 +2080,7 @@ int get_dsx_sf_data_to_application(struct bcm_mini_adapter *ad, sizeof(struct bcm_add_indication_alt))) { BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "copy to user failed SFID %d, present in queue !!!", - uiSFId); + sf_id); status = -EFAULT; return status; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 42/57] Staging: bcm: CmHost.c: Renamed variable: "pstDeletionRequest" -> "del_request"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index dd20862..4840f71 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1448,7 +1448,7 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *ad, { struct bcm_add_indication_alt *add_indication_alt = NULL; struct bcm_add_indication *add_indication = NULL; - struct bcm_del_request *pstDeletionRequest; + struct bcm_del_request *del_request; UINT search_rule_idx; ULONG sf_id; @@ -1459,9 +1459,9 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *ad, * we can stop the further classifying the pkt for this SF. */ if (add_indication_alt->u8Type == DSD_REQ) { - pstDeletionRequest = buffer; + del_request = buffer; - sf_id = ntohl(pstDeletionRequest->u32SFID); + sf_id = ntohl(del_request->u32SFID); search_rule_idx = SearchSfid(ad, sf_id); if (search_rule_idx < NO_OF_QUEUES) { -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 41/57] Staging: bcm: CmHost.c: Renamed variable: "pstAddIndicationAlt" -> "add_indication_alt"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 48 ++-- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index ec7366e..dd20862 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1446,19 +1446,19 @@ static ULONG StoreSFParam(struct bcm_mini_adapter *ad, PUCHAR src_buff, ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *ad, PVOID buffer, UINT *buff_len) { - struct bcm_add_indication_alt *pstAddIndicationAlt = NULL; + struct bcm_add_indication_alt *add_indication_alt = NULL; struct bcm_add_indication *add_indication = NULL; struct bcm_del_request *pstDeletionRequest; UINT search_rule_idx; ULONG sf_id; - pstAddIndicationAlt = buffer; + add_indication_alt = buffer; /* * In case of DSD Req By MS, we should immediately delete this SF so that * we can stop the further classifying the pkt for this SF. */ - if (pstAddIndicationAlt->u8Type == DSD_REQ) { + if (add_indication_alt->u8Type == DSD_REQ) { pstDeletionRequest = buffer; sf_id = ntohl(pstDeletionRequest->u32SFID); @@ -1471,8 +1471,8 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *ad, return 1; } - if ((pstAddIndicationAlt->u8Type == DSD_RSP) || - (pstAddIndicationAlt->u8Type == DSD_ACK)) { + if ((add_indication_alt->u8Type == DSD_RSP) || + (add_indication_alt->u8Type == DSD_ACK)) { /* No Special handling send the message as it is */ return 1; } @@ -1486,13 +1486,13 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *ad, /* AUTHORIZED SET */ add_indication->psfAuthorizedSet = (struct bcm_connect_mgr_params *) GetNextTargetBufferLocation(ad, - pstAddIndicationAlt->u16TID); + add_indication_alt->u16TID); if (!add_indication->psfAuthorizedSet) { kfree(add_indication); return 0; } - if (StoreSFParam(ad, (PUCHAR)&pstAddIndicationAlt->sfAuthorizedSet, + if (StoreSFParam(ad, (PUCHAR)&add_indication_alt->sfAuthorizedSet, (ULONG)add_indication->psfAuthorizedSet) != 1) { kfree(add_indication); return 0; @@ -1503,14 +1503,14 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *ad, (struct bcm_connect_mgr_params *) ntohl( (ULONG)add_indication->psfAuthorizedSet); - if (pstAddIndicationAlt->u8Type == DSA_REQ) { + if (add_indication_alt->u8Type == DSA_REQ) { struct bcm_add_request AddRequest; - AddRequest.u8Type = pstAddIndicationAlt->u8Type; - AddRequest.eConnectionDir = pstAddIndicationAlt->u8Direction; - AddRequest.u16TID = pstAddIndicationAlt->u16TID; - AddRequest.u16CID = pstAddIndicationAlt->u16CID; - AddRequest.u16VCID = pstAddIndicationAlt->u16VCID; + AddRequest.u8Type = add_indication_alt->u8Type; + AddRequest.eConnectionDir = add_indication_alt->u8Direction; + AddRequest.u16TID = add_indication_alt->u16TID; + AddRequest.u16CID = add_indication_alt->u16CID; + AddRequest.u16VCID = add_indication_alt->u16VCID; AddRequest.psfParameterSet = add_indication->psfAuthorizedSet; (*buff_len) = sizeof(struct bcm_add_request); memcpy(buffer, &AddRequest, sizeof(struct bcm_add_request)); @@ -1518,25 +1518,25 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *ad, return 1; } - /* Since it's not DSA_REQ, we can access all field in pstAddIndicationAlt */ + /* Since it's not DSA_REQ, we can access all field in add_indication_alt */ /* We need to extract the structure from the buffer and pack it differently */ - add_indication->u8Type = pstAddIndicationAlt->u8Type; - add_indication->eConnectionDir = pstAddIndicationAlt->u8Direction; - add_indication->u16TID = pstAddIndicationAlt->u16TID; - add_indication->u16CID = pstAddIndicationAlt->u16CID; - add_indication->u16VCID = pstAddIndicationAlt->u16VCID; - add_indication->u8CC = pstAddIndicationAlt->u8CC; + add_indication->u8Type = add_indication_alt->u8Type; + add_indication->eConnectionDir = add_indication_alt->u8Direction; + add_indication->u16TID = add_indication_alt->u16TID; + add_indication->u16CID = add_indication_alt->u16CID; + add_indication->u16VCID = add_indication_alt->u16VCID; + add_indication->u8CC = add_indicatio
[PATCH 17/57] Staging: bcm: CmHost.c: Renamed variable: "ptrClassifierIpAddress" -> "classifier_ip_addr"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 1f84d7c..cea877e 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -134,7 +134,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, { int i = 0; UINT ip_addr_byte_len = IP_LENGTH_OF_ADDRESS; - UCHAR *ptrClassifierIpAddress = NULL; + UCHAR *classifier_ip_addr = NULL; UCHAR *ptrClassifierIpMask = NULL; struct bcm_mini_adapter *ad = GET_BCM_ADAPTER(gblpnetdev); @@ -162,12 +162,12 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, classifier_entry->ucIPDestinationAddressLength = ip_addr_len/(ip_addr_byte_len * 2); if (ip_v6) { - ptrClassifierIpAddress = + classifier_ip_addr = st_dest_ip->ucIpv6Address; ptrClassifierIpMask = st_dest_ip->ucIpv6Mask; } else { - ptrClassifierIpAddress = + classifier_ip_addr = st_dest_ip->ucIpv4Address; ptrClassifierIpMask = st_dest_ip->ucIpv4Mask; @@ -176,11 +176,11 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, classifier_entry->ucIPSourceAddressLength = ip_addr_len/(ip_addr_byte_len * 2); if (ip_v6) { - ptrClassifierIpAddress = + classifier_ip_addr = st_src_ip->ucIpv6Address; ptrClassifierIpMask = st_src_ip->ucIpv6Mask; } else { - ptrClassifierIpAddress = + classifier_ip_addr = st_src_ip->ucIpv4Address; ptrClassifierIpMask = st_src_ip->ucIpv4Mask; } @@ -190,7 +190,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *classifier_entry, classifier_entry->ucIPDestinationAddressLength); while ((ip_addr_len >= ip_addr_byte_len) && (i < MAX_IP_RANGE_LENGTH)) { - memcpy(ptrClassifierIpAddress + + memcpy(classifier_ip_addr + (i * ip_addr_byte_len), (ip_addr_mask_src + (i * ip_addr_byte_len * 2)), -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 44/57] Staging: bcm: CmHost.c: Renamed variable: "pstAddIndicationDest" -> "add_indication_dest"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 50 ++-- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 5205662..0209408 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1576,7 +1576,7 @@ static inline struct bcm_add_indication_alt { ULONG status = 0; struct bcm_add_indication *add_indication = NULL; - struct bcm_add_indication_alt *pstAddIndicationDest = NULL; + struct bcm_add_indication_alt *add_indication_dest = NULL; add_indication = buffer; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, @@ -1592,11 +1592,11 @@ static inline struct bcm_add_indication_alt * Need to Allocate memory to contain the SUPER Large structures * Our driver can't create these structures on Stack :( */ - pstAddIndicationDest = kmalloc(sizeof(struct bcm_add_indication_alt), + add_indication_dest = kmalloc(sizeof(struct bcm_add_indication_alt), GFP_KERNEL); - if (pstAddIndicationDest) { - memset(pstAddIndicationDest, 0, + if (add_indication_dest) { + memset(add_indication_dest, 0, sizeof(struct bcm_add_indication_alt)); } else { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, @@ -1629,47 +1629,47 @@ static inline struct bcm_add_indication_alt "AddIndication-Active set loc : %p", add_indication->psfActiveSet); - pstAddIndicationDest->u8Type = add_indication->u8Type; - pstAddIndicationDest->u8Direction = add_indication->eConnectionDir; - pstAddIndicationDest->u16TID = add_indication->u16TID; - pstAddIndicationDest->u16CID = add_indication->u16CID; - pstAddIndicationDest->u16VCID = add_indication->u16VCID; - pstAddIndicationDest->u8CC = add_indication->u8CC; + add_indication_dest->u8Type = add_indication->u8Type; + add_indication_dest->u8Direction = add_indication->eConnectionDir; + add_indication_dest->u16TID = add_indication->u16TID; + add_indication_dest->u16CID = add_indication->u16CID; + add_indication_dest->u16VCID = add_indication->u16VCID; + add_indication_dest->u8CC = add_indication->u8CC; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Restoring Active Set "); status = RestoreSFParam(ad, (ULONG)add_indication->psfActiveSet, - (PUCHAR)&pstAddIndicationDest->sfActiveSet); + (PUCHAR)&add_indication_dest->sfActiveSet); if (status != 1) goto failed_restore_sf_param; - if (pstAddIndicationDest->sfActiveSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF) - pstAddIndicationDest->sfActiveSet.u8TotalClassifiers = + if (add_indication_dest->sfActiveSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF) + add_indication_dest->sfActiveSet.u8TotalClassifiers = MAX_CLASSIFIERS_IN_SF; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Restoring Admitted Set "); status = RestoreSFParam(ad, (ULONG)add_indication->psfAdmittedSet, - (PUCHAR)&pstAddIndicationDest->sfAdmittedSet); + (PUCHAR)&add_indication_dest->sfAdmittedSet); if (status != 1) goto failed_restore_sf_param; - if (pstAddIndicationDest->sfAdmittedSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF) - pstAddIndicationDest->sfAdmittedSet.u8TotalClassifiers = + if (add_indication_dest->sfAdmittedSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF) + add_indication_dest->sfAdmittedSet.u8TotalClassifiers = MAX_CLASSIFIERS_IN_SF; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Restoring Authorized Set "); status = RestoreSFParam(ad, (ULONG)add_indication->psfAuthorizedSet, - (PUCHAR)&pstAddIndicationDest->sfAuthorizedSet); + (PUCHAR)&add_indication_dest->sfAuthorizedSet); if (status != 1) goto failed_restore_sf_param; - if (pstAddIndicationDest->sfAuthorizedSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF) - pstAddIndicationDest->sfAuthorizedSet.u8TotalClassifiers = + if (add_indication_dest->sfAuthorizedSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF) + add_indication_dest->sfAuthorizedSet.u8TotalClassifiers = MAX_CLASSIFIERS_IN_SF; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, @@ -1677,17 +1677,17 @@ static inline struct bcm_add_indication_alt
[PATCH 47/57] Staging: bcm: CmHost.c: Renamed variable: "Status" -> "status"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 4c5850d..dce9c8d 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1698,7 +1698,7 @@ ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *ad) ULONG target_dsx_buffers_base = 0; ULONG n_target_buffs; ULONG i; - int Status; + int status; if (!ad) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, @@ -1716,9 +1716,9 @@ ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *ad) "Reading DSX buffer From Target location %x ", DSX_MESSAGE_EXCHANGE_BUFFER); - Status = rdmalt(ad, DSX_MESSAGE_EXCHANGE_BUFFER, + status = rdmalt(ad, DSX_MESSAGE_EXCHANGE_BUFFER, (PUINT)&target_dsx_buffers_base, sizeof(UINT)); - if (Status < 0) { + if (status < 0) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "RDM failed!!"); return 0; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 56/57] Staging: bcm: CmHost.c: Renamed variable: "pLeader" -> "leader"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 3d72f56..eff1480 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1825,7 +1825,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *ad, /* "); - pLeader = (struct bcm_leader *)ad->caDsxReqResp; + leader = (struct bcm_leader *)ad->caDsxReqResp; - pLeader->Status = CM_CONTROL_NEWDSX_MULTICLASSIFIER_REQ; - pLeader->Vcid = 0; + leader->Status = CM_CONTROL_NEWDSX_MULTICLASSIFIER_REQ; + leader->Vcid = 0; ClearTargetDSXBuffer(ad, add_indication->u16TID, false); BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, "### TID RECEIVED %d\n", add_indication->u16TID); switch (add_indication->u8Type) { case DSA_REQ: - pLeader->PLength = sizeof(struct bcm_add_indication_alt); + leader->PLength = sizeof(struct bcm_add_indication_alt); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Sending DSA Response\n"); - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSA RESPONSE TO MAC %d", pLeader->PLength); + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSA RESPONSE TO MAC %d", leader->PLength); *((struct bcm_add_indication_alt *)&(ad->caDsxReqResp[LEADER_SIZE])) = *add_indication; ((struct bcm_add_indication_alt *)&(ad->caDsxReqResp[LEADER_SIZE]))->u8Type = DSA_RSP; @@ -1863,9 +1863,9 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *ad, /* PLength = sizeof(struct bcm_add_indication_alt); + leader->PLength = sizeof(struct bcm_add_indication_alt); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSA ACK TO MAC %d", - pLeader->PLength); + leader->PLength); *((struct bcm_add_indication_alt *)&(ad->caDsxReqResp[LEADER_SIZE])) = *add_indication; ((struct bcm_add_indication_alt *)&(ad->caDsxReqResp[LEADER_SIZE]))->u8Type = DSA_ACK; @@ -1955,9 +1955,9 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *ad, /* PLength = sizeof(struct bcm_change_indication); + leader->PLength = sizeof(struct bcm_change_indication); pstChangeIndication = (struct bcm_change_indication *)add_indication; - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSC RESPONSE TO MAC %d", pLeader->PLength); + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSC RESPONSE TO MAC %d", leader->PLength); *((struct bcm_change_indication *)&(ad->caDsxReqResp[LEADER_SIZE])) = *pstChangeIndication; ((struct bcm_change_indication *)&(ad->caDsxReqResp[LEADER_SIZE]))->u8Type = DSC_RSP; @@ -1966,9 +1966,9 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *ad, /* PLength = sizeof(struct bcm_change_indication); + leader->PLength = sizeof(struct bcm_change_indication); pstChangeIndication = (struct bcm_change_indication *)add_indication; - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSC ACK TO MAC %d", pLeader->PLength); + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSC ACK TO MAC %d", leader->PLength); *((struct bcm_change_indication *)&(ad->caDsxReqResp[LEADER_SIZE])) = *pstChangeIndication; ((struct bcm_change_indication *)&(ad->caDsxReqResp[LEADER_SIZE]))->u8Type = DSC_ACK; /* FALLTHROUGH */ @@ -2028,7 +2028,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *ad, /* PLength = sizeof(struct bcm_del_indication); + leader->PLength = sizeof(struct bcm_del_indication); *((struct bcm_del_indication *)&(ad->caDsxReqResp[LEADER_SIZE])) = *((struct bcm_del_indication *)add_indication); sf_id = ntohl(((struct bcm_del_indication *)add_indication)->u32SFID); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 40/57] Staging: bcm: CmHost.c: Renamed variable: "puBufferLength" -> "buff_len"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 67b770d..ec7366e 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1444,7 +1444,7 @@ static ULONG StoreSFParam(struct bcm_mini_adapter *ad, PUCHAR src_buff, } ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *ad, - PVOID buffer, UINT *puBufferLength) + PVOID buffer, UINT *buff_len) { struct bcm_add_indication_alt *pstAddIndicationAlt = NULL; struct bcm_add_indication *add_indication = NULL; @@ -1512,7 +1512,7 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *ad, AddRequest.u16CID = pstAddIndicationAlt->u16CID; AddRequest.u16VCID = pstAddIndicationAlt->u16VCID; AddRequest.psfParameterSet = add_indication->psfAuthorizedSet; - (*puBufferLength) = sizeof(struct bcm_add_request); + (*buff_len) = sizeof(struct bcm_add_request); memcpy(buffer, &AddRequest, sizeof(struct bcm_add_request)); kfree(add_indication); return 1; @@ -1564,7 +1564,7 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *ad, (struct bcm_connect_mgr_params *) ntohl( (ULONG)add_indication->psfActiveSet); - (*puBufferLength) = sizeof(struct bcm_add_indication); + (*buff_len) = sizeof(struct bcm_add_indication); *(struct bcm_add_indication *)buffer = *add_indication; kfree(add_indication); return 1; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/57] Staging: bcm: CmHost.c: Renamed variable: "pstAddIndication" -> "add_indication"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 478 +-- 1 file changed, 239 insertions(+), 239 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 52260ce..2ba07c2 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -25,7 +25,7 @@ static void apply_phs_rule_to_all_classifiers( USHORT vcid, struct bcm_phs_rule *phs_rule, struct bcm_phs_rules *c_phs_rules, - struct bcm_add_indication_alt *pstAddIndication); + struct bcm_add_indication_alt *add_indication); / * Function - SearchSfid @@ -545,7 +545,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* cPhsRule, - pstAddIndication); + add_indication); } break; } @@ -860,7 +860,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* pstSFIndication); - curr_packinfo->pstSFIndication = pstAddIndication; + curr_packinfo->pstSFIndication = add_indication; /* Re Sort the SF list in PackInfo according to Traffic Priority */ SortPackInfo(ad); @@ -889,91 +889,91 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) { int uiLoopIndex; int nIndex; - struct bcm_add_indication_alt *pstAddIndication; + struct bcm_add_indication_alt *add_indication; UINT nCurClassifierCnt; struct bcm_mini_adapter *ad = GET_BCM_ADAPTER(gblpnetdev); - pstAddIndication = pvBuffer; + add_indication = pvBuffer; BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "==>"); - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Type: 0x%X", pstAddIndication->u8Type); - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Direction: 0x%X", pstAddIndication->u8Direction); - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TID: 0x%X", ntohs(pstAddIndication->u16TID)); - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID: 0x%X", ntohs(pstAddIndication->u16CID)); - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16VCID: 0x%X", ntohs(pstAddIndication->u16VCID)); + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Type: 0x%X", add_indication->u8Type); + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Direction: 0x%X", add_indication->u8Direction); + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TID: 0x%X", ntohs(add_indication->u16TID)); + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID: 0x%X", ntohs(add_indication->u16CID)); + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16VCID: 0x%X", ntohs(add_indication->u16VCID)); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " AuthorizedSet--->"); - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32SFID: 0x%X", htonl(pstAddIndication->sfAuthorizedSet.u32SFID)); - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID: 0x%X", htons(pstAddIndication->sfAuthorizedSet.u16CID)); + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32SFID: 0x%X", htonl(add_indication->sfAuthorizedSet.u32SFID)); + BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID: 0x%X", htons(add_indication->sfAuthorizedSet.u16CID)); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassNameLength: 0x%X", - pstAddIndication->sfAuthorizedSet.u8ServiceClassNameLength); + add_indication->sfAuthorizedSet.u8ServiceClassNameLength); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassName: 0x%X ,0x%X , 0x%X, 0x%X, 0x%X, 0x%X", - pstAddIndication->sfAuthorizedSet.u8ServiceClassName[0], - pstAddIndication->sfAuthorizedSet.u8ServiceClassName[1], - pstAddIndication->sfAuthorizedSet.u8ServiceClassName[2], - pstAddIndication->sfAuthorizedSet.u8ServiceClassName[3], - pstAddIndication->sfAuthorizedSet.u8ServiceClassName[4], - pstAddIndication->sfAuthorizedSet.u8ServiceClassName[5]); - - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8MBSService: 0x%X", pstAddIndication->sfAuthorizedSet.u8MBSService); - BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8QosParamSet: 0x%X", pstAddIndication->sfAuthorizedSet.u8QosParamSet); + add_indication->sfAuthorizedSet.u8ServiceC
[PATCH 12/57] Staging: bcm: CmHost.c: Renamed variable: "uiClassifierID" -> "classifier_id"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 6ae3601..a180917 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -76,19 +76,19 @@ static int SearchFreeSfid(struct bcm_mini_adapter *ad) * Description:This routinue would search Classifier having specified ClassifierID as input parameter * Input parameters: struct bcm_mini_adapter *ad - ad Context * unsigned int uiSfid - The SF in which the classifier is to searched - * B_UINT16 uiClassifierID - The classifier ID to be searched + * B_UINT16 classifier_id - The classifier ID to be searched * Return: int :Classifier table index of matching entry */ static int SearchClsid(struct bcm_mini_adapter *ad, ULONG sf_id, - B_UINT16 uiClassifierID) + B_UINT16 classifier_id) { int i; for (i = 0; i < MAX_CLASSIFIERS; i++) { if ((ad->astClassifierTable[i].bUsed) && (ad->astClassifierTable[i].uiClassifierRuleIndex - == uiClassifierID) && + == classifier_id) && (ad->astClassifierTable[i].ulSFID == sf_id)) return i; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 29/57] Staging: bcm: CmHost.c: Renamed variable: "eClassifierAction" -> "classifier_action"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 6f8a96e..5627326 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -550,7 +550,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* bClassifierPriority = TRUE; if (dsx_type == DSA_ACK) { - eClassifierAction = eAddClassifier; + classifier_action = eAddClassifier; } else if (dsx_type == DSC_ACK) { switch (cs_type->u8ClassfierDSCAction) { case 0: /* DSC Add Classifier */ - eClassifierAction = eAddClassifier; + classifier_action = eAddClassifier; break; case 1: /* DSC Replace Classifier */ - eClassifierAction = eReplaceClassifier; + classifier_action = eReplaceClassifier; break; case 2: /* DSC Delete Classifier */ - eClassifierAction = eDeleteClassifier; + classifier_action = eDeleteClassifier; break; default: - eClassifierAction = eInvalidClassifierAction; + classifier_action = eInvalidClassifierAction; } } packet_classification_rule_idx = ntohs(cs_type->cCPacketClassificationRule.u16PacketClassificationRuleIndex); - switch (eClassifierAction) { + switch (classifier_action) { case eAddClassifier: /* Get a Free Classifier Index From Classifier table for this SF to add the Classifier */ /* Contained in this message */ -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/57] Staging: bcm: CmHost.c: Renamed variable: "cPhsRule" -> "c_phs_rules"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 87f9978..52260ce 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -24,7 +24,7 @@ static void apply_phs_rule_to_all_classifiers( register UINT search_rule_idx, USHORT vcid, struct bcm_phs_rule *phs_rule, - struct bcm_phs_rules *cPhsRule, + struct bcm_phs_rules *c_phs_rules, struct bcm_add_indication_alt *pstAddIndication); / @@ -2171,7 +2171,7 @@ static void apply_phs_rule_to_all_classifiers( register UINT search_rule_idx, /* astClassifierTable[uiClassifierIndex]; if ((curr_classifier->bUsed) && (curr_classifier->ulSFID == ad->PackInfo[search_rule_idx].ulSFID) && - (curr_classifier->u8AssociatedPHSI == cPhsRule->u8PHSI)) { + (curr_classifier->u8AssociatedPHSI == c_phs_rules->u8PHSI)) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, - "Adding PHS Rule For Classifier: 0x%x cPhsRule.u8PHSI: 0x%x\n", + "Adding PHS Rule For Classifier: 0x%x c_phs_rules.u8PHSI: 0x%x\n", curr_classifier->uiClassifierRuleIndex, - cPhsRule->u8PHSI); + c_phs_rules->u8PHSI); /* Update The PHS Rule for this classifier as Associated PHSI id defined */ /* Copy the PHS Rule */ - phs_rule->u8PHSI = cPhsRule->u8PHSI; - phs_rule->u8PHSFLength = cPhsRule->u8PHSFLength; - phs_rule->u8PHSMLength = cPhsRule->u8PHSMLength; - phs_rule->u8PHSS = cPhsRule->u8PHSS; - phs_rule->u8PHSV = cPhsRule->u8PHSV; - memcpy(phs_rule->u8PHSF, cPhsRule->u8PHSF, MAX_PHS_LENGTHS); - memcpy(phs_rule->u8PHSM, cPhsRule->u8PHSM, MAX_PHS_LENGTHS); + phs_rule->u8PHSI = c_phs_rules->u8PHSI; + phs_rule->u8PHSFLength = c_phs_rules->u8PHSFLength; + phs_rule->u8PHSMLength = c_phs_rules->u8PHSMLength; + phs_rule->u8PHSS = c_phs_rules->u8PHSS; + phs_rule->u8PHSV = c_phs_rules->u8PHSV; + memcpy(phs_rule->u8PHSF, c_phs_rules->u8PHSF, MAX_PHS_LENGTHS); + memcpy(phs_rule->u8PHSM, c_phs_rules->u8PHSM, MAX_PHS_LENGTHS); phs_rule->u8RefCnt = 0; phs_rule->bUnclassifiedPHSRule = false; phs_rule->PHSModifiedBytes = 0; @@ -2225,13 +2225,13 @@ static void apply_phs_rule_to_all_classifiers( /* Error PHS Rule specified in signaling could not be applied to any classifier */ /* Copy the PHS Rule */ - phs_rule->u8PHSI = cPhsRule->u8PHSI; - phs_rule->u8PHSFLength = cPhsRule->u8PHSFLength; - phs_rule->u8PHSMLength = cPhsRule->u8PHSMLength; - phs_rule->u8PHSS = cPhsRule->u8PHSS; - phs_rule->u8PHSV = cPhsRule->u8PHSV; - memcpy(phs_rule->u8PHSF, cPhsRule->u8PHSF, MAX_PHS_LENGTHS); - memcpy(phs_rule->u8PHSM, cPhsRule->u8PHSM, MAX_PHS_LENGTHS); + phs_rule->u8PHSI = c_phs_rules->u8PHSI; + phs_rule->u8PHSFLength = c_phs_rules->u8PHSFLength; + phs_rule->u8PHSMLength = c_phs_rules->u8PHSMLength; + phs_rule->u8PHSS = c_phs_rules->u8PHSS; + phs_rule->u8PHSV = c_phs_rules->u8PHSV; + memcpy(phs_rule->u8PHSF, c_phs_rules->u8PHSF, MAX_PHS_LENGTHS); + memcpy(phs_rule->u8PHSM, c_phs_rules->u8PHSM, MAX_PHS_LENGTHS); phs_rule->u8RefCnt = 0; phs_rule->bUnclassifiedPHSRule = TRUE; phs_rule->PHSModifiedBytes = 0; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 38/57] Staging: bcm: CmHost.c: Renamed variable: "pucSrcBuffer" -> "src_buff"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index e9e0a3c..328ba4d 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1425,16 +1425,16 @@ static inline ULONG RestoreSFParam(struct bcm_mini_adapter *ad, return 1; } -static ULONG StoreSFParam(struct bcm_mini_adapter *ad, PUCHAR pucSrcBuffer, +static ULONG StoreSFParam(struct bcm_mini_adapter *ad, PUCHAR src_buff, ULONG addr_sf_param_set) { UINT nBytesToWrite = sizeof(struct bcm_connect_mgr_params); int ret = 0; - if (addr_sf_param_set == 0 || NULL == pucSrcBuffer) + if (addr_sf_param_set == 0 || NULL == src_buff) return 0; - ret = wrm(ad, addr_sf_param_set, (u8 *)pucSrcBuffer, nBytesToWrite); + ret = wrm(ad, addr_sf_param_set, (u8 *)src_buff, nBytesToWrite); if (ret < 0) { BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "%s:%d WRM failed", __func__, __LINE__); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 24/57] Staging: bcm: CmHost.c: Renamed variable: "usVCID" -> "vcid"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 0986b37..252f0de 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -477,16 +477,16 @@ static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *ad, { struct bcm_classifier_rule *classifier_entry = NULL; B_UINT16 packet_classification_rule_idx; - USHORT usVCID; + USHORT vcid; /* VOID *pvPhsContext = NULL; */ /*ULONG ulPhsStatus; */ - usVCID = ad->PackInfo[search_rule_idx].usVCID_Value; + vcid = ad->PackInfo[search_rule_idx].usVCID_Value; if (classifier_idx > MAX_CLASSIFIERS-1) return; - if (usVCID == 0) + if (vcid == 0) return; packet_classification_rule_idx = @@ -499,7 +499,7 @@ static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *ad, sizeof(struct bcm_classifier_rule)); /* Delete the PHS Rule for this classifier */ - PhsDeleteClassifierRule(&ad->stBCMPhsContext, usVCID, + PhsDeleteClassifierRule(&ad->stBCMPhsContext, vcid, packet_classification_rule_idx); } } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/57] Staging: bcm: CmHost.c: Renamed variable: "sPhsRule" -> "phs_rule"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 70 ++-- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index f6edf3e..87f9978 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -23,7 +23,7 @@ static void apply_phs_rule_to_all_classifiers( register struct bcm_mini_adapter *ad, register UINT search_rule_idx, USHORT vcid, - struct bcm_phs_rule *sPhsRule, + struct bcm_phs_rule *phs_rule, struct bcm_phs_rules *cPhsRule, struct bcm_add_indication_alt *pstAddIndication); @@ -554,7 +554,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* PackInfo[search_rule_idx]; USHORT vcid = curr_packinfo->usVCID_Value; @@ -786,7 +786,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *ad, /* cPhsRule, pstAddIndication); } @@ -2170,7 +2170,7 @@ static void apply_phs_rule_to_all_classifiers( register struct bcm_mini_adapter *ad, /* u8PHSI = cPhsRule->u8PHSI; - sPhsRule->u8PHSFLength = cPhsRule->u8PHSFLength; - sPhsRule->u8PHSMLength = cPhsRule->u8PHSMLength; - sPhsRule->u8PHSS = cPhsRule->u8PHSS; - sPhsRule->u8PHSV = cPhsRule->u8PHSV; - memcpy(sPhsRule->u8PHSF, cPhsRule->u8PHSF, MAX_PHS_LENGTHS); - memcpy(sPhsRule->u8PHSM, cPhsRule->u8PHSM, MAX_PHS_LENGTHS); - sPhsRule->u8RefCnt = 0; - sPhsRule->bUnclassifiedPHSRule = false; - sPhsRule->PHSModifiedBytes = 0; - sPhsRule->PHSModifiedNumPackets = 0; - sPhsRule->PHSErrorNumPackets = 0; + phs_rule->u8PHSI = cPhsRule->u8PHSI; + phs_rule->u8PHSFLength = cPhsRule->u8PHSFLength; + phs_rule->u8PHSMLength = cPhsRule->u8PHSMLength; + phs_rule->u8PHSS = cPhsRule->u8PHSS; + phs_rule->u8PHSV = cPhsRule->u8PHSV; + memcpy(phs_rule->u8PHSF, cPhsRule->u8PHSF, MAX_PHS_LENGTHS); + memcpy(phs_rule->u8PHSM, cPhsRule->u8PHSM, MAX_PHS_LENGTHS); + phs_rule->u8RefCnt = 0; + phs_rule->bUnclassifiedPHSRule = false; + phs_rule->PHSModifiedBytes = 0; + phs_rule->PHSModifiedNumPackets = 0; + phs_rule->PHSErrorNumPackets = 0; /* bPHSRuleAssociated = TRUE; */ /* Store The PHS Rule for this classifier */ @@ -2211,13 +2211,13 @@ static void apply_phs_rule_to_all_classifiers( &ad->stBCMPhsContext, vcid, curr_classifier->uiClassifierRuleIndex, - sPhsRule, + phs_rule, curr_classifier->u8AssociatedPHSI); /* Update PHS Rule For the Classifier */ - if (sPhsRule->u8PHSI) { - curr_classifier->u32PHSRuleID = sPhsRule->u8PHSI; - memcpy(&curr_classifier->sPhsRule, sPhsRule, sizeof(struct bcm_phs_rule)); + if (phs_rule->u8PHSI) { + curr_classifier->u32PHSRuleID = phs_rule->u8PHSI; + memcpy(&curr_classifier->sPhsRule, phs_rule, sizeof(struct bcm_phs_rule)); } } } @@ -2225,18 +2225,18 @@ static void apply_phs_rule_to_all_classifiers( /* Error PHS Rule specified in signaling could not be applied to any classifier */ /* Copy the PHS Rule */ - sPhsRule->u8PHSI = cPhsRule->u8PHSI; - sPhsRule->u8PHSFLength = cPhsRule->u8PHSFLength; - sPhsRule->u8PHSMLength = cPhsRule->u8PHSMLength; - sPhsRule->u8PHSS = cPhsRule->u8PHSS; - sPhsRule->u8PHSV = cPhsRule->u8PHSV; - memcpy(sPhsRule->u8PHSF, cPhsRule->u8PHSF, MAX_PHS_LENGTHS); - memcpy(sPhsRule->u8PHSM, cPhsRule->u8PHSM, MAX_PHS_LENGTHS); - sPhsRule->u8RefCnt = 0; - sPhsRule->bUnclassifiedPHSRule = TRUE; - sPhsRule->
[PATCH 10/57] Staging: bcm: CmHost.c: Renamed variable: "uiSfid" -> "sf_id"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 2ba07c2..2a345da 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -34,17 +34,17 @@ static void apply_phs_rule_to_all_classifiers( * specified SFID as input parameter. * * Parameters -ad: Pointer to the ad structure - * uiSfid : Given SFID for matching + * sf_id : Given SFID for matching * * Returns - Queue index for this SFID(If matched) * Else Invalid Queue Index(If Not matched) / -int SearchSfid(struct bcm_mini_adapter *ad, UINT uiSfid) +int SearchSfid(struct bcm_mini_adapter *ad, UINT sf_id) { int i; for (i = (NO_OF_QUEUES-1); i >= 0; i--) - if (ad->PackInfo[i].ulSFID == uiSfid) + if (ad->PackInfo[i].ulSFID == sf_id) return i; return NO_OF_QUEUES+1; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 53/57] Staging: bcm: CmHost.c: Renamed variable: "stSrc" -> "src"
Signed-off-by: Matthias Beyer --- drivers/staging/bcm/CmHost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index ac6ae01..989495d 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -2152,13 +2152,13 @@ static void restore_endianess_of_classifier_entry( enum bcm_ipaddr_context ip_addr_context) { int i; - union u_ip_address *stSrc = &classifier_entry->stSrcIpAddress; + union u_ip_address *src = &classifier_entry->stSrcIpAddress; union u_ip_address *stDest = &classifier_entry->stDestIpAddress; for (i = 0; i < MAX_IP_RANGE_LENGTH * 4; i++) { if (ip_addr_context == eSrcIpAddress) { - stSrc->ulIpv6Addr[i] = ntohl(stSrc->ulIpv6Addr[i]); - stSrc->ulIpv6Mask[i] = ntohl(stSrc->ulIpv6Mask[i]); + src->ulIpv6Addr[i] = ntohl(src->ulIpv6Addr[i]); + src->ulIpv6Mask[i] = ntohl(src->ulIpv6Mask[i]); } else if (ip_addr_context == eDestIpAddress) { stDest->ulIpv6Addr[i] = ntohl(stDest->ulIpv6Addr[i]); stDest->ulIpv6Mask[i] = ntohl(stDest->ulIpv6Mask[i]); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel