[PATCH] staging: usbip: vhci_hcd: Fixed oops during removal of vhci_hcd
In response to "usbip detach -p [port_number]" user command,vhci_shoutdown_connection gets executed which kills tcp_tx,tcp_rx kernel threads and then vhci_device_reset resets all usb_device struct variables except kernel thread pointers. so, at the time of vhci_hcd removal vhci_shoutdown_connection tries to kill kernel threads which are already killed. Signed-off-by: navin patidar --- drivers/staging/usbip/vhci_hcd.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index 6076f42..b1f427c 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c @@ -858,6 +858,9 @@ static void vhci_device_reset(struct usbip_device *ud) if (vdev->udev) usb_put_dev(vdev->udev); vdev->udev = NULL; + /* Reset kernel thread pointers */ + ud->tcp_rx = NULL; + ud->tcp_tx = NULL; ud->tcp_socket = NULL; ud->status = VDEV_ST_NULL; -- 1.7.9.5 --- This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. --- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: usbip: stub_dev: Fixed oops during removal of usbip_host
stub_device_reset should set kernel thread pointers to NULL. so that at the time of usbip_host removal stub_shoutdown_connection doesn't try to kill kernel threads which are already killed. Signed-off-by: navin patidar --- drivers/staging/usbip/stub_dev.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index 92ced35..f584af8 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c @@ -192,16 +192,13 @@ static void stub_shutdown_connection(struct usbip_device *ud) if (ud->tcp_tx) kthread_stop_put(ud->tcp_tx); - /* -* 2. close the socket + /* 2. close the socket * * tcp_socket is freed after threads are killed so that usbip_xmit does * not touch NULL socket. */ - if (ud->tcp_socket) { + if (ud->tcp_socket) sock_release(ud->tcp_socket); - ud->tcp_socket = NULL; - } /* 3. free used data */ stub_device_cleanup_urbs(sdev); @@ -233,6 +230,13 @@ static void stub_device_reset(struct usbip_device *ud) dev_dbg(&udev->dev, "device reset"); + /*reset tcp socket*/ + ud->tcp_socket = NULL; + + /*reset kernel thread pointers */ + ud->tcp_rx = NULL; + ud->tcp_tx = NULL; + ret = usb_lock_device_for_reset(udev, sdev->interface); if (ret < 0) { dev_err(&udev->dev, "lock for reset\n"); -- 1.7.9.5 --- This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. --- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: usbip: stub_dev: Fixed oops during removal of usbip_host
stub_device_reset should set kernel thread pointers to NULL. so that at the time of usbip_host removal stub_shoutdown_connection doesn't try to kill kernel threads which are already killed. Signed-off-by: navin patidar --- drivers/staging/usbip/stub_dev.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index 92ced35..447a98c 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c @@ -198,10 +198,8 @@ static void stub_shutdown_connection(struct usbip_device *ud) * tcp_socket is freed after threads are killed so that usbip_xmit does * not touch NULL socket. */ - if (ud->tcp_socket) { + if (ud->tcp_socket) sock_release(ud->tcp_socket); - ud->tcp_socket = NULL; - } /* 3. free used data */ stub_device_cleanup_urbs(sdev); @@ -233,6 +231,9 @@ static void stub_device_reset(struct usbip_device *ud) dev_dbg(&udev->dev, "device reset"); + ud->tcp_socket = NULL; + ud->tcp_rx = NULL; + ud->tcp_tx = NULL; ret = usb_lock_device_for_reset(udev, sdev->interface); if (ret < 0) { dev_err(&udev->dev, "lock for reset\n"); -- 1.7.9.5 --- This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. --- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: usbip: stub_dev: Fixed oops during removal of usbip_host
hi, I have sent this patch again with corrections. thank for reviewing the patch. --navin-patidar On 9/14/12, Sebastian Andrzej Siewior wrote: > On Fri, Sep 14, 2012 at 03:42:42PM +0400, Sergei Shtylyov wrote: >> >diff --git a/drivers/staging/usbip/stub_dev.c >> > b/drivers/staging/usbip/stub_dev.c >> >index 92ced35..f584af8 100644 >> >--- a/drivers/staging/usbip/stub_dev.c >> >+++ b/drivers/staging/usbip/stub_dev.c >> >@@ -233,6 +230,13 @@ static void stub_device_reset(struct usbip_device >> > *ud) >> > >> >dev_dbg(&udev->dev, "device reset"); >> > >> >+ /*reset tcp socket*/ >> >>Add spaces after /* and before */, please. >> >> >+ ud->tcp_socket = NULL; >> >+ >> >+ /*reset kernel thread pointers */ >> >>Here too. > > I'm not sure it is required to comment the obvious things. > >> WBR, Sergei > > Sebastian > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: usbip: stub_dev: Fixed oops during removal of usbip_host
stub_device_reset should set kernel thread pointers to NULL. so that at the time of usbip_host removal stub_shoutdown_connection doesn't try to kill kernel threads which are already killed. Signed-off-by: navin patidar --- drivers/staging/usbip/stub_dev.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index 92ced35..447a98c 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c @@ -198,10 +198,8 @@ static void stub_shutdown_connection(struct usbip_device *ud) * tcp_socket is freed after threads are killed so that usbip_xmit does * not touch NULL socket. */ - if (ud->tcp_socket) { + if (ud->tcp_socket) sock_release(ud->tcp_socket); - ud->tcp_socket = NULL; - } /* 3. free used data */ stub_device_cleanup_urbs(sdev); @@ -233,6 +231,9 @@ static void stub_device_reset(struct usbip_device *ud) dev_dbg(&udev->dev, "device reset"); + ud->tcp_socket = NULL; + ud->tcp_rx = NULL; + ud->tcp_tx = NULL; ret = usb_lock_device_for_reset(udev, sdev->interface); if (ret < 0) { dev_err(&udev->dev, "lock for reset\n"); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: usbip: vhci_hcd: Fixed oops during removal of vhci_hcd
In response to "usbip detach -p [port_number]" user command,vhci_shoutdown_connection gets executed which kills tcp_tx,tcp_rx kernel threads and then vhci_device_reset resets all usb_device struct variables except kernel thread pointers. so, at the time of vhci_hcd removal vhci_shoutdown_connection tries to kill kernel threads which are already killed. Signed-off-by: navin patidar --- drivers/staging/usbip/vhci_hcd.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index 12a9a5f..eea8298 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c @@ -859,6 +859,8 @@ static void vhci_device_reset(struct usbip_device *ud) usb_put_dev(vdev->udev); vdev->udev = NULL; + ud->tcp_rx = NULL; + ud->tcp_tx = NULL; ud->tcp_socket = NULL; ud->status = VDEV_ST_NULL; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: usbip: stub_dev: Fixed oops during removal of usbip_host
On Tue, Sep 18, 2012 at 1:10 PM, Dan Carpenter wrote: > On Tue, Sep 18, 2012 at 09:30:06AM +0530, navin patidar wrote: >> stub_device_reset should set kernel thread pointers to NULL. >> so that at the time of usbip_host removal stub_shoutdown_connection >> doesn't try to kill kernel threads which are already killed. >> > > If you have the Oops output, that's always nice to put in the commit > message. i'll surely keep this in mind before submitting further patches. > Why don't you set the pointers to NULL in stub_shutdown_connection() > since that's where you actually kill the threads. Setting them to > NULL in stub_device_reset() will (sometimes) solve the problem but > it gives you a new problem of a resource leak. stub_device_reset() always gets executed after stub_shutdown_connection() , never before. > > regards, > dan carpenter > --navin-patidar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: usbip: stub_dev: Fixed oops during removal of usbip_host
for usbip_host event_handler() handles following events. defined in "usbip_common.h" 1. SDEV_EVENT_REMOVED (USBIP_EH_SHUTDOWN | USBIP_EH_RESET | USBIP_EH_BYE) 2. SDEV_EVENT_DOWN (USBIP_EH_SHUTDOWN | USBIP_EH_RESET) 3. SDEV_EVENT_ERROR_TCP(USBIP_EH_SHUTDOWN | USBIP_EH_RESET) 4. SDEV_EVENT_ERROR_SUBMIT (USBIP_EH_SHUTDOWN | USBIP_EH_RESET) 5. VDEV_EVENT_ERROR_MALLOC (USBIP_EH_SHUTDOWN | USBIP_EH_UNUSABLE) In case of events(1,2,3,4), stub_shoutdown_connection() gets executed first and than stub_device_reset() . In case of event 5, stub_shoutdown_connection() kills kernel threads and stub_device_unusable() changes devices status to "SDEV_ST_ERROR"(fatal error). thus stub_device_reset() can't be called without stub_shutdown_connection(), so there is no problem of resource leak . you are also right, i could have set pointers to NULL in stub_shutdown_connection() but i used stub_device_reset() which is intended to reset usbip_device stuct member variables. i'll resend patches, if maintainer ask for that. thanks --navin-patidar On Tue, Sep 18, 2012 at 3:06 PM, Dan Carpenter wrote: > On Tue, Sep 18, 2012 at 03:02:15PM +0530, navin patidar wrote: >> On Tue, Sep 18, 2012 at 1:10 PM, Dan Carpenter >> wrote: >> > On Tue, Sep 18, 2012 at 09:30:06AM +0530, navin patidar wrote: >> >> stub_device_reset should set kernel thread pointers to NULL. >> >> so that at the time of usbip_host removal stub_shoutdown_connection >> >> doesn't try to kill kernel threads which are already killed. >> >> >> > >> > If you have the Oops output, that's always nice to put in the commit >> > message. >> >> i'll surely keep this in mind before submitting further patches. >> >> > Why don't you set the pointers to NULL in stub_shutdown_connection() >> > since that's where you actually kill the threads. Setting them to >> > NULL in stub_device_reset() will (sometimes) solve the problem but >> > it gives you a new problem of a resource leak. >> >> stub_device_reset() always gets executed after >> stub_shutdown_connection() , never before. >> > > No it isn't. Read event_handler() more carefully. They can be > executed independently. > > In other words, stub_shutdown_connection() can be called without > calling stub_device_reset() and stub_device_reset() can be called > without stub_shutdown_connection(). If either of those happen then > it causes a problem with the patch you have just sent. > > regards, > dan carpenter > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2] staging: usbip: vhci_hcd: Fixed oops during removal of vhci_hcd
From: navin In response to "usbip detach -p [port_number]" user command,vhci_shutdown_connection() gets executed which kills tcp_tx,tcp_rx kernel threads but doesn't set thread pointers to NULL. so, at the time of vhci_hcd removal vhci_shutdown_connection() again tries to kill kernel threads which are already killed. [ 312.220259] BUG: unable to handle kernel NULL pointer dereference at (null) [ 312.220313] IP: [] exit_creds+0x1f/0x70 [ 312.220349] PGD 5b7be067 PUD 5b7dc067 PMD 0 [ 312.220388] Oops: [#1] SMP [ 312.220415] Modules linked in: vhci_hcd(O-) usbip_host(O) usbip_core(O) uas usb_storage joydev parport_pc bnep rfcomm ppdev binfmt_misc snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi arc4 snd_rawmidi snd_seq_midi_event snd_seq ath9k mac80211 ath9k_common ath9k_hw snd_timer snd_seq_device snd ath i915 drm_kms_helper drm psmouse cfg80211 coretemp soundcore lpc_ich i2c_algo_bit snd_page_alloc video intel_ips wmi btusb mac_hid bluetooth ideapad_laptop lp sparse_keymap serio_raw mei microcode parport r8169 [ 312.220862] CPU 0 [ 312.220882] Pid: 2095, comm: usbip_eh Tainted: G O 3.6.0-rc3+ #2 LENOVO 20042 /Base Board Product Name [ 312.220938] RIP: 0010:[] [] exit_creds+0x1f/0x70 [ 312.220979] RSP: 0018:88004d6ebdb0 EFLAGS: 00010282 [ 312.221008] RAX: RBX: 880041c4db40 RCX: 88005ad52230 [ 312.221041] RDX: 0034 RSI: 0286 RDI: [ 312.221074] RBP: 88004d6ebdc0 R08: 88004d6ea000 R09: [ 312.221107] R10: 0001 R11: R12: [ 312.221144] R13: R14: 88005ad521d8 R15: 88004d6ebea0 [ 312.221177] FS: () GS:88007740() knlGS: [ 312.221214] CS: 0010 DS: ES: CR0: 8005003b [ 312.221241] CR2: CR3: 5b7b9000 CR4: 07f0 [ 312.221277] DR0: DR1: DR2: [ 312.221309] DR3: DR6: 0ff0 DR7: 0400 [ 312.221342] Process usbip_eh (pid: 2095, threadinfo 88004d6ea000, task 88004d44db40) [ 312.221384] Stack: [ 312.221396] 88004d6ebdc0 880041c4db40 88004d6ebde0 81052aaa [ 312.221442] 880041c4db40 88004d6ebe10 8107a148 [ 312.221487] 88005ad521f0 88005ad52228 88004d44db40 88005ad521d8 [ 312.221536] Call Trace: [ 312.221556] [] __put_task_struct+0x4a/0x140 [ 312.221587] [] kthread_stop+0x108/0x110 [ 312.221616] [] vhci_shutdown_connection+0x49/0x2b4 [vhci_hcd] [ 312.221657] [] event_handler_loop+0x70/0x140 [usbip_core] [ 312.221692] [] ? add_wait_queue+0x60/0x60 [ 312.221721] [] ? usbip_stop_eh+0x30/0x30 [usbip_core] [ 312.221754] [] kthread+0x93/0xa0 [ 312.221784] [] kernel_thread_helper+0x4/0x10 [ 312.221814] [] ? flush_kthread_worker+0xb0/0xb0 [ 312.223589] [] ? gs_change+0x13/0x13 [ 312.225360] Code: 0b 0f 0b 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 53 48 83 ec 08 66 66 66 66 90 48 8b 87 58 04 00 00 48 89 fb 48 8b bf 50 04 00 00 <8b> 00 48 c7 83 50 04 00 00 00 00 00 00 f0 ff 0f 0f 94 c0 84 c0 [ 312.229663] RIP [] exit_creds+0x1f/0x70 [ 312.231696] RSP [ 312.233648] CR2: [ 312.256464] ---[ end trace 1971ce612a167279 ]--- Signed-off-by: navin patidar --- drivers/staging/usbip/vhci_hcd.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index 12a9a5f..67358d4 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c @@ -804,11 +804,14 @@ static void vhci_shutdown_connection(struct usbip_device *ud) } /* kill threads related to this sdev, if v.c. exists */ - if (vdev->ud.tcp_rx) + if (vdev->ud.tcp_rx) { kthread_stop_put(vdev->ud.tcp_rx); - if (vdev->ud.tcp_tx) + vdev->ud.tcp_rx = NULL; + } + if (vdev->ud.tcp_tx) { kthread_stop_put(vdev->ud.tcp_tx); - + vdev->ud.tcp_tx = NULL; + } pr_info("stop threads\n"); /* active connection is closed */ -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2] staging: usbip: stub_dev: Fixed oops during removal of usbip_host
From: navin stub_shutdown_connection() should set kernel thread pointers to NULL after killing them. so that at the time of usbip_host removal stub_shutdown_connection() doesn't try to kill kernel threads which are already killed. [ 1504.312158] BUG: unable to handle kernel NULL pointer dereference at (null) [ 1504.315833] IP: [] exit_creds+0x1f/0x70 [ 1504.317688] PGD 41f1c067 PUD 41d0f067 PMD 0 [ 1504.319611] Oops: [#2] SMP [ 1504.321480] Modules linked in: vhci_hcd(O) usbip_host(O-) usbip_core(O) uas usb_storage joydev parport_pc bnep rfcomm ppdev binfmt_misc snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi arc4 snd_rawmidi snd_seq_midi_event snd_seq ath9k mac80211 ath9k_common ath9k_hw snd_timer snd_seq_device snd ath i915 drm_kms_helper drm psmouse cfg80211 coretemp soundcore lpc_ich i2c_algo_bit snd_page_alloc video intel_ips wmi btusb mac_hid bluetooth ideapad_laptop lp sparse_keymap serio_raw mei microcode parport r8169 [ 1504.329666] CPU 1 [ 1504.329687] Pid: 2434, comm: usbip_eh Tainted: G DO 3.6.0-rc31+ #2 LENOVO 20042 /Base Board Product Name [ 1504.333502] RIP: 0010:[] [] exit_creds+0x1f/0x70 [ 1504.335371] RSP: 0018:880041c7fdd0 EFLAGS: 00010282 [ 1504.337226] RAX: RBX: 880041c2db40 RCX: 880041e4ae50 [ 1504.339101] RDX: 0044 RSI: 0286 RDI: [ 1504.341027] RBP: 880041c7fde0 R08: 880041c7e000 R09: [ 1504.342934] R10: 0001 R11: R12: [ 1504.344840] R13: R14: 88004d448000 R15: 880041c7fea0 [ 1504.346743] FS: () GS:88007744() knlGS: [ 1504.348671] CS: 0010 DS: ES: CR0: 8005003b [ 1504.350612] CR2: CR3: 41d0d000 CR4: 07e0 [ 1504.352723] DR0: DR1: DR2: [ 1504.354734] DR3: DR6: 0ff0 DR7: 0400 [ 1504.356737] Process usbip_eh (pid: 2434, threadinfo 880041c7e000, task 88004d448000) [ 1504.358711] Stack: [ 1504.360635] 880041c7fde0 880041c2db40 880041c7fe00 81052aaa [ 1504.362589] 880041c2db40 880041c7fe30 8107a148 [ 1504.364539] 880041e4ae10 880041e4ae00 88004d448000 88004d448000 [ 1504.366470] Call Trace: [ 1504.368368] [] __put_task_struct+0x4a/0x140 [ 1504.370307] [] kthread_stop+0x108/0x110 [ 1504.370312] [] stub_shutdown_connection+0x3e/0x1b0 [usbip_host] [ 1504.370315] [] event_handler_loop+0x70/0x140 [usbip_core] [ 1504.370318] [] ? add_wait_queue+0x60/0x60 [ 1504.370320] [] ? usbip_stop_eh+0x30/0x30 [usbip_core] [ 1504.370322] [] kthread+0x93/0xa0 [ 1504.370327] [] kernel_thread_helper+0x4/0x10 [ 1504.370330] [] ? flush_kthread_worker+0xb0/0xb0 [ 1504.370332] [] ? gs_change+0x13/0x13 [ 1504.370351] Code: 0b 0f 0b 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 53 48 83 ec 08 66 66 66 66 90 48 8b 87 58 04 00 00 48 89 fb 48 8b bf 50 04 00 00 <8b> 00 48 c7 83 50 04 00 00 00 00 00 00 f0 ff 0f 0f 94 c0 84 c0 [ 1504.370353] RIP [] exit_creds+0x1f/0x70 [ 1504.370353] RSP [ 1504.370354] CR2: [ 1504.401376] ---[ end trace 1971ce612a16727a ]--- Signed-off-by: navin patidar --- drivers/staging/usbip/stub_dev.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index 92ced35..c8d79a7 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c @@ -187,10 +187,14 @@ static void stub_shutdown_connection(struct usbip_device *ud) } /* 1. stop threads */ - if (ud->tcp_rx) + if (ud->tcp_rx) { kthread_stop_put(ud->tcp_rx); - if (ud->tcp_tx) + ud->tcp_rx = NULL; + } + if (ud->tcp_tx) { kthread_stop_put(ud->tcp_tx); + ud->tcp_tx = NULL; + } /* * 2. close the socket -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: rtl8192e: Remove pt_regs * irq handler parameter
struct pt_regs pointer is no longer passed as a irq handler argument. and also remove unnecessary macros. Signed-off-by: navin patidar --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c |5 +++-- drivers/staging/rtl8192e/rtl8192e/rtl_core.h |6 -- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 2b6c61c..d952a34 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -94,6 +94,7 @@ MODULE_DEVICE_TABLE(pci, rtl8192_pci_id_tbl); static int rtl8192_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id); static void rtl8192_pci_disconnect(struct pci_dev *pdev); +static irqreturn_t rtl8192_interrupt(int irq, void *netdev); static struct pci_driver rtl8192_pci_driver = { .name = DRV_NAME, /* Driver name */ @@ -1324,7 +1325,7 @@ static short rtl8192_init(struct net_device *dev) (unsigned long)dev); rtl8192_irq_disable(dev); - if (request_irq(dev->irq, (void *)rtl8192_interrupt_rsl, IRQF_SHARED, + if (request_irq(dev->irq, rtl8192_interrupt, IRQF_SHARED, dev->name, dev)) { printk(KERN_ERR "Error allocating IRQ %d", dev->irq); return -1; @@ -2704,7 +2705,7 @@ out: } -irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs) +irqreturn_t rtl8192_interrupt(int irq, void *netdev) { struct net_device *dev = (struct net_device *) netdev; struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 87d4d34..9d7cb0e 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -88,10 +88,6 @@ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID , \ .driver_data = (kernel_ulong_t)&(cfg) -#define irqreturn_type irqreturn_t - -#define rtl8192_interrupt(x, y, z) rtl8192_interrupt_rsl(x, y) - #define RTL_MAX_SCAN_SIZE 128 #define RTL_RATE_MAX 30 @@ -1044,8 +1040,6 @@ void rtl8192_set_chan(struct net_device *dev, short ch); void check_rfctrl_gpio_timer(unsigned long data); void rtl8192_hw_wakeup_wq(void *data); -irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs); - short rtl8192_pci_initdescring(struct net_device *dev); void rtl8192_cancel_deferred_work(struct r8192_priv *priv); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: bcm: remove Version.h file.
many of the macros defined in Version.h are not being used, so we can remove the file. Signed-off-by: navin patidar --- drivers/staging/bcm/Bcmchar.c |4 ++-- drivers/staging/bcm/Version.h | 29 - drivers/staging/bcm/headers.h |3 +-- 3 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 drivers/staging/bcm/Version.h diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index f67a225..f91bc1f 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1004,9 +1004,9 @@ cntrlEnd: if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) return -EFAULT; - len = min_t(ulong, IoBuffer.OutputLength, strlen(VER_FILEVERSION_STR) + 1); + len = min_t(ulong, IoBuffer.OutputLength, strlen(DRV_VERSION) + 1); - if (copy_to_user(IoBuffer.OutputBuffer, VER_FILEVERSION_STR, len)) + if (copy_to_user(IoBuffer.OutputBuffer, DRV_VERSION, len)) return -EFAULT; Status = STATUS_SUCCESS; break; diff --git a/drivers/staging/bcm/Version.h b/drivers/staging/bcm/Version.h deleted file mode 100644 index f1cb9de..000 --- a/drivers/staging/bcm/Version.h +++ /dev/null @@ -1,29 +0,0 @@ -/*Copyright (c) 2005 Beceem Communications Inc. - -Module Name: - - Version.h - -Abstract: - - ---*/ - -#ifndef VERSION_H -#define VERSION_H - - -#define VER_FILETYPEVFT_DRV -#define VER_FILESUBTYPE VFT2_DRV_NETWORK - -#define VER_FILEVERSION 5.2.45 -#define VER_FILEVERSION_STR "5.2.45" - -#undef VER_PRODUCTVERSION -#define VER_PRODUCTVERSION VER_FILEVERSION - -#undef VER_PRODUCTVERSION_STR -#define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR - - -#endif /* VERSION_H */ diff --git a/drivers/staging/bcm/headers.h b/drivers/staging/bcm/headers.h index da47db8..7fd21c6 100644 --- a/drivers/staging/bcm/headers.h +++ b/drivers/staging/bcm/headers.h @@ -38,7 +38,6 @@ #include #include "Typedefs.h" -#include "Version.h" #include "Macros.h" #include "HostMIBSInterface.h" #include "cntrl_SignalingInterface.h" @@ -71,7 +70,7 @@ #define DEV_NAME "tarang" #define DRV_DESCRIPTION "Beceem Communications Inc. WiMAX driver" #define DRV_COPYRIGHT "Copyright 2010. Beceem Communications Inc" -#define DRV_VERSIONVER_FILEVERSION_STR +#define DRV_VERSION"5.2.45" #define PFXDRV_NAME " " extern struct class *bcm_class; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: dgrp: add __init/__exit macros
add __init/__exit macros to related init/cleanup functions. Signed-off-by: navin patidar --- drivers/staging/dgrp/dgrp_driver.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_driver.c b/drivers/staging/dgrp/dgrp_driver.c index e456dc6c..08eedf0 100644 --- a/drivers/staging/dgrp/dgrp_driver.c +++ b/drivers/staging/dgrp/dgrp_driver.c @@ -52,19 +52,12 @@ MODULE_PARM_DESC(register_prdevices, "Turn on/off registering transparent print module_param_named(pollrate, dgrp_poll_tick, int, 0644); MODULE_PARM_DESC(pollrate, "Poll interval in ms"); -/* Driver load/unload functions */ -static int dgrp_init_module(void); -static void dgrp_cleanup_module(void); - -module_init(dgrp_init_module); -module_exit(dgrp_cleanup_module); - /* * init_module() * * Module load. This is where it all starts. */ -static int dgrp_init_module(void) +static int __init dgrp_init_module(void) { int ret; @@ -89,7 +82,7 @@ static int dgrp_init_module(void) /* * Module unload. This is where it all ends. */ -static void dgrp_cleanup_module(void) +static void __exit dgrp_cleanup_module(void) { struct nd_struct *nd, *next; @@ -108,3 +101,6 @@ static void dgrp_cleanup_module(void) kfree(nd); } } + +module_init(dgrp_init_module); +module_exit(dgrp_cleanup_module); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 3/3] staging: rtl8188eu: remove header file ethernet.h
"ethernet.h" is included in three files but only "rtw_recv.c" using two macros defined in "ethernet.h", so move used macros in "rtw_recv.c" and remove "include/ethernet.h" header file and inclusion of this header file. v2: First version of this patch failed to apply. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_recv.c |4 ++- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 - drivers/staging/rtl8188eu/include/ethernet.h | 42 drivers/staging/rtl8188eu/os_dep/recv_linux.c |1 - 4 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/ethernet.h diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index c8491f6..4de98b6 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -23,11 +23,13 @@ #include #include #include -#include #include #include #include +#define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */ +#define LLC_HEADER_SIZE6 /* LLC Header Length */ + static u8 SNAP_ETH_TYPE_IPX[2] = {0x81, 0x37}; static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3}; diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 540c5ad..b1b1584 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/include/ethernet.h b/drivers/staging/rtl8188eu/include/ethernet.h deleted file mode 100644 index a59f912..000 --- a/drivers/staging/rtl8188eu/include/ethernet.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ -/*! \file */ -#ifndef __INC_ETHERNET_H -#define __INC_ETHERNET_H - -#define ETHERNET_ADDRESS_LENGTH6 /* Ethernet Address Length */ -#define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */ -#define LLC_HEADER_SIZE6 /* LLC Header Length */ -#define TYPE_LENGTH_FIELD_SIZE 2 /* Type/Length Size */ -#define MINIMUM_ETHERNET_PACKET_SIZE 60 /* Min Ethernet Packet Size */ -#define MAXIMUM_ETHERNET_PACKET_SIZE 1514/* Max Ethernet Packet Size */ - -/* Is Multicast Address? */ -#define RT_ETH_IS_MULTICAST(_addr) u8 *)(_addr))[0]&0x01) != 0) -#define RT_ETH_IS_BROADCAST(_addr) ( \ - ((u8 *)(_addr))[0] == 0xff && \ - ((u8 *)(_addr))[1] == 0xff && \ - ((u8 *)(_addr))[2] == 0xff && \ - ((u8 *)(_addr))[3] == 0xff && \ - ((u8 *)(_addr))[4] == 0xff && \ - ((u8 *)(_addr))[5] == 0xff) /* Is Broadcast Address? */ - - -#endif /* #ifndef __INC_ETHERNET_H */ diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index fd8ca60..3eff225 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -26,7 +26,6 @@ #include #include -#include #include /* init os related resource in struct recv_priv */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] staging: rtl8188eu: remove header file ethernet.h
I've submitted second version of this patch. regards, --navin-patidar On Wed, Feb 12, 2014 at 2:03 AM, Greg KH wrote: > On Sun, Feb 09, 2014 at 02:10:46PM +0530, navin patidar wrote: >> "ethernet.h" is included in three files but only "rtw_recv.c" using two >> macros >> defined in "ethernet.h", so move used macros in "rtw_recv.c" and >> remove "include/ethernet.h" header file and inclusion of this header file. >> >> Signed-off-by: navin patidar >> --- >> drivers/staging/rtl8188eu/core/rtw_recv.c |4 ++- >> drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 - >> drivers/staging/rtl8188eu/include/ethernet.h | 42 >> >> drivers/staging/rtl8188eu/os_dep/recv_linux.c |1 - >> 4 files changed, 3 insertions(+), 45 deletions(-) >> delete mode 100644 drivers/staging/rtl8188eu/include/ethernet.h > > This patch fails to apply (2/3 had fuzz, but I fixed that up), can you > redo this against linux-next and resend it? > > thanks, > > greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: rtl8188eu: remove unused header files
Remove h2clbk.h and nic_spec.h header files. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/h2clbk.h | 35 drivers/staging/rtl8188eu/include/nic_spec.h | 44 -- 2 files changed, 79 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/h2clbk.h delete mode 100644 drivers/staging/rtl8188eu/include/nic_spec.h diff --git a/drivers/staging/rtl8188eu/include/h2clbk.h b/drivers/staging/rtl8188eu/include/h2clbk.h deleted file mode 100644 index e595030..000 --- a/drivers/staging/rtl8188eu/include/h2clbk.h +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ - - -#define _H2CLBK_H_ - - -#include -#include - - -void _lbk_cmd(struct adapter *adapter); - -void _lbk_rsp(struct adapter *adapter); - -void _lbk_evt(IN struct adapter *adapter); - -void h2c_event_callback(unsigned char *dev, unsigned char *pbuf); diff --git a/drivers/staging/rtl8188eu/include/nic_spec.h b/drivers/staging/rtl8188eu/include/nic_spec.h deleted file mode 100644 index d422447..000 --- a/drivers/staging/rtl8188eu/include/nic_spec.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ - - -#ifndef __NIC_SPEC_H__ -#define __NIC_SPEC_H__ - -#define RTL8711_MCTRL_ (0x2) -#define RTL8711_UART_ (0x3) -#define RTL8711_TIMER_ (0x4) -#define RTL8711_FINT_ (0x5) -#define RTL8711_HINT_ (0x5) -#define RTL8711_GPIO_ (0x6) -#define RTL8711_WLANCTRL_ (0x20) -#define RTL8711_WLANFF_(0xe0) -#define RTL8711_HCICTRL_ (0x60) -#define RTL8711_SYSCFG_(0x62) -#define RTL8711_SYSCTRL_ (0x62) -#define RTL8711_MCCTRL_(0x02) - - -#include - -#include - - -#endif /* __RTL8711_SPEC_H__ */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: rtl8187se: Remove pt_regs * irq handler parameter
struct pt_regs pointer is no longer passed as a irq handler argument. Signed-off-by: navin patidar --- drivers/staging/rtl8187se/r8180_core.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index ca69155..d722bed 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -197,7 +197,7 @@ inline void force_pci_posting(struct net_device *dev) mb(); } -irqreturn_t rtl8180_interrupt(int irq, void *netdev, struct pt_regs *regs); +static irqreturn_t rtl8180_interrupt(int irq, void *netdev); void set_nic_rxring(struct net_device *dev); void set_nic_txring(struct net_device *dev); static struct net_device_stats *rtl8180_stats(struct net_device *dev); @@ -3537,7 +3537,7 @@ void rtl8180_tx_isr(struct net_device *dev, int pri, short error) spin_unlock_irqrestore(&priv->tx_lock, flag); } -irqreturn_t rtl8180_interrupt(int irq, void *netdev, struct pt_regs *regs) +irqreturn_t rtl8180_interrupt(int irq, void *netdev) { struct net_device *dev = (struct net_device *) netdev; struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: rtl8187se: Remove pt_regs * irq handler parameter
On August 23, 2013 at 5:18 PM Dan Carpenter wrote: > On Fri, Aug 23, 2013 at 05:00:06PM +0530, navin patidar wrote: > > struct pt_regs pointer is no longer passed as a irq handler > > argument. > > > > Good eye. > > Could you also remove the cast to (void *) so the compiler can catch > this in the future? > > - if (request_irq(dev->irq, (void *)rtl8180_interrupt, IRQF_SHARED, > dev->name, dev)) { > + if (request_irq(dev->irq, rtl8180_interrupt, IRQF_SHARED, dev->name, dev)) { > i will resend patch with this. regards, --navin-patidar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2] staging: rtl8187se: Remove pt_regs * irq handler parameter
struct pt_regs pointer is no longer passed as a irq handler argument. v2: remove rtl8180_interrupt cast to (void *) . Signed-off-by: navin patidar --- drivers/staging/rtl8187se/r8180_core.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index ca69155..eee4fd3 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -197,7 +197,7 @@ inline void force_pci_posting(struct net_device *dev) mb(); } -irqreturn_t rtl8180_interrupt(int irq, void *netdev, struct pt_regs *regs); +static irqreturn_t rtl8180_interrupt(int irq, void *netdev); void set_nic_rxring(struct net_device *dev); void set_nic_txring(struct net_device *dev); static struct net_device_stats *rtl8180_stats(struct net_device *dev); @@ -2666,7 +2666,7 @@ short rtl8180_init(struct net_device *dev) TX_BEACON_RING_ADDR)) return -ENOMEM; - if (request_irq(dev->irq, (void *)rtl8180_interrupt, IRQF_SHARED, dev->name, dev)) { + if (request_irq(dev->irq, rtl8180_interrupt, IRQF_SHARED, dev->name, dev)) { DMESGE("Error allocating IRQ %d", dev->irq); return -1; } else { @@ -3537,7 +3537,7 @@ void rtl8180_tx_isr(struct net_device *dev, int pri, short error) spin_unlock_irqrestore(&priv->tx_lock, flag); } -irqreturn_t rtl8180_interrupt(int irq, void *netdev, struct pt_regs *regs) +irqreturn_t rtl8180_interrupt(int irq, void *netdev) { struct net_device *dev = (struct net_device *) netdev; struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/3] staging: usbip: vhci_hcd: remove check for dma
vhci_hcd is a virtual usb host controller, so no need to check for dma. Signed-off-by: navin patidar --- drivers/staging/usbip/vhci_hcd.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index b3c9217..e810ad5 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c @@ -999,12 +999,6 @@ static int vhci_hcd_probe(struct platform_device *pdev) usbip_dbg_vhci_hc("name %s id %d\n", pdev->name, pdev->id); - /* will be removed */ - if (pdev->dev.dma_mask) { - dev_info(&pdev->dev, "vhci_hcd DMA not supported\n"); - return -EINVAL; - } - /* * Allocate and initialize hcd. * Our private data is also allocated automatically. -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/3] staging: usbip: vhci_hcd: correctly handle return value
ret == 0 means success, anything else is failure. Signed-off-by: navin patidar --- drivers/staging/usbip/vhci_hcd.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index d7974cb..b3c9217 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c @@ -1146,11 +1146,11 @@ static int __init vhci_hcd_init(void) return -ENODEV; ret = platform_driver_register(&vhci_driver); - if (ret < 0) + if (ret) goto err_driver_register; ret = platform_device_register(&the_pdev); - if (ret < 0) + if (ret) goto err_platform_device_register; pr_info(DRIVER_DESC " v" USBIP_VERSION "\n"); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/3] staging: usbip: stub_main: correctly handle return value
ret == 0 means success, anything else is failure. Signed-off-by: navin patidar --- drivers/staging/usbip/stub_main.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/usbip/stub_main.c b/drivers/staging/usbip/stub_main.c index 33027cc..baf857f 100644 --- a/drivers/staging/usbip/stub_main.c +++ b/drivers/staging/usbip/stub_main.c @@ -255,14 +255,14 @@ static int __init usbip_host_init(void) } ret = usb_register(&stub_driver); - if (ret < 0) { + if (ret) { pr_err("usb_register failed %d\n", ret); goto err_usb_register; } ret = driver_create_file(&stub_driver.drvwrap.driver, &driver_attr_match_busid); - if (ret < 0) { + if (ret) { pr_err("driver_create_file failed\n"); goto err_create_file; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: usbip: Fix build on Debian ppc
On September 19, 2013 at 3:40 PM Dominik Paulus wrote: > On Thu, Sep 19, 2013 at 12:12:44PM +0300, Dan Carpenter wrote: > > On Thu, Sep 19, 2013 at 10:55:18AM +0200, Tobias Polzer wrote: > > > When testing usbip under powerpc, it (unexpectedly) worked, but only after > > > removing the following lines from vhch_hcd.c: > > > > > > 1004 /* will be removed */ > > > 1005 if (pdev->dev.dma_mask) { > > > 1006 dev_info(&pdev->dev, "vhci_hcd DMA not supported\n"); > > > 1007 return -EINVAL; > > > 1008 } > > > > > > We encountered no problems without those lines. Is it safe to remove this > > > check? > > > > Hehe. No. > > > > Also which vhch_hcd.c are you talking about? "find -name vhch_hcd.c" > > doesn't show anything. > > Sorry for the typo, we meant vhci_hcd.c in > drivers/staging/usbip/vhci_hcd.c. > > > What the error message? > > When modprobing vhci_hcd.ko, vhci_hcd_probe() fails and returns -EINVAL, > resulting in this error message: > > [ 592.623292] vhci_hcd vhci_hcd: vhci_hcd DMA not supported > [ 592.624031] vhci_hcd: probe of vhci_hcd failed with error -22 > > This leads to the virtual host controller device (vhci) not being > created, so usbip cannot work. > It works after removing the codeblock mentioned above. > > We did some research and discovered that dma_mask is only set on PowerPC > at the moment (in arch/powerpc/kernel/setup-common.c, > arch_setup_pdev_archdata()). > > All of our testing was done in QEMU emulating Debian on POWER7. > I have already submitted a patch to remove mentioned code block. patch link : https://lkml.org/lkml/2013/9/10/26 regards, --navin-patidar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/3] staging: rtl8188eu: remove header file if_ether.h
"if_ether.h" is included in three files but not being used, so remove "include/if_ether.h" header file and inclusion of this header file. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_recv.c |1 - drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 - drivers/staging/rtl8188eu/include/if_ether.h | 111 drivers/staging/rtl8188eu/os_dep/xmit_linux.c |1 - 4 files changed, 114 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/if_ether.h diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 8490d51..92fb12e 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 17c94f4..6e84f08 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/include/if_ether.h b/drivers/staging/rtl8188eu/include/if_ether.h deleted file mode 100644 index db15771..000 --- a/drivers/staging/rtl8188eu/include/if_ether.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ - -#ifndef _LINUX_IF_ETHER_H -#define _LINUX_IF_ETHER_H - -/* - * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble - * and FCS/CRC (frame check sequence). - */ - -#define ETH_ALEN 6 /* Octets in one ethernet addr */ -#define ETH_HLEN 14 /* Total octets in header. */ -#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ -#define ETH_DATA_LEN 1500/* Max. octets in payload*/ -#define ETH_FRAME_LEN 1514/* Max. octets in frame sans FCS */ - -/* - * These are the defined Ethernet Protocol ID's. - */ - -#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */ -#define ETH_P_PUP 0x0200 /* Xerox PUP packet */ -#define ETH_P_PUPAT0x0201 /* Xerox PUP Addr Trans packet */ -#define ETH_P_IP 0x0800 /* Internet Protocol packet */ -#define ETH_P_X25 0x0805 /* CCITT X.25 */ -#define ETH_P_ARP 0x0806 /* Address Resolution packet*/ -#defineETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet */ -#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ -#define ETH_P_IEEEPUPAT0x0a01 /* Xerox IEEE802.3 PUP */ -#define ETH_P_DEC 0x6000 /* DEC Assigned proto */ -#define ETH_P_DNA_DL0x6001 /* DEC DNA Dump/Load*/ -#define ETH_P_DNA_RC0x6002 /* DEC DNA Remote Console */ -#define ETH_P_DNA_RT0x6003 /* DEC DNA Routing */ -#define ETH_P_LAT 0x6004 /* DEC LAT */ -#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */ -#define ETH_P_CUST 0x6006 /* DEC Customer use */ -#define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */ -#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ -#define ETH_P_ATALK0x809B /* Appletalk DDP*/ -#define ETH_P_AARP 0x80F3 /* Appletalk AARP */ -#define ETH_P_8021Q0x8100 /* 802.1Q VLAN Extended Header */ -#define ETH_P_IPX 0x8137 /* IPX over DIX */ -#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ -#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */ -#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */ -#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ -#define ETH_P_ATMFATE 0x888
[PATCH 2/3] staging: rtl8188eu: remove header file ip.h
"ip.h" is included in four files but not being used, so remove "include/ip.h" header file and inclusion of this header file. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_recv.c |1 - drivers/staging/rtl8188eu/core/rtw_xmit.c |1 - drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 - drivers/staging/rtl8188eu/include/ip.h | 126 drivers/staging/rtl8188eu/os_dep/xmit_linux.c |1 - 5 files changed, 130 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/ip.h diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 92fb12e..b49a246 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index aa77270..ca7a25a 100644 --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 6e84f08..540c5ad 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/include/ip.h b/drivers/staging/rtl8188eu/include/ip.h deleted file mode 100644 index 9fdac6d..000 --- a/drivers/staging/rtl8188eu/include/ip.h +++ /dev/null @@ -1,126 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ -#ifndef _LINUX_IP_H -#define _LINUX_IP_H - -/* SOL_IP socket options */ - -#define IPTOS_TOS_MASK 0x1E -#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK) -#defineIPTOS_LOWDELAY 0x10 -#defineIPTOS_THROUGHPUT0x08 -#defineIPTOS_RELIABILITY 0x04 -#defineIPTOS_MINCOST 0x02 - -#define IPTOS_PREC_MASK0xE0 -#define IPTOS_PREC(tos)((tos)&IPTOS_PREC_MASK) -#define IPTOS_PREC_NETCONTROL 0xe0 -#define IPTOS_PREC_INTERNETCONTROL 0xc0 -#define IPTOS_PREC_CRITIC_ECP 0xa0 -#define IPTOS_PREC_FLASHOVERRIDE0x80 -#define IPTOS_PREC_FLASH0x60 -#define IPTOS_PREC_IMMEDIATE0x40 -#define IPTOS_PREC_PRIORITY 0x20 -#define IPTOS_PREC_ROUTINE 0x00 - - -/* IP options */ -#define IPOPT_COPY 0x80 -#define IPOPT_CLASS_MASK 0x60 -#define IPOPT_NUMBER_MASK 0x1f - -#defineIPOPT_COPIED(o) ((o)&IPOPT_COPY) -#defineIPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK) -#defineIPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK) - -#defineIPOPT_CONTROL 0x00 -#defineIPOPT_RESERVED1 0x20 -#defineIPOPT_MEASUREMENT 0x40 -#defineIPOPT_RESERVED2 0x60 - -#define IPOPT_END (0 | IPOPT_CONTROL) -#define IPOPT_NOOP (1 | IPOPT_CONTROL) -#define IPOPT_SEC (2 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_LSRR (3 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_TIMESTAMP(4 | IPOPT_MEASUREMENT) -#define IPOPT_RR (7 | IPOPT_CONTROL) -#define IPOPT_SID (8 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_SSRR (9 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_RA (20 | IPOPT_CONTROL | IPOPT_COPY) - -#define IPVERSION 4 -#define MAXTTL 255 -#define IPDEFTTL 64 -#define IPOPT_OPTVAL 0 -#define IPOPT_OLEN 1 -#define IPOPT_OFFSET 2 -#define IPOPT_MINOFF 4 -#define MAX_IPOPTLEN 40 -#define IPOPT_NOP IPOPT_NOOP -#define IPOPT_EOL IPOPT_END -#define IPOPT_TS IPOPT_TIMESTAMP - -#defineIPOPT_TS_TSONLY 0 /* timestamps only */ -#defineIPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ -#defineIPOPT_TS_PRESPEC3
[PATCH 3/3] staging: rtl8188eu: remove header file ethernet.h
"ethernet.h" is included in three files but only "rtw_recv.c" using two macros defined in "ethernet.h", so move used macros in "rtw_recv.c" and remove "include/ethernet.h" header file and inclusion of this header file. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_recv.c |4 ++- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 - drivers/staging/rtl8188eu/include/ethernet.h | 42 drivers/staging/rtl8188eu/os_dep/recv_linux.c |1 - 4 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/ethernet.h diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index b49a246..b9d86cd 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -23,10 +23,12 @@ #include #include #include -#include #include #include +#define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */ +#define LLC_HEADER_SIZE6 /* LLC Header Length */ + static u8 SNAP_ETH_TYPE_IPX[2] = {0x81, 0x37}; static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3}; diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 540c5ad..b1b1584 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/include/ethernet.h b/drivers/staging/rtl8188eu/include/ethernet.h deleted file mode 100644 index a59f912..000 --- a/drivers/staging/rtl8188eu/include/ethernet.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ -/*! \file */ -#ifndef __INC_ETHERNET_H -#define __INC_ETHERNET_H - -#define ETHERNET_ADDRESS_LENGTH6 /* Ethernet Address Length */ -#define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */ -#define LLC_HEADER_SIZE6 /* LLC Header Length */ -#define TYPE_LENGTH_FIELD_SIZE 2 /* Type/Length Size */ -#define MINIMUM_ETHERNET_PACKET_SIZE 60 /* Min Ethernet Packet Size */ -#define MAXIMUM_ETHERNET_PACKET_SIZE 1514/* Max Ethernet Packet Size */ - -/* Is Multicast Address? */ -#define RT_ETH_IS_MULTICAST(_addr) u8 *)(_addr))[0]&0x01) != 0) -#define RT_ETH_IS_BROADCAST(_addr) ( \ - ((u8 *)(_addr))[0] == 0xff && \ - ((u8 *)(_addr))[1] == 0xff && \ - ((u8 *)(_addr))[2] == 0xff && \ - ((u8 *)(_addr))[3] == 0xff && \ - ((u8 *)(_addr))[4] == 0xff && \ - ((u8 *)(_addr))[5] == 0xff) /* Is Broadcast Address? */ - - -#endif /* #ifndef __INC_ETHERNET_H */ diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index 2a18b32..b4f44f2 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -26,7 +26,6 @@ #include #include -#include #include /* init os related resource in struct recv_priv */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: usbip: replace pr_warning() with pr_warn()
pr_warn() is preferred over pr_warning(). Signed-off-by: navin patidar --- drivers/staging/usbip/usbip_event.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/usbip/usbip_event.c b/drivers/staging/usbip/usbip_event.c index 82123be..64933b9 100644 --- a/drivers/staging/usbip/usbip_event.c +++ b/drivers/staging/usbip/usbip_event.c @@ -85,7 +85,7 @@ int usbip_start_eh(struct usbip_device *ud) ud->eh = kthread_run(event_handler_loop, ud, "usbip_eh"); if (IS_ERR(ud->eh)) { - pr_warning("Unable to start control thread\n"); + pr_warn("Unable to start control thread\n"); return PTR_ERR(ud->eh); } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: usbip: replace pr_warning() with pr_warn()
On Tue, Jun 25, 2013, Greg KH said: > On Fri, Jun 21, 2013 at 03:01:04PM +0530, navin patidar wrote: >> pr_warn() is preferred over pr_warning(). > > And dev_warn() is preferred over both of them, can you convert the code > to use that instead? > struct device is not available in usbip_start_eh() which is required for dev_warn(). usbip_device's containers struct stub_device and struct vhci_device both have member structure usb_device but inside usbip_start_eh(), it is difficult to determine to which container struct usbip_device belongs, thus container_of() can not be used here to get struct usb_device. regards, --navin-patidar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[no subject]
On Tue, Jun 25, 2013, Greg KH said: > On Tue, Jun 25, 2013 at 04:27:18PM +0530, navin patidar wrote: >> On Tue, Jun 25, 2013, Greg KH said: >> >> > On Fri, Jun 21, 2013 at 03:01:04PM +0530, navin patidar wrote: >> >> pr_warn() is preferred over pr_warning(). >> > >> > And dev_warn() is preferred over both of them, can you convert the code >> > to use that instead? >> > >> >> struct device is not available in usbip_start_eh() which is required >> for dev_warn(). >> >> usbip_device's containers struct stub_device and struct vhci_device >> both have member structure usb_device but inside usbip_start_eh(), it >> is difficult to determine to which container struct usbip_device >> belongs, thus container_of() can not be used here to get struct >> usb_device. > > Then the code should be reworked in order to be able to properly > determine that. How about adding a usb_device pointer in usbip_device structure ? regards, --navin-patidar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: usbip: replace pr_warning() with pr_warn()
On Tue, Jun 25, 2013, Greg KH said: > On Tue, Jun 25, 2013 at 04:27:18PM +0530, navin patidar wrote: >> On Tue, Jun 25, 2013, Greg KH said: >> >> > On Fri, Jun 21, 2013 at 03:01:04PM +0530, navin patidar wrote: >> >> pr_warn() is preferred over pr_warning(). >> > >> > And dev_warn() is preferred over both of them, can you convert the code >> > to use that instead? >> > >> >> struct device is not available in usbip_start_eh() which is required >> for dev_warn(). >> >> usbip_device's containers struct stub_device and struct vhci_device >> both have member structure usb_device but inside usbip_start_eh(), it >> is difficult to determine to which container struct usbip_device >> belongs, thus container_of() can not be used here to get struct >> usb_device. > > Then the code should be reworked in order to be able to properly > determine that. > struct usbip_device has enum type usbip_side variable which can be used to determine container of usbip_device. I should have looked usbip_device struct more carefully. sorry for previous wrong info. regards, --navin-patidar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2] staging: usbip: replace pr_warning() with dev_warn().
dev_warn() is preferred over pr_warning(). container_of() is used to get usb_driver pointer from usbip_device container (stub_device or vhci_device), to get device structure required for dev_warn(). Signed-off-by: navin patidar --- drivers/staging/usbip/usbip_event.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/staging/usbip/usbip_event.c b/drivers/staging/usbip/usbip_event.c index 82123be..3bd1b94 100644 --- a/drivers/staging/usbip/usbip_event.c +++ b/drivers/staging/usbip/usbip_event.c @@ -21,6 +21,8 @@ #include #include "usbip_common.h" +#include "stub.h" +#include "vhci.h" static int event_handler(struct usbip_device *ud) { @@ -85,7 +87,17 @@ int usbip_start_eh(struct usbip_device *ud) ud->eh = kthread_run(event_handler_loop, ud, "usbip_eh"); if (IS_ERR(ud->eh)) { - pr_warning("Unable to start control thread\n"); + struct device dev; + if (ud->side == USBIP_STUB) { + struct stub_device *sdev; + sdev = container_of(ud, struct stub_device, ud); + dev = sdev->udev->dev; + } else { + struct vhci_device *vdev; + vdev = container_of(ud, struct vhci_device, ud); + dev = vdev->udev->dev; + } + dev_warn(&dev, "Unable to start control thread\n"); return PTR_ERR(ud->eh); } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v3] staging: usbip: replace pr_warning() with dev_warn().
dev_warn() is preferred over pr_warning(). container_of() is used to get usb_driver pointer from usbip_device container (stub_device or vhci_device), to get device structure required for dev_warn(). Signed-off-by: navin patidar --- drivers/staging/usbip/usbip_event.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/staging/usbip/usbip_event.c b/drivers/staging/usbip/usbip_event.c index 82123be..eca14b7 100644 --- a/drivers/staging/usbip/usbip_event.c +++ b/drivers/staging/usbip/usbip_event.c @@ -21,6 +21,8 @@ #include #include "usbip_common.h" +#include "stub.h" +#include "vhci.h" static int event_handler(struct usbip_device *ud) { @@ -85,7 +87,20 @@ int usbip_start_eh(struct usbip_device *ud) ud->eh = kthread_run(event_handler_loop, ud, "usbip_eh"); if (IS_ERR(ud->eh)) { - pr_warning("Unable to start control thread\n"); + struct device dev; + + if (ud->side == USBIP_STUB) { + struct stub_device *sdev; + + sdev = container_of(ud, struct stub_device, ud); + dev = sdev->udev->dev; + } else { + struct vhci_device *vdev; + + vdev = container_of(ud, struct vhci_device, ud); + dev = vdev->udev->dev; + } + dev_warn(&dev, "Unable to start control thread\n"); return PTR_ERR(ud->eh); } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v4] staging: usbip: replace pr_warning() with dev_warn().
dev_warn() is preferred over pr_warning(). container_of() is used to get usb_driver pointer from usbip_device container (stub_device or vhci_device), to get device structure required for dev_warn(). Signed-off-by: navin patidar --- drivers/staging/usbip/usbip_event.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/staging/usbip/usbip_event.c b/drivers/staging/usbip/usbip_event.c index 82123be..1f3a571 100644 --- a/drivers/staging/usbip/usbip_event.c +++ b/drivers/staging/usbip/usbip_event.c @@ -21,6 +21,8 @@ #include #include "usbip_common.h" +#include "stub.h" +#include "vhci.h" static int event_handler(struct usbip_device *ud) { @@ -85,7 +87,14 @@ int usbip_start_eh(struct usbip_device *ud) ud->eh = kthread_run(event_handler_loop, ud, "usbip_eh"); if (IS_ERR(ud->eh)) { - pr_warning("Unable to start control thread\n"); + struct device *dev; + + if (ud->side == USBIP_STUB) + dev = &container_of(ud, struct stub_device, ud)->udev->dev; + else + dev = &container_of(ud, struct vhci_device, ud)->udev->dev; + + dev_warn(dev, "Unable to start control thread\n"); return PTR_ERR(ud->eh); } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v4] staging: usbip: replace pr_warning() with dev_warn().
On Wed, Jul 24, 2013, Greg KH said: > On Thu, Jun 27, 2013 at 03:34:52PM +0530, navin patidar wrote: >> dev_warn() is preferred over pr_warning(). >> >> container_of() is used to get usb_driver pointer from usbip_device container >> (stub_device or vhci_device), to get device structure required for >> dev_warn(). >> >> Signed-off-by: navin patidar >> --- >> drivers/staging/usbip/usbip_event.c | 11 ++- >> 1 file changed, 10 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/staging/usbip/usbip_event.c >> b/drivers/staging/usbip/usbip_event.c >> index 82123be..1f3a571 100644 >> --- a/drivers/staging/usbip/usbip_event.c >> +++ b/drivers/staging/usbip/usbip_event.c >> @@ -21,6 +21,8 @@ >> #include >> >> #include "usbip_common.h" >> +#include "stub.h" >> +#include "vhci.h" >> >> static int event_handler(struct usbip_device *ud) >> { >> @@ -85,7 +87,14 @@ int usbip_start_eh(struct usbip_device *ud) >> >> ud->eh = kthread_run(event_handler_loop, ud, "usbip_eh"); >> if (IS_ERR(ud->eh)) { >> -pr_warning("Unable to start control thread\n"); >> +struct device *dev; >> + >> +if (ud->side == USBIP_STUB) >> +dev = &container_of(ud, struct stub_device, ud)->udev->dev; >> +else >> +dev = &container_of(ud, struct vhci_device, ud)->udev->dev; > > Putting '&' in front of container_of seems odd, are you sure it's needed > here? If ud is a pointer, everything else should "just work" properly > without that. Removing '&' caused following error. drivers/staging/usbip/usbip_event.c: In function ‘usbip_start_eh’: drivers/staging/usbip/usbip_event.c:93:8: error: incompatible types when assigning to type ‘struct device *’ from type ‘struct device’ drivers/staging/usbip/usbip_event.c:95:8: error: incompatible types when assigning to type ‘struct device *’ from type ‘struct device’ dev needs to be initialized with address of dev (struct device ) which is member of struct usb_device pointed by the udev. To make it more clear i can change it to dev = &(container_of(ud, struct vhci_device, ud)->udev->dev); or struct vhci_device *vdev = container_of(ud, struct vhci_device, ud); dev = &(vdev->udev->dev); regards, --navin-patidar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v4] staging: usbip: replace pr_warning() with dev_warn().
On Thu, Jul 25, 2013, Greg KH said: > On Thu, Jul 25, 2013 at 10:19:31AM +0530, navin patidar wrote: >> >> -pr_warning("Unable to start control thread\n"); >> >> +struct device *dev; >> >> + >> >> +if (ud->side == USBIP_STUB) >> >> +dev = &container_of(ud, struct stub_device, ud)->udev->dev; >> >> +else >> >> +dev = &container_of(ud, struct vhci_device, ud)->udev->dev; >> > >> > Putting '&' in front of container_of seems odd, are you sure it's needed >> > here? If ud is a pointer, everything else should "just work" properly >> > without that. >> >> Removing '&' caused following error. >> drivers/staging/usbip/usbip_event.c: In function ‘usbip_start_eh’: >> drivers/staging/usbip/usbip_event.c:93:8: error: incompatible types >> when assigning to type ‘struct device *’ from type ‘struct device’ >> drivers/staging/usbip/usbip_event.c:95:8: error: incompatible types >> when assigning to type ‘struct device *’ from type ‘struct device’ >> >> dev needs to be initialized with address of dev (struct device ) which >> is member of struct usb_device pointed by the udev. >> >> To make it more clear i can change it to >> >> dev = &(container_of(ud, struct vhci_device, ud)->udev->dev); >> >> or >> >> struct vhci_device *vdev = container_of(ud, struct vhci_device, ud); >> dev = &(vdev->udev->dev); > > Or perhaps: > dev = container_of(ud, struct stub_device, ud).udev->dev; container_of() returns stub_device pointer so "container_of(ud, struct stub_device, ud).udev->dev" won't work. > or ->udev.dev; I don't remember which, but that should work, right? udev is also a pointer to usb_device structure inside stub_device structure. ->udev->dev only will work. v4 patch gets compiled without any error or warning. and actually Joe Perches reviewed v3 of the patch and suggested changes. https://lkml.org/lkml/2013/6/27/15 regards, --navin-patidar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 03/10] staging: rtl8188eu: Remove _ReadLEDSetting() function.
Hi dan it's just a cleanup patch and i also tested all patches of this patch series on the hardware (TP-LINK TL-WN723N). my mistake i should have added "Tested-by" tag for all patches. Tested-by: navin patidar regards, --navin-patidar On Tue, Apr 22, 2014 at 3:41 PM, Dan Carpenter wrote: > On Sun, Apr 20, 2014 at 02:17:11PM +0530, navin patidar wrote: >> _ReadLEDSetting() doesn't read led settings this function actually >> initialize member variables of struct led_priv, we should do that >> inside rtl8188eu_InitSwLeds(). >> > > This seems like a bugfix or is it just a cleanup? It's not clear to me > from the patch description. Have you tested this patch? > > regards, > dan carpenter > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 09/10] staging: rtl8188eu: Remove unused enum LED_STATE_871x members.
dan, It is ok to rearrange and remove members of enum LED_STATE_871x and enum LED_CTL_MODE. these enum are not related to firmware . regards, --navin-patidar On Tue, Apr 22, 2014 at 4:05 PM, Dan Carpenter wrote: > It's ok to renumber all of these? It's not something the firmware will > care about? Have you tested this? Same for patch 10/10. > > (These questions are just questions. I don't ask rhetorical questions > on email. I don't know the answers). > > regards, > dan carpenter > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 03/10] staging: rtl8188eu: Remove _ReadLEDSetting() function.
On Tue, Apr 22, 2014 at 7:58 PM, Larry Finger wrote: > > To me, the opposite case is true. If you have not tested, then you need to > explicitly state "compile tested only" in the commit message. Without saying > that, your signed-off-by is implying that you have tested, as well as > declaring that you own the copyright to the material. I didn't know that signed-off-by implies both tested and authored. thanks for clearing that up. regards, --navin-patidar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/2] staging: rtl8188eu: Remove debugging messages from usb_dvobj_init()
Unnecessary debugging messages are removed from usb_dvobj_init(). Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 34 +++ 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index 49a4ce4..8a52829 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c @@ -187,30 +187,13 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf) if (phost_endp) { pendp_desc = &phost_endp->desc; - DBG_88E("\nusb_endpoint_descriptor(%d):\n", i); - DBG_88E("bLength=%x\n", pendp_desc->bLength); - DBG_88E("bDescriptorType=%x\n", - pendp_desc->bDescriptorType); - DBG_88E("bEndpointAddress=%x\n", - pendp_desc->bEndpointAddress); - DBG_88E("wMaxPacketSize=%d\n", - le16_to_cpu(pendp_desc->wMaxPacketSize)); - DBG_88E("bInterval=%x\n", pendp_desc->bInterval); - if (RT_usb_endpoint_is_bulk_in(pendp_desc)) { - DBG_88E("RT_usb_endpoint_is_bulk_in = %x\n", - RT_usb_endpoint_num(pendp_desc)); pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = RT_usb_endpoint_num(pendp_desc); pdvobjpriv->RtNumInPipes++; } else if (usb_endpoint_is_int(pendp_desc)) { - DBG_88E("usb_endpoint_is_int = %x, Interval = %x\n", - RT_usb_endpoint_num(pendp_desc), - pendp_desc->bInterval); pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = RT_usb_endpoint_num(pendp_desc); pdvobjpriv->RtNumInPipes++; } else if (RT_usb_endpoint_is_bulk_out(pendp_desc)) { - DBG_88E("RT_usb_endpoint_is_bulk_out = %x\n", - RT_usb_endpoint_num(pendp_desc)); pdvobjpriv->RtOutPipe[pdvobjpriv->RtNumOutPipes] = RT_usb_endpoint_num(pendp_desc); pdvobjpriv->RtNumOutPipes++; } @@ -218,25 +201,14 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf) } } - DBG_88E("nr_endpoint=%d, in_num=%d, out_num=%d\n\n", - pdvobjpriv->nr_endpoint, pdvobjpriv->RtNumInPipes, - pdvobjpriv->RtNumOutPipes); - - if (pusbd->speed == USB_SPEED_HIGH) { + if (pusbd->speed == USB_SPEED_HIGH) pdvobjpriv->ishighspeed = true; - DBG_88E("USB_SPEED_HIGH\n"); - } else { + else pdvobjpriv->ishighspeed = false; - DBG_88E("NON USB_SPEED_HIGH\n"); - } - if (rtw_init_intf_priv(pdvobjpriv) == _FAIL) { - RT_TRACE(_module_os_intfs_c_, _drv_err_, -("\n Can't INIT rtw_init_intf_priv\n")); + if (rtw_init_intf_priv(pdvobjpriv) == _FAIL) goto free_dvobj; - } - /* 3 misc */ sema_init(&(pdvobjpriv->usb_suspend_sema), 0); rtw_reset_continual_urb_error(pdvobjpriv); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/2] staging: rtl8188eu: Use USB subsystem functions to check endpoint type
Use inline functions provided by USB subsystem to check endpoint type, instead of inline functions implemented by driver to do the same. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 57 +-- 1 file changed, 10 insertions(+), 47 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index 8a52829..8ed2ac8 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c @@ -80,46 +80,6 @@ static struct rtw_usb_drv rtl8188e_usb_drv = { static struct rtw_usb_drv *usb_drv = &rtl8188e_usb_drv; -static inline int RT_usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) -{ - return (epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN; -} - -static inline int RT_usb_endpoint_dir_out(const struct usb_endpoint_descriptor *epd) -{ - return (epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT; -} - -static inline int RT_usb_endpoint_xfer_int(const struct usb_endpoint_descriptor *epd) -{ - return (epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT; -} - -static inline int RT_usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *epd) -{ - return (epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK; -} - -static inline int RT_usb_endpoint_is_bulk_in(const struct usb_endpoint_descriptor *epd) -{ - return RT_usb_endpoint_xfer_bulk(epd) && RT_usb_endpoint_dir_in(epd); -} - -static inline int RT_usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd) -{ - return RT_usb_endpoint_xfer_bulk(epd) && RT_usb_endpoint_dir_out(epd); -} - -static inline int usb_endpoint_is_int(const struct usb_endpoint_descriptor *epd) -{ - return RT_usb_endpoint_xfer_int(epd) && RT_usb_endpoint_dir_in(epd); -} - -static inline int RT_usb_endpoint_num(const struct usb_endpoint_descriptor *epd) -{ - return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; -} - static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj) { u8 rst = _SUCCESS; @@ -183,21 +143,24 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf) pdvobjpriv->nr_endpoint = piface_desc->bNumEndpoints; for (i = 0; i < pdvobjpriv->nr_endpoint; i++) { + int ep_num; phost_endp = phost_iface->endpoint + i; + if (phost_endp) { pendp_desc = &phost_endp->desc; + ep_num = usb_endpoint_num(pendp_desc); - if (RT_usb_endpoint_is_bulk_in(pendp_desc)) { - pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = RT_usb_endpoint_num(pendp_desc); + if (usb_endpoint_is_bulk_in(pendp_desc)) { + pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = ep_num; pdvobjpriv->RtNumInPipes++; - } else if (usb_endpoint_is_int(pendp_desc)) { - pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = RT_usb_endpoint_num(pendp_desc); + } else if (usb_endpoint_is_int_in(pendp_desc)) { + pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = ep_num; pdvobjpriv->RtNumInPipes++; - } else if (RT_usb_endpoint_is_bulk_out(pendp_desc)) { - pdvobjpriv->RtOutPipe[pdvobjpriv->RtNumOutPipes] = RT_usb_endpoint_num(pendp_desc); + } else if (usb_endpoint_is_bulk_out(pendp_desc)) { + pdvobjpriv->RtOutPipe[pdvobjpriv->RtNumOutPipes] = ep_num; pdvobjpriv->RtNumOutPipes++; } - pdvobjpriv->ep_num[i] = RT_usb_endpoint_num(pendp_desc); + pdvobjpriv->ep_num[i] = ep_num; } } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: rtl8188eu: Use USB subsystem functions to check endpoint type
On Mon, Apr 28, 2014 at 2:55 PM, Dan Carpenter wrote: > On Sat, Apr 26, 2014 at 10:13:55PM +0530, navin patidar wrote: >> Use inline functions provided by USB subsystem to check endpoint type, >> instead of macros implemented by driver to do the same. >> >> Unnecessary debugging messages are also removed. >> > > I like both these changes but they would have been so much easier to > review if you deleted the debugging messagese in [patch 1/2] and then > changed the endpoint functions in [patch 2/2]. > >> @@ -183,60 +143,36 @@ static struct dvobj_priv *usb_dvobj_init(struct >> usb_interface *usb_intf) >> pdvobjpriv->nr_endpoint = piface_desc->bNumEndpoints; >> >> for (i = 0; i < pdvobjpriv->nr_endpoint; i++) { >> + > > Don't put a blank line here, btw. > >> + int ep_num; >> phost_endp = phost_iface->endpoint + i; > > Anyway, please resend because it needs to be broken into two patches. dan, I just did that. regards, navin patidar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 02/15] staging: rtl8188eu: Remove function rtw_enqueue_recvbuf_to_head()
rtw_enqueue_recvbuf_to_head() is not being used by driver. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_recv.c| 12 drivers/staging/rtl8188eu/include/rtw_recv.h |1 - 2 files changed, 13 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index eac5260..21aa89d 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -289,18 +289,6 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter) return cnt; } -int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue) -{ - spin_lock_bh(&queue->lock); - - rtw_list_delete(&precvbuf->list); - rtw_list_insert_head(&precvbuf->list, get_list_head(queue)); - - spin_unlock_bh(&queue->lock); - - return _SUCCESS; -} - int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue) { unsigned long irqL; diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 7b95860..21ce405 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -302,7 +302,6 @@ int rtw_enqueue_recvframe(struct recv_frame *precvframe, struct __queue *queue); void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfree_recv_queue); u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter); -int rtw_enqueue_recvbuf_to_head(struct recv_buf *buf, struct __queue *queue); int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue); void rtw_reordering_ctrl_timeout_handler(void *pcontext); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 01/15] staging: rtl8188eu: Remove function rtw_dequeue_recvbuf()
rtw_dequeue_recvbuf() is not being used by driver. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_recv.c| 25 - drivers/staging/rtl8188eu/include/rtw_recv.h |1 - 2 files changed, 26 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 5c1d2d2..eac5260 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -313,31 +313,6 @@ int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue) return _SUCCESS; } -struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue) -{ - unsigned long irqL; - struct recv_buf *precvbuf; - struct list_head *plist, *phead; - - spin_lock_irqsave(&queue->lock, irqL); - - if (_rtw_queue_empty(queue)) { - precvbuf = NULL; - } else { - phead = get_list_head(queue); - - plist = phead->next; - - precvbuf = container_of(plist, struct recv_buf, list); - - rtw_list_delete(&precvbuf->list); - } - - spin_unlock_irqrestore(&queue->lock, irqL); - - return precvbuf; -} - static int recvframe_chkmic(struct adapter *adapter, struct recv_frame *precvframe) { diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index bcbce46..7b95860 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -304,7 +304,6 @@ void rtw_free_recvframe_queue(struct __queue *pframequeue, u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter); int rtw_enqueue_recvbuf_to_head(struct recv_buf *buf, struct __queue *queue); int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue); -struct recv_buf *rtw_dequeue_recvbuf(struct __queue *queue); void rtw_reordering_ctrl_timeout_handler(void *pcontext); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf
Following patches remove unnecessary member variables of struct recv_buf. navin patidar (15): staging: rtl8188eu: Remove function rtw_dequeue_recvbuf() staging: rtl8188eu: Remove function rtw_enqueue_recvbuf_to_head() staging: rtl8188eu: Remove function rtw_enqueue_recvbuf() staging: rtl8188eu: Remove 'struct list_head list' from struct recv_buf staging: rtl8188eu: Remove 'spinlock_t recvbuf_lock' from struct recv_buf staging: rtl8188eu: Remove 'dma_addr_t dma_transfer_addr' from struct recv_buf staging: rtl8188eu: Remove 'int transfer_len' from struct recv_buf staging: rtl8188eu: Remove pdata, phead, ptail and pend from struct recv_buf staging: rtl8188eu: Remove 'irp_pending' from struct recv_buf staging: rtl8188eu: Remove 'pallocated_buf' from struct recv_buf staging: rtl8188eu: Remove 'alloc_sz' from struct recv_buf staging: rtl8188eu: Remove 'u32 len' from struct recv_buf staging: rtl8188eu: Remove 'u32 ref_cnt' from struct recv_buf staging: rtl8188eu: Remove rtl8188eu_init_recvbuf() function staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf drivers/staging/rtl8188eu/core/rtw_recv.c | 49 - drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c| 20 - drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 17 +-- drivers/staging/rtl8188eu/include/rtl8188e_recv.h |1 - drivers/staging/rtl8188eu/include/rtw_recv.h | 17 --- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 15 +-- 6 files changed, 3 insertions(+), 116 deletions(-) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 06/15] staging: rtl8188eu: Remove 'dma_addr_t dma_transfer_addr' from struct recv_buf
Remove unused variable dma_transfer_addr. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/rtw_recv.h |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 4a19a06..bf9af77 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -245,7 +245,6 @@ struct recv_buf { u8 *ptail; u8 *pend; struct urb *purb; - dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */ u32 alloc_sz; u8 irp_pending; int transfer_len; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 03/15] staging: rtl8188eu: Remove function rtw_enqueue_recvbuf()
rtw_enqueue_recvbuf() is not being used by driver. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_recv.c| 12 drivers/staging/rtl8188eu/include/rtw_recv.h |1 - 2 files changed, 13 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 21aa89d..da26fa5c 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -289,18 +289,6 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter) return cnt; } -int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue) -{ - unsigned long irqL; - spin_lock_irqsave(&queue->lock, irqL); - - rtw_list_delete(&precvbuf->list); - - rtw_list_insert_tail(&precvbuf->list, get_list_head(queue)); - spin_unlock_irqrestore(&queue->lock, irqL); - return _SUCCESS; -} - static int recvframe_chkmic(struct adapter *adapter, struct recv_frame *precvframe) { diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 21ce405..677859e 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -302,7 +302,6 @@ int rtw_enqueue_recvframe(struct recv_frame *precvframe, struct __queue *queue); void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfree_recv_queue); u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter); -int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue); void rtw_reordering_ctrl_timeout_handler(void *pcontext); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 04/15] staging: rtl8188eu: Remove 'struct list_head list' from struct recv_buf
Users of 'struct list_head list' variable e.g. rtw_enqueue_recvbuf(), rtw_enqueue_recvbuf_to_head() and rtw_dequeue_recvbuf() are already removed. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 - drivers/staging/rtl8188eu/include/rtw_recv.h |1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index b1b1584..98a79ba 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -71,7 +71,6 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) precvbuf = (struct recv_buf *)precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { - _rtw_init_listhead(&precvbuf->list); spin_lock_init(&precvbuf->recvbuf_lock); precvbuf->alloc_sz = MAX_RECVBUF_SZ; res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf); diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 677859e..103849f 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -235,7 +235,6 @@ struct sta_recv_priv { }; struct recv_buf { - struct list_head list; spinlock_t recvbuf_lock; u32 ref_cnt; struct adapter *adapter; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 05/15] staging: rtl8188eu: Remove 'spinlock_t recvbuf_lock' from struct recv_buf
recvbuf_lock is initialized inside rtl8188eu_init_recv_priv() but never used. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 - drivers/staging/rtl8188eu/include/rtw_recv.h |1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 98a79ba..52d83a4 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -71,7 +71,6 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) precvbuf = (struct recv_buf *)precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { - spin_lock_init(&precvbuf->recvbuf_lock); precvbuf->alloc_sz = MAX_RECVBUF_SZ; res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf); if (res == _FAIL) diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 103849f..4a19a06 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -235,7 +235,6 @@ struct sta_recv_priv { }; struct recv_buf { - spinlock_t recvbuf_lock; u32 ref_cnt; struct adapter *adapter; u8 *pbuf; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 10/15] staging: rtl8188eu: Remove 'pallocated_buf' from struct recv_buf
pallocated_buf is not being used by driver. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/rtw_recv.h |1 - drivers/staging/rtl8188eu/os_dep/recv_linux.c |1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 987445a..b955d73 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -238,7 +238,6 @@ struct recv_buf { u32 ref_cnt; struct adapter *adapter; u8 *pbuf; - u8 *pallocated_buf; u32 len; struct urb *purb; u32 alloc_sz; diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index 7f9b654..25358fb 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -60,7 +60,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, res = _FAIL; precvbuf->pskb = NULL; precvbuf->reuse = false; - precvbuf->pallocated_buf = NULL; precvbuf->pbuf = NULL; precvbuf->len = 0; return res; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 07/15] staging: rtl8188eu: Remove 'int transfer_len' from struct recv_buf
Driver is not making any use of value stored in this variable. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |2 -- drivers/staging/rtl8188eu/hal/usb_ops_linux.c |1 - drivers/staging/rtl8188eu/include/rtw_recv.h |1 - drivers/staging/rtl8188eu/os_dep/recv_linux.c |1 - 4 files changed, 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 52d83a4..ee7fa64 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -30,8 +30,6 @@ void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *precvbuf) { - precvbuf->transfer_len = 0; - precvbuf->len = 0; precvbuf->ref_cnt = 0; diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c index 1fa5370..285cb5f 100644 --- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c @@ -518,7 +518,6 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) } else { rtw_reset_continual_urb_error(adapter_to_dvobj(adapt)); - precvbuf->transfer_len = purb->actual_length; skb_put(precvbuf->pskb, purb->actual_length); skb_queue_tail(&precvpriv->rx_skb_queue, precvbuf->pskb); diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index bf9af77..cac8acb 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -247,7 +247,6 @@ struct recv_buf { struct urb *purb; u32 alloc_sz; u8 irp_pending; - int transfer_len; struct sk_buff *pskb; u8 reuse; }; diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index da397e4..0838339 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -67,7 +67,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, precvbuf->phead = NULL; precvbuf->ptail = NULL; precvbuf->pend = NULL; - precvbuf->transfer_len = 0; precvbuf->len = 0; return res; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 08/15] staging: rtl8188eu: Remove pdata, phead, ptail and pend from struct recv_buf
Driver is not making use of value stored in removed variables. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |8 drivers/staging/rtl8188eu/hal/usb_ops_linux.c |9 - drivers/staging/rtl8188eu/include/rtw_recv.h |4 drivers/staging/rtl8188eu/os_dep/recv_linux.c |4 4 files changed, 25 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index ee7fa64..41a0c0d 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -31,15 +31,7 @@ void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *precvbuf) { precvbuf->len = 0; - precvbuf->ref_cnt = 0; - - if (precvbuf->pbuf) { - precvbuf->pdata = precvbuf->pbuf; - precvbuf->phead = precvbuf->pbuf; - precvbuf->ptail = precvbuf->pbuf; - precvbuf->pend = precvbuf->pdata + MAX_RECVBUF_SZ; - } } intrtl8188eu_init_recv_priv(struct adapter *padapter) diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c index 285cb5f..654c5b3 100644 --- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c @@ -615,18 +615,9 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1); skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment)); - precvbuf->phead = precvbuf->pskb->head; - precvbuf->pdata = precvbuf->pskb->data; - precvbuf->ptail = skb_tail_pointer(precvbuf->pskb); - precvbuf->pend = skb_end_pointer(precvbuf->pskb); precvbuf->pbuf = precvbuf->pskb->data; } else { /* reuse skb */ - precvbuf->phead = precvbuf->pskb->head; - precvbuf->pdata = precvbuf->pskb->data; - precvbuf->ptail = skb_tail_pointer(precvbuf->pskb); - precvbuf->pend = skb_end_pointer(precvbuf->pskb); precvbuf->pbuf = precvbuf->pskb->data; - precvbuf->reuse = false; } diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index cac8acb..8d3424b 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -240,10 +240,6 @@ struct recv_buf { u8 *pbuf; u8 *pallocated_buf; u32 len; - u8 *phead; - u8 *pdata; - u8 *ptail; - u8 *pend; struct urb *purb; u32 alloc_sz; u8 irp_pending; diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index 0838339..99b5910 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -63,10 +63,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, precvbuf->reuse = false; precvbuf->pallocated_buf = NULL; precvbuf->pbuf = NULL; - precvbuf->pdata = NULL; - precvbuf->phead = NULL; - precvbuf->ptail = NULL; - precvbuf->pend = NULL; precvbuf->len = 0; return res; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 09/15] staging: rtl8188eu: Remove 'irp_pending' from struct recv_buf
irp_pending is initialized to false inside rtw_os_recvbuf_resource_alloc() and value of irq_pending never changed after that, so 'if (!precvbuf->irp_pending)' inside rtw_os_read_port() function will be always true. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/rtw_recv.h |1 - drivers/staging/rtl8188eu/os_dep/recv_linux.c |6 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 8d3424b..987445a 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -242,7 +242,6 @@ struct recv_buf { u32 len; struct urb *purb; u32 alloc_sz; - u8 irp_pending; struct sk_buff *pskb; u8 reuse; }; diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index 99b5910..7f9b654 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -55,7 +55,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, { int res = _SUCCESS; - precvbuf->irp_pending = false; precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL); if (precvbuf->purb == NULL) res = _FAIL; @@ -229,9 +228,8 @@ void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf) dev_kfree_skb_any(precvbuf->pskb); precvbuf->pskb = NULL; precvbuf->reuse = false; - if (!precvbuf->irp_pending) - rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, - (unsigned char *)precvbuf); + rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, + (unsigned char *)precvbuf); } static void _rtw_reordering_ctrl_timeout_handler(void *func_context) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 11/15] staging: rtl8188eu: Remove 'alloc_sz' from struct recv_buf
Driver isn't making any use of value stored in alloc_sz variable. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 - drivers/staging/rtl8188eu/include/rtw_recv.h |1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 41a0c0d..3edc2cd 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -61,7 +61,6 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) precvbuf = (struct recv_buf *)precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { - precvbuf->alloc_sz = MAX_RECVBUF_SZ; res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf); if (res == _FAIL) break; diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index b955d73..519ed4e 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -240,7 +240,6 @@ struct recv_buf { u8 *pbuf; u32 len; struct urb *purb; - u32 alloc_sz; struct sk_buff *pskb; u8 reuse; }; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 15/15] staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf
Instead of using pbuf to pass sbk data pointer to usb_fill_bulk_urb(), we can use precvbuf->pskb->data to do that. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/usb_ops_linux.c |5 + drivers/staging/rtl8188eu/include/rtw_recv.h |1 - drivers/staging/rtl8188eu/os_dep/recv_linux.c |1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c index d3c5ed3..d8fc747 100644 --- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c @@ -612,10 +612,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) tmpaddr = (size_t)precvbuf->pskb->data; alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1); skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment)); - - precvbuf->pbuf = precvbuf->pskb->data; } else { /* reuse skb */ - precvbuf->pbuf = precvbuf->pskb->data; precvbuf->reuse = false; } @@ -627,7 +624,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) pipe = ffaddr2pipehdl(pdvobj, addr); usb_fill_bulk_urb(purb, pusbd, pipe, - precvbuf->pbuf, + precvbuf->pskb->data, MAX_RECVBUF_SZ, usb_read_port_complete, precvbuf);/* context is precvbuf */ diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 8dadf30..971dd16 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -236,7 +236,6 @@ struct sta_recv_priv { struct recv_buf { struct adapter *adapter; - u8 *pbuf; struct urb *purb; struct sk_buff *pskb; u8 reuse; diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index c1664b7..29ec014 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -60,7 +60,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, res = _FAIL; precvbuf->pskb = NULL; precvbuf->reuse = false; - precvbuf->pbuf = NULL; return res; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 12/15] staging: rtl8188eu: Remove 'u32 len' from struct recv_buf
Remove unused variable 'u32 len'. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 - drivers/staging/rtl8188eu/include/rtw_recv.h |1 - drivers/staging/rtl8188eu/os_dep/recv_linux.c |1 - 3 files changed, 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 3edc2cd..740818a5 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -30,7 +30,6 @@ void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *precvbuf) { - precvbuf->len = 0; precvbuf->ref_cnt = 0; } diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 519ed4e..3f43f11 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -238,7 +238,6 @@ struct recv_buf { u32 ref_cnt; struct adapter *adapter; u8 *pbuf; - u32 len; struct urb *purb; struct sk_buff *pskb; u8 reuse; diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index 25358fb..2577ceb6 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -61,7 +61,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, precvbuf->pskb = NULL; precvbuf->reuse = false; precvbuf->pbuf = NULL; - precvbuf->len = 0; return res; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 13/15] staging: rtl8188eu: Remove 'u32 ref_cnt' from struct recv_buf
Driver isn't making any use of value stored in variable ref_cnt. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |2 -- drivers/staging/rtl8188eu/include/rtw_recv.h |1 - drivers/staging/rtl8188eu/os_dep/recv_linux.c |1 - 3 files changed, 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 740818a5..fc06991 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -30,7 +30,6 @@ void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *precvbuf) { - precvbuf->ref_cnt = 0; } intrtl8188eu_init_recv_priv(struct adapter *padapter) @@ -63,7 +62,6 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf); if (res == _FAIL) break; - precvbuf->ref_cnt = 0; precvbuf->adapter = padapter; precvbuf++; } diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 3f43f11..8dadf30 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -235,7 +235,6 @@ struct sta_recv_priv { }; struct recv_buf { - u32 ref_cnt; struct adapter *adapter; u8 *pbuf; struct urb *purb; diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index 2577ceb6..c1664b7 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -221,7 +221,6 @@ void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf) { struct recv_priv *precvpriv = &padapter->recvpriv; - precvbuf->ref_cnt--; /* free skb in recv_buf */ dev_kfree_skb_any(precvbuf->pskb); precvbuf->pskb = NULL; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 14/15] staging: rtl8188eu: Remove rtl8188eu_init_recvbuf() function
rtl8188eu_init_recvbuf() function definition is empty now, so remove it. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c|4 drivers/staging/rtl8188eu/hal/usb_ops_linux.c |2 -- drivers/staging/rtl8188eu/include/rtl8188e_recv.h |1 - 3 files changed, 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index fc06991..2b45564 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -28,10 +28,6 @@ #include -void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *precvbuf) -{ -} - intrtl8188eu_init_recv_priv(struct adapter *padapter) { struct recv_priv*precvpriv = &padapter->recvpriv; diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c index 654c5b3..d3c5ed3 100644 --- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c @@ -600,8 +600,6 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) precvbuf->reuse = true; } - rtl8188eu_init_recvbuf(adapter, precvbuf); - /* re-assign for linux based on skb */ if ((!precvbuf->reuse) || (precvbuf->pskb == NULL)) { precvbuf->pskb = netdev_alloc_skb(adapter->pnetdev, MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ); diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_recv.h b/drivers/staging/rtl8188eu/include/rtl8188e_recv.h index 07e5f52..5fed30d 100644 --- a/drivers/staging/rtl8188eu/include/rtl8188e_recv.h +++ b/drivers/staging/rtl8188eu/include/rtl8188e_recv.h @@ -56,7 +56,6 @@ enum rx_packet_type { }; #define INTERRUPT_MSG_FORMAT_LEN 60 -void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *buf); s32 rtl8188eu_init_recv_priv(struct adapter *padapter); void rtl8188eu_free_recv_priv(struct adapter *padapter); void rtl8188eu_recv_hdl(struct adapter *padapter, struct recv_buf *precvbuf); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 01/28] staging: rtl8188eu: Remove function with empty definition _InitBeaconMaxError().
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/usb_halinit.c |8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 617e4c6..9ce6173 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -420,10 +420,6 @@ static void _InitEDCA(struct adapter *Adapter) rtw_write32(Adapter, REG_EDCA_VO_PARAM, 0x002FA226); } -static void _InitBeaconMaxError(struct adapter *Adapter, bool InfraMode) -{ -} - static void _InitRDGSetting(struct adapter *Adapter) { rtw_write8(Adapter, REG_RD_CTRL, 0xFF); @@ -830,12 +826,8 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter) InitUsbAggregationSetting(Adapter); _InitOperationMode(Adapter);/* todo */ _InitBeaconParameters(Adapter); - _InitBeaconMaxError(Adapter, true); - - /* */ /* Init CR MACTXEN, MACRXEN after setting RxFF boundary REG_TRXFF_BNDY to patch */ /* Hw bug which Hw initials RxFF boundary size to a value which is larger than the real Rx buffer size in 88E. */ - /* */ /* Enable MACTXEN/MACRXEN block */ value16 = rtw_read16(Adapter, REG_CR); value16 |= (MACTXEN | MACRXEN); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 02/28] staging: rtl8188eu: Remove function with empty definition _InitOperationMode()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/usb_halinit.c |5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 9ce6173..2e7b81ce 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -583,10 +583,6 @@ static void InitUsbAggregationSetting(struct adapter *Adapter) haldata->UsbRxHighSpeedMode = false; } -static void _InitOperationMode(struct adapter *Adapter) -{ -} - static void _InitBeaconParameters(struct adapter *Adapter) { struct hal_data_8188e *haldata = GET_HAL_DATA(Adapter); @@ -824,7 +820,6 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter) _InitEDCA(Adapter); _InitRetryFunction(Adapter); InitUsbAggregationSetting(Adapter); - _InitOperationMode(Adapter);/* todo */ _InitBeaconParameters(Adapter); /* Init CR MACTXEN, MACRXEN after setting RxFF boundary REG_TRXFF_BNDY to patch */ /* Hw bug which Hw initials RxFF boundary size to a value which is larger than the real Rx buffer size in 88E. */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 00/28] staging: rtl8188eu: Remove unnecessary functions.
Following patches remove functions which are unused or have empty definition. navin patidar (28): staging: rtl8188eu: Remove function with empty definition _InitBeaconMaxError(). staging: rtl8188eu: Remove function with empty definition _InitOperationMode() staging: rtl8188eu: Remove function with empty definition _ps_open_RF() staging: rtl8188eu: Remove unused function _ps_close_RF() staging: rtl8188eu: Remove unused function rtl8188eu_ps_func() staging:rtl8188eu:Remove funtion Hal_CustomizeByCustomerID_8188EU() staging: rtl8188eu: Remove unused function rtl8188e_PHY_ConfigRFWithParaFile() staging: rtl8188eu: Remove unused function rtl8192c_PHY_GetHWRegOriginalValue() staging: rtl8188eu: Remove unused function PHY_UpdateTxPowerDbm8188E() staging:rtl8188eu: Remove unused function phy_DbmToTxPwrIdx() staging: rtl8188eu: Remove unused funtion PHY_GetTxPowerLevel8188E() staging: rtl8188eu: Remove unused funtion phy_TxPwrIdxToDbm() staging: rtl8188eu: Remove unused funtion phy_TxPwrIdxToDbm() staging: rtl8188eu: Remove unused structure rf_shadow staging: rtl8188eu: Remove unused function rtl8188e_RF_ChangeTxPath() staging: rtl8188eu: Remove unused function odm_DIGbyRSSI_LPS() staging: rtl8188eu: Remove function odm_DynamicBBPowerSaving() staging: rtl8188eu: Remove unused function odm_DynamicBBPowerSavingInit() staging:rtl8188eu: Remove unused function iodm_1R_CCA() staging: rtl8188eu: Remove unused function odm_RefreshRateAdaptiveMaskMP() staging: rtl8188eu: Remove unused function odm_RefreshRateAdaptiveMaskAPADSL() staging: rtl8188eu: Remove unused funtion odm_DynamicTxPowerNIC() staging: rtl8188eu: Remove unused function odm_SwAntDivChkAntSwitchCallback() staging: rtl8188eu: Remove unused function ConvertTo_dB() staging: rtl8188eu: Remove function with empty defination ODM_CheckPowerStatus() staging: rtl8188eu: Remove unused function DM_DIG_LowerBound_88E() staging: rtl8188eu: Remove unused function ODM_DynamicPrimaryCCA_DupRTS() staging: rtl8188eu:Remove function with empty defination odm_DynamicPrimaryCCA() drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c | 14 -- drivers/staging/rtl8188eu/hal/odm.c| 159 --- drivers/staging/rtl8188eu/hal/odm_RTL8188E.c | 24 --- drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c| 208 drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c| 45 - drivers/staging/rtl8188eu/hal/usb_halinit.c| 40 drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h |1 - drivers/staging/rtl8188eu/include/odm_RTL8188E.h |2 - drivers/staging/rtl8188eu/include/rtl8188e_hal.h |1 - 9 files changed, 494 deletions(-) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 03/28] staging: rtl8188eu: Remove function with empty definition _ps_open_RF()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/usb_halinit.c |7 --- drivers/staging/rtl8188eu/include/rtl8188e_hal.h |1 - 2 files changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 2e7b81ce..2fe1135 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -693,7 +693,6 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter) HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_BEGIN); if (Adapter->pwrctrlpriv.bkeepfwalive) { - _ps_open_RF(Adapter); if (haldata->odmpriv.RFCalibrateInfo.bIQKInitialized) { PHY_IQCalibrate_8188E(Adapter, true); @@ -943,12 +942,6 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_END); return status; } -void _ps_open_RF(struct adapter *adapt) -{ - /* here call with bRegSSPwrLvl 1, bRegSSPwrLvl 2 needs to be verified */ - /* phy_SsPwrSwitch92CU(adapt, rf_on, 1); */ -} - static void _ps_close_RF(struct adapter *adapt) { /* here call with bRegSSPwrLvl 1, bRegSSPwrLvl 2 needs to be verified */ diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h index 75e41c4..fe3b454 100644 --- a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h +++ b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h @@ -471,6 +471,5 @@ void rtl8188e_stop_thread(struct adapter *padapter); void rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter *Adapter, int len); s32 rtl8188e_iol_efuse_patch(struct adapter *padapter); void rtw_cancel_all_timer(struct adapter *padapter); -void _ps_open_RF(struct adapter *adapt); #endif /* __RTL8188E_HAL_H__ */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 08/28] staging: rtl8188eu: Remove unused function rtl8192c_PHY_GetHWRegOriginalValue()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c index b50df3e..79f86db 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c @@ -631,24 +631,6 @@ int PHY_RFConfig8188E(struct adapter *Adapter) return rtStatus; } -void -rtl8192c_PHY_GetHWRegOriginalValue( - struct adapter *Adapter - ) -{ - struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); - - /* read rx initial gain */ - pHalData->DefaultInitialGain[0] = (u8)PHY_QueryBBReg(Adapter, rOFDM0_XAAGCCore1, bMaskByte0); - pHalData->DefaultInitialGain[1] = (u8)PHY_QueryBBReg(Adapter, rOFDM0_XBAGCCore1, bMaskByte0); - pHalData->DefaultInitialGain[2] = (u8)PHY_QueryBBReg(Adapter, rOFDM0_XCAGCCore1, bMaskByte0); - pHalData->DefaultInitialGain[3] = (u8)PHY_QueryBBReg(Adapter, rOFDM0_XDAGCCore1, bMaskByte0); - - /* read framesync */ - pHalData->framesync = (u8)PHY_QueryBBReg(Adapter, rOFDM0_RxDetector3, bMaskByte0); - pHalData->framesyncC34 = PHY_QueryBBReg(Adapter, rOFDM0_RxDetector2, bMaskDWord); -} - /* */ /* Description: */ /* Map dBm into Tx power index according to */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 04/28] staging: rtl8188eu: Remove unused function _ps_close_RF()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/usb_halinit.c |7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 2fe1135..1a83d31 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -942,12 +942,6 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_END); return status; } -static void _ps_close_RF(struct adapter *adapt) -{ - /* here call with bRegSSPwrLvl 1, bRegSSPwrLvl 2 needs to be verified */ - /* phy_SsPwrSwitch92CU(adapt, rf_off, 1); */ -} - static void CardDisableRTL8188EU(struct adapter *Adapter) { u8 val8; @@ -1025,7 +1019,6 @@ static u32 rtl8188eu_hal_deinit(struct adapter *Adapter) DBG_88E("bkeepfwalive(%x)\n", Adapter->pwrctrlpriv.bkeepfwalive); if (Adapter->pwrctrlpriv.bkeepfwalive) { - _ps_close_RF(Adapter); if ((Adapter->pwrctrlpriv.bHWPwrPindetect) && (Adapter->pwrctrlpriv.bHWPowerdown)) rtl8192cu_hw_power_down(Adapter); } else { -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 06/28] staging:rtl8188eu:Remove funtion Hal_CustomizeByCustomerID_8188EU()
Function has empty defination. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/usb_halinit.c |5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 4c3f8c8..141f85a 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -1133,10 +1133,6 @@ static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool eeprom->mac_addr[4], eeprom->mac_addr[5])); } -static void Hal_CustomizeByCustomerID_8188EU(struct adapter *adapt) -{ -} - static void readAdapterInfo_8188EU( struct adapter *adapt @@ -1163,7 +1159,6 @@ readAdapterInfo_8188EU( /* The following part initialize some vars by PG info. */ /* */ Hal_InitChannelPlan(adapt); - Hal_CustomizeByCustomerID_8188EU(adapt); } static void _ReadPROMContent( -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 05/28] staging: rtl8188eu: Remove unused function rtl8188eu_ps_func()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/usb_halinit.c |8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 1a83d31..4c3f8c8 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -2231,12 +2231,6 @@ static void rtl8188eu_init_default_value(struct adapter *adapt) haldata->odmpriv.RFCalibrateInfo.ThermalValue_HP[i] = 0; } -static u8 rtl8188eu_ps_func(struct adapter *Adapter, enum hal_intf_ps_func efunc_id, u8 *val) -{ - u8 bResult = true; - return bResult; -} - void rtl8188eu_set_hal_ops(struct adapter *adapt) { struct hal_ops *halfunc = &adapt->HalFunc; @@ -2277,7 +2271,5 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->hal_xmit = &rtl8188eu_hal_xmit; halfunc->mgnt_xmit = &rtl8188eu_mgnt_xmit; - halfunc->interface_ps_func = &rtl8188eu_ps_func; - rtl8188e_set_hal_ops(halfunc); } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 07/28] staging: rtl8188eu: Remove unused function rtl8188e_PHY_ConfigRFWithParaFile()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c | 21 - 1 file changed, 21 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c index 8079fc6..b50df3e 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c @@ -631,27 +631,6 @@ int PHY_RFConfig8188E(struct adapter *Adapter) return rtStatus; } - -/*- - * Function:PHY_ConfigRFWithParaFile() - * - * Overview:This function read RF parameters from general file format, and do RF 3-wire - * - * Input: struct adapter *Adapter - * ps8 pFileName - * enum rf_radio_path eRFPath - * - * Output: NONE - * - * Return: RT_STATUS_SUCCESS: configuration file exist - * - * Note: Delay may be required for RF configuration - *---*/ -int rtl8188e_PHY_ConfigRFWithParaFile(struct adapter *Adapter, u8 *pFileName, enum rf_radio_path eRFPath) -{ - return _SUCCESS; -} - void rtl8192c_PHY_GetHWRegOriginalValue( struct adapter *Adapter -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 10/28] staging:rtl8188eu: Remove unused function phy_DbmToTxPwrIdx()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c | 44 --- 1 file changed, 44 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c index 7cc7f44..16f46c3 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c @@ -633,50 +633,6 @@ int PHY_RFConfig8188E(struct adapter *Adapter) /* */ /* Description: */ -/* Map dBm into Tx power index according to */ -/* current HW model, for example, RF and PA, and */ -/* current wireless mode. */ -/* By Bruce, 2008-01-29. */ -/* */ -static u8 phy_DbmToTxPwrIdx(struct adapter *Adapter, enum wireless_mode WirelessMode, int PowerInDbm) -{ - u8 TxPwrIdx = 0; - int Offset = 0; - - - /* */ - /* Tested by MP, we found that CCK Index 0 equals to 8dbm, OFDM legacy equals to */ - /* 3dbm, and OFDM HT equals to 0dbm respectively. */ - /* Note: */ - /* The mapping may be different by different NICs. Do not use this formula for what needs accurate result. */ - /* By Bruce, 2008-01-29. */ - /* */ - switch (WirelessMode) { - case WIRELESS_MODE_B: - Offset = -7; - break; - - case WIRELESS_MODE_G: - case WIRELESS_MODE_N_24G: - default: - Offset = -8; - break; - } - - if ((PowerInDbm - Offset) > 0) - TxPwrIdx = (u8)((PowerInDbm - Offset) * 2); - else - TxPwrIdx = 0; - - /* Tx Power Index is too large. */ - if (TxPwrIdx > MAX_TXPWR_IDX_NMODE_92S) - TxPwrIdx = MAX_TXPWR_IDX_NMODE_92S; - - return TxPwrIdx; -} - -/* */ -/* Description: */ /* Map Tx power index into dBm according to */ /* current HW model, for example, RF and PA, and */ /* current wireless mode. */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 09/28] staging: rtl8188eu: Remove unused function PHY_UpdateTxPowerDbm8188E()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c| 37 drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h |1 - 2 files changed, 38 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c index 79f86db..7cc7f44 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c @@ -878,43 +878,6 @@ PHY_SetTxPowerLevel8188E( rtl8188e_PHY_RF6052SetOFDMTxPower(Adapter, &ofdmPowerLevel[0], &BW20PowerLevel[0], &BW40PowerLevel[0], channel); } -/* */ -/* Description: */ -/* Update transmit power level of all channel supported. */ -/* */ -/* TODO: */ -/* A mode. */ -/* By Bruce, 2008-02-04. */ -/* */ -bool -PHY_UpdateTxPowerDbm8188E( - struct adapter *Adapter, - int powerInDbm - ) -{ - struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); - u8 idx; - u8 rf_path; - - /* TODO: A mode Tx power. */ - u8 CckTxPwrIdx = phy_DbmToTxPwrIdx(Adapter, WIRELESS_MODE_B, powerInDbm); - u8 OfdmTxPwrIdx = phy_DbmToTxPwrIdx(Adapter, WIRELESS_MODE_N_24G, powerInDbm); - - if (OfdmTxPwrIdx - pHalData->LegacyHTTxPowerDiff > 0) - OfdmTxPwrIdx -= pHalData->LegacyHTTxPowerDiff; - else - OfdmTxPwrIdx = 0; - - for (idx = 0; idx < 14; idx++) { - for (rf_path = 0; rf_path < 2; rf_path++) { - pHalData->TxPwrLevelCck[rf_path][idx] = CckTxPwrIdx; - pHalData->TxPwrLevelHT40_1S[rf_path][idx] = - pHalData->TxPwrLevelHT40_2S[rf_path][idx] = OfdmTxPwrIdx; - } - } - return true; -} - void PHY_ScanOperationBackup8188E( struct adapter *Adapter, diff --git a/drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h index 25cae81..260ea6b 100644 --- a/drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h +++ b/drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h @@ -224,7 +224,6 @@ void rtl8192c_PHY_GetHWRegOriginalValue(struct adapter *adapter); /* BB TX Power R/W */ void PHY_GetTxPowerLevel8188E(struct adapter *adapter, u32 *powerlevel); void PHY_SetTxPowerLevel8188E(struct adapter *adapter, u8 channel); -bool PHY_UpdateTxPowerDbm8188E(struct adapter *adapter, int power); void PHY_ScanOperationBackup8188E(struct adapter *Adapter, u8 Operation); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 11/28] staging: rtl8188eu: Remove unused funtion PHY_GetTxPowerLevel8188E()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c | 46 --- 1 file changed, 46 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c index 16f46c3..099345f 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c @@ -665,52 +665,6 @@ static int phy_TxPwrIdxToDbm(struct adapter *Adapter, enum wireless_mode Wireles return PwrOutDbm; } - -/*- - * Function:GetTxPowerLevel8190() - * - * Overview:This function is export to "common" moudule - * - * Input: struct adapter *Adapter - * psByte Power Level - * - * Output: NONE - * - * Return: NONE - * - *---*/ -void PHY_GetTxPowerLevel8188E(struct adapter *Adapter, u32 *powerlevel) -{ - struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); - u8 TxPwrLevel = 0; - int TxPwrDbm; - - /* */ - /* Because the Tx power indexes are different, we report the maximum of them to */ - /* meet the CCX TPC request. By Bruce, 2008-01-31. */ - /* */ - - /* CCK */ - TxPwrLevel = pHalData->CurrentCckTxPwrIdx; - TxPwrDbm = phy_TxPwrIdxToDbm(Adapter, WIRELESS_MODE_B, TxPwrLevel); - - /* Legacy OFDM */ - TxPwrLevel = pHalData->CurrentOfdm24GTxPwrIdx + pHalData->LegacyHTTxPowerDiff; - - /* Compare with Legacy OFDM Tx power. */ - if (phy_TxPwrIdxToDbm(Adapter, WIRELESS_MODE_G, TxPwrLevel) > TxPwrDbm) - TxPwrDbm = phy_TxPwrIdxToDbm(Adapter, WIRELESS_MODE_G, TxPwrLevel); - - /* HT OFDM */ - TxPwrLevel = pHalData->CurrentOfdm24GTxPwrIdx; - - /* Compare with HT OFDM Tx power. */ - if (phy_TxPwrIdxToDbm(Adapter, WIRELESS_MODE_N_24G, TxPwrLevel) > TxPwrDbm) - TxPwrDbm = phy_TxPwrIdxToDbm(Adapter, WIRELESS_MODE_N_24G, TxPwrLevel); - - *powerlevel = TxPwrDbm; -} - static void getTxPowerIndex88E(struct adapter *Adapter, u8 channel, u8 *cckPowerLevel, u8 *ofdmPowerLevel, u8 *BW20PowerLevel, u8 *BW40PowerLevel) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 14/28] staging: rtl8188eu: Remove unused structure rf_shadow
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c b/drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c index b1cb5c4..2f1348f 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c @@ -46,28 +46,6 @@ #include -/*---Define Local Constant---*/ -/* Define local structure for debug! */ -struct rf_shadow { - /* Shadow register value */ - u32 Value; - /* Compare or not flag */ - u8 Compare; - /* Record If it had ever modified unpredicted */ - u8 ErrorOrNot; - /* Recorver Flag */ - u8 Recorver; - /* */ - u8 Driver_Write; -}; - -/*---Define Local Constant---*/ - - -/*Define global variable-*/ - -/*Define local variable--*/ - /*- * Function: RF_ChangeTxPath * -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 12/28] staging: rtl8188eu: Remove unused funtion phy_TxPwrIdxToDbm()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c | 34 --- 1 file changed, 34 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c index 099345f..a7872c8 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c @@ -631,40 +631,6 @@ int PHY_RFConfig8188E(struct adapter *Adapter) return rtStatus; } -/* */ -/* Description: */ -/* Map Tx power index into dBm according to */ -/* current HW model, for example, RF and PA, and */ -/* current wireless mode. */ -/* By Bruce, 2008-01-29. */ -/* */ -static int phy_TxPwrIdxToDbm(struct adapter *Adapter, enum wireless_mode WirelessMode, u8 TxPwrIdx) -{ - int Offset = 0; - int PwrOutDbm = 0; - - /* */ - /* Tested by MP, we found that CCK Index 0 equals to -7dbm, OFDM legacy equals to -8dbm. */ - /* Note: */ - /* The mapping may be different by different NICs. Do not use this formula for what needs accurate result. */ - /* By Bruce, 2008-01-29. */ - /* */ - switch (WirelessMode) { - case WIRELESS_MODE_B: - Offset = -7; - break; - case WIRELESS_MODE_G: - case WIRELESS_MODE_N_24G: - default: - Offset = -8; - break; - } - - PwrOutDbm = TxPwrIdx / 2 + Offset; /* Discard the decimal part. */ - - return PwrOutDbm; -} - static void getTxPowerIndex88E(struct adapter *Adapter, u8 channel, u8 *cckPowerLevel, u8 *ofdmPowerLevel, u8 *BW20PowerLevel, u8 *BW40PowerLevel) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 13/28] staging: rtl8188eu: Remove unused funtion phy_TxPwrIdxToDbm()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c |8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c index a7872c8..941ff74 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c @@ -754,14 +754,6 @@ PHY_SetTxPowerLevel8188E( rtl8188e_PHY_RF6052SetOFDMTxPower(Adapter, &ofdmPowerLevel[0], &BW20PowerLevel[0], &BW40PowerLevel[0], channel); } -void -PHY_ScanOperationBackup8188E( - struct adapter *Adapter, - u8 Operation - ) -{ -} - /*- * Function:PHY_SetBWModeCallback8192C() * -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 16/28] staging: rtl8188eu: Remove unused function odm_DIGbyRSSI_LPS()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm.c | 45 --- 1 file changed, 45 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index 89a26e3..d8482ab 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -529,51 +529,6 @@ void ODM_Write_DIG(struct odm_dm_struct *pDM_Odm, u8 CurrentIGI) /* Add by Neil Chen to enable edcca to MP Platform */ } -/* Need LPS mode for CE platform --2012--08--24--- */ -/* 8723AS/8189ES */ -void odm_DIGbyRSSI_LPS(struct odm_dm_struct *pDM_Odm) -{ - struct adapter *pAdapter = pDM_Odm->Adapter; - struct false_alarm_stats *pFalseAlmCnt = &pDM_Odm->FalseAlmCnt; - - u8 RSSI_Lower = DM_DIG_MIN_NIC; /* 0x1E or 0x1C */ - u8 bFwCurrentInPSMode = false; - u8 CurrentIGI = pDM_Odm->RSSI_Min; - - CurrentIGI = CurrentIGI + RSSI_OFFSET_DIG; - bFwCurrentInPSMode = pAdapter->pwrctrlpriv.bFwCurrentInPSMode; - - /* Using FW PS mode to make IGI */ - if (bFwCurrentInPSMode) { - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("---Neil---odm_DIG is in LPS mode\n")); - /* Adjust by FA in LPS MODE */ - if (pFalseAlmCnt->Cnt_all > DM_DIG_FA_TH2_LPS) - CurrentIGI = CurrentIGI+2; - else if (pFalseAlmCnt->Cnt_all > DM_DIG_FA_TH1_LPS) - CurrentIGI = CurrentIGI+1; - else if (pFalseAlmCnt->Cnt_all < DM_DIG_FA_TH0_LPS) - CurrentIGI = CurrentIGI-1; - } else { - CurrentIGI = RSSI_Lower; - } - - /* Lower bound checking */ - - /* RSSI Lower bound check */ - if ((pDM_Odm->RSSI_Min-10) > DM_DIG_MIN_NIC) - RSSI_Lower = (pDM_Odm->RSSI_Min-10); - else - RSSI_Lower = DM_DIG_MIN_NIC; - - /* Upper and Lower Bound checking */ -if (CurrentIGI > DM_DIG_MAX_NIC) - CurrentIGI = DM_DIG_MAX_NIC; -else if (CurrentIGI < RSSI_Lower) - CurrentIGI = RSSI_Lower; - - ODM_Write_DIG(pDM_Odm, CurrentIGI);/* ODM_Write_DIG(pDM_Odm, pDM_DigTable->CurIGValue); */ -} - void odm_DIGInit(struct odm_dm_struct *pDM_Odm) { struct adapter *adapter = pDM_Odm->Adapter; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 15/28] staging: rtl8188eu: Remove unused function rtl8188e_RF_ChangeTxPath()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c | 23 --- 1 file changed, 23 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c b/drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c index 2f1348f..52103da 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c @@ -47,29 +47,6 @@ #include /*- - * Function: RF_ChangeTxPath - * - * Overview: For RL6052, we must change some RF settign for 1T or 2T. - * - * Input: u16 DataRate0x80-8f, 0x90-9f - * - * Output: NONE - * - * Return: NONE - * - * Revised History: - * WhenWho Remark - * 09/25/2008 MHC Create Version 0. - * Firmwaer support the utility later. - * - *---*/ -void rtl8188e_RF_ChangeTxPath(struct adapter *Adapter, u16 DataRate) -{ -/* We do not support gain table change inACUT now Delete later !!! */ -} /* RF_ChangeTxPath */ - - -/*- * Function:PHY_RF6052SetBandwidth() * * Overview:This function is called by SetBWModeCallback8190Pci() only -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 17/28] staging: rtl8188eu: Remove function odm_DynamicBBPowerSaving()
odm_DynamicBBPowerSaving() has empty defination. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index d8482ab..2e105b4 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -183,7 +183,6 @@ void ODM_DMInit(struct odm_dm_struct *pDM_Odm) odm_RateAdaptiveMaskInit(pDM_Odm); odm_PrimaryCCA_Init(pDM_Odm);/* Gary */ - odm_DynamicBBPowerSavingInit(pDM_Odm); odm_DynamicTxPowerInit(pDM_Odm); odm_TXPowerTrackingInit(pDM_Odm); ODM_EdcaTurboInit(pDM_Odm); @@ -215,7 +214,6 @@ void ODM_DMWatchdog(struct odm_dm_struct *pDM_Odm) odm_RefreshRateAdaptiveMask(pDM_Odm); - odm_DynamicBBPowerSaving(pDM_Odm); odm_DynamicPrimaryCCA(pDM_Odm); if ((pDM_Odm->AntDivType == CG_TRX_HW_ANTDIV) || (pDM_Odm->AntDivType == CGCS_RX_HW_ANTDIV) || @@ -865,10 +863,6 @@ void odm_DynamicBBPowerSavingInit(struct odm_dm_struct *pDM_Odm) pDM_PSTable->initialize = 0; } -void odm_DynamicBBPowerSaving(struct odm_dm_struct *pDM_Odm) -{ -} - void odm_1R_CCA(struct odm_dm_struct *pDM_Odm) { struct adapter *adapter = pDM_Odm->Adapter; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 18/28] staging: rtl8188eu: Remove unused function odm_DynamicBBPowerSavingInit()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index 2e105b4..e8ad880 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -848,21 +848,6 @@ void ODM_Write_CCK_CCA_Thres(struct odm_dm_struct *pDM_Odm, u8 CurCCK_CCAThres) pDM_DigTable->CurCCK_CCAThres = CurCCK_CCAThres; } -/* 3 */ -/* 3 BB Power Save */ -/* 3 */ -void odm_DynamicBBPowerSavingInit(struct odm_dm_struct *pDM_Odm) -{ - struct rtl_ps *pDM_PSTable = &pDM_Odm->DM_PSTable; - - pDM_PSTable->PreCCAState = CCA_MAX; - pDM_PSTable->CurCCAState = CCA_MAX; - pDM_PSTable->PreRFState = RF_MAX; - pDM_PSTable->CurRFState = RF_MAX; - pDM_PSTable->Rssi_val_min = 0; - pDM_PSTable->initialize = 0; -} - void odm_1R_CCA(struct odm_dm_struct *pDM_Odm) { struct adapter *adapter = pDM_Odm->Adapter; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 20/28] staging: rtl8188eu: Remove unused function odm_RefreshRateAdaptiveMaskMP()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index 7319b3e..01946cc 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -1033,10 +1033,6 @@ void odm_RefreshRateAdaptiveMask(struct odm_dm_struct *pDM_Odm) odm_RefreshRateAdaptiveMaskCE(pDM_Odm); } -void odm_RefreshRateAdaptiveMaskMP(struct odm_dm_struct *pDM_Odm) -{ -} - void odm_RefreshRateAdaptiveMaskCE(struct odm_dm_struct *pDM_Odm) { u8 i; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 19/28] staging:rtl8188eu: Remove unused function iodm_1R_CCA()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm.c | 34 -- 1 file changed, 34 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index e8ad880..7319b3e 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -848,40 +848,6 @@ void ODM_Write_CCK_CCA_Thres(struct odm_dm_struct *pDM_Odm, u8 CurCCK_CCAThres) pDM_DigTable->CurCCK_CCAThres = CurCCK_CCAThres; } -void odm_1R_CCA(struct odm_dm_struct *pDM_Odm) -{ - struct adapter *adapter = pDM_Odm->Adapter; - struct rtl_ps *pDM_PSTable = &pDM_Odm->DM_PSTable; - - if (pDM_Odm->RSSI_Min != 0xFF) { - if (pDM_PSTable->PreCCAState == CCA_2R) { - if (pDM_Odm->RSSI_Min >= 35) - pDM_PSTable->CurCCAState = CCA_1R; - else - pDM_PSTable->CurCCAState = CCA_2R; - } else { - if (pDM_Odm->RSSI_Min <= 30) - pDM_PSTable->CurCCAState = CCA_2R; - else - pDM_PSTable->CurCCAState = CCA_1R; - } - } else { - pDM_PSTable->CurCCAState = CCA_MAX; - } - - if (pDM_PSTable->PreCCAState != pDM_PSTable->CurCCAState) { - if (pDM_PSTable->CurCCAState == CCA_1R) { - if (pDM_Odm->RFType == ODM_2T2R) - PHY_SetBBReg(adapter, 0xc04, bMaskByte0, 0x13); - else - PHY_SetBBReg(adapter, 0xc04, bMaskByte0, 0x23); - } else { - PHY_SetBBReg(adapter, 0xc04, bMaskByte0, 0x33); - } - pDM_PSTable->PreCCAState = pDM_PSTable->CurCCAState; - } -} - void ODM_RF_Saving(struct odm_dm_struct *pDM_Odm, u8 bForceInNormal) { struct adapter *adapter = pDM_Odm->Adapter; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 21/28] staging: rtl8188eu: Remove unused function odm_RefreshRateAdaptiveMaskAPADSL()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index 01946cc..cc73188 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -1061,10 +1061,6 @@ void odm_RefreshRateAdaptiveMaskCE(struct odm_dm_struct *pDM_Odm) } } -void odm_RefreshRateAdaptiveMaskAPADSL(struct odm_dm_struct *pDM_Odm) -{ -} - /* Return Value: bool */ /* - true: RATRState is changed. */ bool ODM_RAStateCheck(struct odm_dm_struct *pDM_Odm, s32 RSSI, bool bForceUpdate, u8 *pRATRState) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 22/28] staging: rtl8188eu: Remove unused funtion odm_DynamicTxPowerNIC()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm.c |9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index cc73188..8dd5f7e 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -1131,15 +1131,6 @@ void odm_DynamicTxPower(struct odm_dm_struct *pDM_Odm) /* 2012/01/12 MH According to Luke's suggestion, only high power will support the feature. */ if (!pDM_Odm->ExtPA) return; - - /* 2011/09/29 MH In HW integration first stage, we provide 4 different handle to operate */ - /* at the same time. In the stage2/3, we need to prive universal interface and merge all */ - /* HW dynamic mechanism. */ - odm_DynamicTxPowerNIC(pDM_Odm); -} - -void odm_DynamicTxPowerNIC(struct odm_dm_struct *pDM_Odm) -{ } /* 3 */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 23/28] staging: rtl8188eu: Remove unused function odm_SwAntDivChkAntSwitchCallback()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index 8dd5f7e..4442181 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -1269,22 +1269,6 @@ void odm_TXPowerTrackingCheckCE(struct odm_dm_struct *pDM_Odm) } } -/* antenna mapping info */ -/* 1: right-side antenna */ -/* 2/0: left-side antenna */ -/* PDM_SWAT_Table->CCK_Ant1_Cnt /OFDM_Ant1_Cnt: for right-side antenna: Ant:1RxDefaultAnt1 */ -/* PDM_SWAT_Table->CCK_Ant2_Cnt /OFDM_Ant2_Cnt: for left-side antenna: Ant:0RxDefaultAnt2 */ -/* We select left antenna as default antenna in initial process, modify it as needed */ -/* */ - -/* 3 */ -/* 3 SW Antenna Diversity */ -/* 3 */ - -void odm_SwAntDivChkAntSwitchCallback(void *FunctionContext) -{ -} - /* 3 */ /* 3 SW Antenna Diversity */ /* 3 */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 24/28] staging: rtl8188eu: Remove unused function ConvertTo_dB()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm.c | 25 - 1 file changed, 25 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index 4442181..425c50a4 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -1394,28 +1394,3 @@ dm_CheckEdcaTurbo_EXIT: pxmitpriv->last_tx_bytes = pxmitpriv->tx_bytes; precvpriv->last_rx_bytes = precvpriv->rx_bytes; } - -u32 ConvertTo_dB(u32 Value) -{ - u8 i; - u8 j; - u32 dB; - - Value = Value & 0x; - for (i = 0; i < 8; i++) { - if (Value <= dB_Invert_Table[i][11]) - break; - } - - if (i >= 8) - return 96; /* maximum 96 dB */ - - for (j = 0; j < 12; j++) { - if (Value <= dB_Invert_Table[i][j]) - break; - } - - dB = i*12 + j + 1; - - return dB; -} -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 25/28] staging: rtl8188eu: Remove function with empty defination ODM_CheckPowerStatus()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c index 056052d..7c22658 100644 --- a/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c +++ b/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c @@ -804,24 +804,12 @@ static void pathb_fill_iqk(struct adapter *adapt, bool iqkok, s32 result[][8], u } } -/* */ -/* 2011/07/26 MH Add an API for testing IQK fail case. */ -/* */ -/* MP Already declare in odm.c */ -static bool ODM_CheckPowerStatus(struct adapter *Adapter) -{ - return true; -} - void _PHY_SaveADDARegisters(struct adapter *adapt, u32 *ADDAReg, u32 *ADDABackup, u32 RegisterNum) { u32 i; struct hal_data_8188e *pHalData = GET_HAL_DATA(adapt); struct odm_dm_struct *dm_odm = &pHalData->odmpriv; - if (!ODM_CheckPowerStatus(adapt)) - return; - ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Save ADDA parameters.\n")); for (i = 0; i < RegisterNum; i++) { ADDABackup[i] = PHY_QueryBBReg(adapt, ADDAReg[i], bMaskDWord); @@ -1294,8 +1282,6 @@ void PHY_IQCalibrate_8188E(struct adapter *adapt, bool recovery) bool is2t; is2t = (dm_odm->RFType == ODM_2T2R) ? true : false; - if (!ODM_CheckPowerStatus(adapt)) - return; if (!(dm_odm->SupportAbility & ODM_RF_CALIBRATION)) return; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 26/28] staging: rtl8188eu: Remove unused function DM_DIG_LowerBound_88E()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm_RTL8188E.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c index 323eb93..7c1043c 100644 --- a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c +++ b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c @@ -20,18 +20,6 @@ #include "odm_precomp.h" -void ODM_DIG_LowerBound_88E(struct odm_dm_struct *dm_odm) -{ - struct rtw_dig *pDM_DigTable = &dm_odm->DM_DigTable; - - if (dm_odm->AntDivType == CG_TRX_HW_ANTDIV) { - pDM_DigTable->rx_gain_range_min = (u8) pDM_DigTable->AntDiv_RSSI_max; - ODM_RT_TRACE(dm_odm, ODM_COMP_ANT_DIV, ODM_DBG_LOUD, -("ODM_DIG_LowerBound_88E(): pDM_DigTable->AntDiv_RSSI_max=%d\n", pDM_DigTable->AntDiv_RSSI_max)); - } - /* If only one Entry connected */ -} - static void odm_RX_HWAntDivInit(struct odm_dm_struct *dm_odm) { struct adapter *adapter = dm_odm->Adapter; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 27/28] staging: rtl8188eu: Remove unused function ODM_DynamicPrimaryCCA_DupRTS()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm_RTL8188E.c |7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c index 7c1043c..a90b2c5 100644 --- a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c +++ b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c @@ -377,13 +377,6 @@ void odm_PrimaryCCA_Init(struct odm_dm_struct *dm_odm) PrimaryCCA->PriCCA_flag = 0; } -bool ODM_DynamicPrimaryCCA_DupRTS(struct odm_dm_struct *dm_odm) -{ - struct dyn_primary_cca *PrimaryCCA = &(dm_odm->DM_PriCCA); - - return PrimaryCCA->DupRTS_flag; -} - void odm_DynamicPrimaryCCA(struct odm_dm_struct *dm_odm) { return; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 28/28] staging: rtl8188eu:Remove function with empty defination odm_DynamicPrimaryCCA()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm.c |1 - drivers/staging/rtl8188eu/hal/odm_RTL8188E.c |5 - drivers/staging/rtl8188eu/include/odm_RTL8188E.h |2 -- 3 files changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index 425c50a4..a39eba9 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -214,7 +214,6 @@ void ODM_DMWatchdog(struct odm_dm_struct *pDM_Odm) odm_RefreshRateAdaptiveMask(pDM_Odm); - odm_DynamicPrimaryCCA(pDM_Odm); if ((pDM_Odm->AntDivType == CG_TRX_HW_ANTDIV) || (pDM_Odm->AntDivType == CGCS_RX_HW_ANTDIV) || (pDM_Odm->AntDivType == CG_TRX_SMART_ANTDIV)) diff --git a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c index a90b2c5..a24d954 100644 --- a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c +++ b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c @@ -376,8 +376,3 @@ void odm_PrimaryCCA_Init(struct odm_dm_struct *dm_odm) PrimaryCCA->Monitor_flag = 0; PrimaryCCA->PriCCA_flag = 0; } - -void odm_DynamicPrimaryCCA(struct odm_dm_struct *dm_odm) -{ - return; -} diff --git a/drivers/staging/rtl8188eu/include/odm_RTL8188E.h b/drivers/staging/rtl8188eu/include/odm_RTL8188E.h index f96ad5a..02ac78d 100644 --- a/drivers/staging/rtl8188eu/include/odm_RTL8188E.h +++ b/drivers/staging/rtl8188eu/include/odm_RTL8188E.h @@ -51,6 +51,4 @@ void odm_PrimaryCCA_Init(struct odm_dm_struct *pDM_Odm); bool ODM_DynamicPrimaryCCA_DupRTS(struct odm_dm_struct *pDM_Odm); -void odm_DynamicPrimaryCCA(struct odm_dm_struct *pDM_Odm); - #endif -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 13/28] staging: rtl8188eu: Remove unused funtion PHY_ScanOperationBackup8188E()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c |8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c index a7872c8..941ff74 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c @@ -754,14 +754,6 @@ PHY_SetTxPowerLevel8188E( rtl8188e_PHY_RF6052SetOFDMTxPower(Adapter, &ofdmPowerLevel[0], &BW20PowerLevel[0], &BW40PowerLevel[0], channel); } -void -PHY_ScanOperationBackup8188E( - struct adapter *Adapter, - u8 Operation - ) -{ -} - /*- * Function:PHY_SetBWModeCallback8192C() * -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 13/28] staging: rtl8188eu: Remove unused funtion phy_TxPwrIdxToDbm()
Subject line of this patch isn't correct, so please ignore it. I've submitted new patch with "[PATCH 13/28] staging: rtl8188eu: Remove unused funtion PHY_ScanOperationBackup8188E()" subject line. regards, navin patidar On Sun, May 18, 2014 at 8:49 PM, navin patidar wrote: > Signed-off-by: navin patidar > --- > drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c |8 > 1 file changed, 8 deletions(-) > > diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c > b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c > index a7872c8..941ff74 100644 > --- a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c > +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c > @@ -754,14 +754,6 @@ PHY_SetTxPowerLevel8188E( > rtl8188e_PHY_RF6052SetOFDMTxPower(Adapter, &ofdmPowerLevel[0], > &BW20PowerLevel[0], &BW40PowerLevel[0], channel); > } > > -void > -PHY_ScanOperationBackup8188E( > - struct adapter *Adapter, > - u8 Operation > - ) > -{ > -} > - > > /*- > * Function:PHY_SetBWModeCallback8192C() > * > -- > 1.7.10.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 05/28] staging: rtl8188eu: Remove unused function rtl8188eu_ps_func()
On Mon, May 19, 2014 at 4:22 PM, Dan Carpenter wrote: > On Sun, May 18, 2014 at 08:48:58PM +0530, navin patidar wrote: >> Signed-off-by: navin patidar >> --- >> drivers/staging/rtl8188eu/hal/usb_halinit.c |8 >> 1 file changed, 8 deletions(-) >> >> diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c >> b/drivers/staging/rtl8188eu/hal/usb_halinit.c >> index 1a83d31..4c3f8c8 100644 >> --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c >> +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c >> @@ -2231,12 +2231,6 @@ static void rtl8188eu_init_default_value(struct >> adapter *adapt) >> haldata->odmpriv.RFCalibrateInfo.ThermalValue_HP[i] = 0; >> } >> >> -static u8 rtl8188eu_ps_func(struct adapter *Adapter, enum hal_intf_ps_func >> efunc_id, u8 *val) >> -{ >> - u8 bResult = true; >> - return bResult; >> -} >> - >> void rtl8188eu_set_hal_ops(struct adapter *adapt) >> { >> struct hal_ops *halfunc = &adapt->HalFunc; >> @@ -2277,7 +2271,5 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) >> halfunc->hal_xmit = &rtl8188eu_hal_xmit; >> halfunc->mgnt_xmit = &rtl8188eu_mgnt_xmit; >> >> - halfunc->interface_ps_func = &rtl8188eu_ps_func; > > No, this is used. See rtw_hal_intf_ps_func(). > > drivers/staging/rtl8188eu/hal/hal_intf.c >210 u8 rtw_hal_intf_ps_func(struct adapter *adapt, >211 enum hal_intf_ps_func efunc_id, u8 *val) >212 { >213 if (adapt->HalFunc.interface_ps_func) >214 return adapt->HalFunc.interface_ps_func(adapt, > efunc_id, >215 val); >216 return _FAIL; >217 } > > You have changed it to return _FAIL instead of true. Perhaps that is ok > but you need to explain it in the changelog. > oops, I'll resend this patch with proper changelog. I have one question, do i need to send v2 of whole patch series or just this patch. regards, navin patidar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 05/28] staging: rtl8188eu: Remove unused function rtl8188eu_ps_func()
On Tue, May 20, 2014 at 12:34 AM, Dan Carpenter wrote: > On Mon, May 19, 2014 at 09:19:07PM +0530, navin patidar wrote: >> > You have changed it to return _FAIL instead of true. Perhaps that is ok >> > but you need to explain it in the changelog. >> > >> oops, I'll resend this patch with proper changelog. >> I have one question, do i need to send v2 of whole patch series or >> just this patch. > > Greg, none of the other patches rely on this one. Could you apply them > and drop this one? This one is also fine except for the changelog but > Navin can send a new version in a new thread. Please drop this patch. > [ General rules on redoing patches threads ] > > When you are sending a patch series and someone asks you to update one > changelog, then you can resend just the patch but you must set the > In-Reply-To email header. You didn't do that for [PATCH 13/28] so now > the v2 of that patch is in its own thread. Okay, I'll keep that in mind next time. > > If you are sending a patch series and updating one in the middle means > that the other patches won't apply then you should redo the whole thing > or ask Greg to apply the first 7 patches and redo the last ones. > > If you are sending a series and you have to update a lot of patches then > resend the whole thing because otherwise it becomes confusing. Thanks for explaining the process in detail. :) > [ This patch in particular ] > > Ok. So I looked at this and the function which calls > rtw_hal_intf_ps_func() is never called, so you're right that this > function isn't used. Probably this is what you were going to put in > your changelog and I would check and that's fine. > > But when I am reviewing these kinds of "delete unused code" patches then > I just "Ok. If there are still users the compile will break." So I > don't have to look outside the email client. So I would prefer if you > did it in this order: > > [patch 1/4] staging: rtl8188eu: Remove unused function rtw_interface_ps_func() > [patch 2/4] staging: rtl8188eu: Remove unused function rtw_hal_intf_ps_func() > [patch 3/4] staging: rtl8188eu: Remove unused function pointer > ->interface_ps_func > [patch 4/4] staging: rtl8188eu: staging: rtl8188eu: Remove unused function > rtl8188eu_ps_func() I'll send new patchset in order you mentioned. regards, navin patidar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/13]staging: rtl8188eu: Remove unused functions and variables
Hi Greg, Please merge this patchset, It has been pending for some time. regards, navin patidar On Wed, May 7, 2014 at 9:27 AM, wrote: > From: navin patidar > > Following patches remove unused functions, variables and functions with empty > definition. > > navin patidar (13): > staging: rtl8188eu: Remove 'semaphore allrxreturnevt' from struct > recv_priv > staging: rtl8188eu: Remove unused member variables of struct > recv_priv > staging: rtl8188eu: Remove 'spinlock_t lock' from struct recv_priv > staging: rtl8188eu: Remove struct zero_bulkout_context > staging: rtl8188eu: Remove function rtw_os_recv_resource_init() > staging: rtl8188eu: Remove function rtw_os_recv_resource_free() > staging: rtl8188eu: Remove function rtw_hostapd_mlme_rx() > staging: rtl8188eu: Remove function rtw_os_recvbuf_resource_free() > staging: rtl8188eu: Remove unused inline function recvframe_push() > staging: rtl8188eu: Remove unused inline function get_rx_status() > staging: rtl8188eu: Remove 'void *precvbuf' from struct recv_frame > staging: rtl8188eu: Remove 'int frame_tag' from struct recv_frame > staging: rtl8188eu: Remove 'u8 fragcnt' from struct recv_frame > > drivers/staging/rtl8188eu/core/rtw_mlme_ext.c|2 -- > drivers/staging/rtl8188eu/core/rtw_recv.c|8 - > drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |2 +- > drivers/staging/rtl8188eu/hal/usb_ops_linux.c|1 - > drivers/staging/rtl8188eu/include/recv_osdep.h |4 --- > drivers/staging/rtl8188eu/include/rtw_recv.h | 36 > -- > drivers/staging/rtl8188eu/os_dep/recv_linux.c| 25 --- > drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c |7 - > 8 files changed, 1 insertion(+), 84 deletions(-) > > -- > 1.7.10.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: rtl8188eu: Use USB subsystem functions to check endpoint type
Use inline functions provided by USB subsystem to check endpoint type, instead of macros implemented by driver to do the same. Unnecessary debugging messages are also removed. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 92 --- 1 file changed, 14 insertions(+), 78 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index 49a4ce4..2960602 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c @@ -80,46 +80,6 @@ static struct rtw_usb_drv rtl8188e_usb_drv = { static struct rtw_usb_drv *usb_drv = &rtl8188e_usb_drv; -static inline int RT_usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) -{ - return (epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN; -} - -static inline int RT_usb_endpoint_dir_out(const struct usb_endpoint_descriptor *epd) -{ - return (epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT; -} - -static inline int RT_usb_endpoint_xfer_int(const struct usb_endpoint_descriptor *epd) -{ - return (epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT; -} - -static inline int RT_usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *epd) -{ - return (epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK; -} - -static inline int RT_usb_endpoint_is_bulk_in(const struct usb_endpoint_descriptor *epd) -{ - return RT_usb_endpoint_xfer_bulk(epd) && RT_usb_endpoint_dir_in(epd); -} - -static inline int RT_usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd) -{ - return RT_usb_endpoint_xfer_bulk(epd) && RT_usb_endpoint_dir_out(epd); -} - -static inline int usb_endpoint_is_int(const struct usb_endpoint_descriptor *epd) -{ - return RT_usb_endpoint_xfer_int(epd) && RT_usb_endpoint_dir_in(epd); -} - -static inline int RT_usb_endpoint_num(const struct usb_endpoint_descriptor *epd) -{ - return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; -} - static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj) { u8 rst = _SUCCESS; @@ -183,60 +143,36 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf) pdvobjpriv->nr_endpoint = piface_desc->bNumEndpoints; for (i = 0; i < pdvobjpriv->nr_endpoint; i++) { + + int ep_num; phost_endp = phost_iface->endpoint + i; + if (phost_endp) { pendp_desc = &phost_endp->desc; + ep_num = usb_endpoint_num(pendp_desc); - DBG_88E("\nusb_endpoint_descriptor(%d):\n", i); - DBG_88E("bLength=%x\n", pendp_desc->bLength); - DBG_88E("bDescriptorType=%x\n", - pendp_desc->bDescriptorType); - DBG_88E("bEndpointAddress=%x\n", - pendp_desc->bEndpointAddress); - DBG_88E("wMaxPacketSize=%d\n", - le16_to_cpu(pendp_desc->wMaxPacketSize)); - DBG_88E("bInterval=%x\n", pendp_desc->bInterval); - - if (RT_usb_endpoint_is_bulk_in(pendp_desc)) { - DBG_88E("RT_usb_endpoint_is_bulk_in = %x\n", - RT_usb_endpoint_num(pendp_desc)); - pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = RT_usb_endpoint_num(pendp_desc); + if (usb_endpoint_is_bulk_in(pendp_desc)) { + pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = ep_num; pdvobjpriv->RtNumInPipes++; - } else if (usb_endpoint_is_int(pendp_desc)) { - DBG_88E("usb_endpoint_is_int = %x, Interval = %x\n", - RT_usb_endpoint_num(pendp_desc), - pendp_desc->bInterval); - pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = RT_usb_endpoint_num(pendp_desc); + } else if (usb_endpoint_is_int_in(pendp_desc)) { + pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = ep_num; pdvobjpriv->RtNumInPipes++; - } else if (RT_usb_endpoint_is_bulk_out(pendp_desc)) { - DBG_88E("RT_usb_endpoint_is_bulk_out = %x\n", - RT_usb_endpoint_num(pendp_desc)); - pdvobjpriv->RtOutPipe[pdvobjpriv->RtNumOutPipes] = RT_usb_endpoint_num(pendp_de
[PATCH 01/24] staging: rtl8188eu: Remove unused function rtw_interface_ps_func()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c|9 - drivers/staging/rtl8188eu/include/rtw_pwrctrl.h |2 -- 2 files changed, 11 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c index f658373..83e34f4 100644 --- a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c @@ -497,15 +497,6 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter) _init_timer(&(pwrctrlpriv->pwr_state_check_timer), padapter->pnetdev, pwr_state_check_handler, (u8 *)padapter); } -u8 rtw_interface_ps_func(struct adapter *padapter, enum hal_intf_ps_func efunc_id, u8 *val) -{ - u8 bResult = true; - rtw_hal_intf_ps_func(padapter, efunc_id, val); - - return bResult; -} - - inline void rtw_set_ips_deny(struct adapter *padapter, u32 ms) { struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; diff --git a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h index 9a42859..751803f 100644 --- a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h +++ b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h @@ -258,8 +258,6 @@ s32 LPS_RF_ON_check(struct adapter *adapter, u32 delay_ms); void LPS_Enter(struct adapter *adapter); void LPS_Leave(struct adapter *adapter); -u8 rtw_interface_ps_func(struct adapter *adapter, -enum hal_intf_ps_func efunc_id, u8 *val); void rtw_set_ips_deny(struct adapter *adapter, u32 ms); int _rtw_pwr_wakeup(struct adapter *adapter, u32 ips_defer_ms, const char *caller); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 03/24] staging: rtl8188eu: Remove unused function pointer ->interface_ps_func
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/usb_halinit.c |2 -- drivers/staging/rtl8188eu/include/hal_intf.h |3 --- 2 files changed, 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 0cb84ae..9020129 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -2272,7 +2272,5 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->hal_xmit = &rtl8188eu_hal_xmit; halfunc->mgnt_xmit = &rtl8188eu_mgnt_xmit; - halfunc->interface_ps_func = &rtl8188eu_ps_func; - rtl8188e_set_hal_ops(halfunc); } diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h index 9228bc6..acdef1d 100644 --- a/drivers/staging/rtl8188eu/include/hal_intf.h +++ b/drivers/staging/rtl8188eu/include/hal_intf.h @@ -218,9 +218,6 @@ struct hal_ops { void(*AntDivCompareHandler)(struct adapter *adapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src); - u8 (*interface_ps_func)(struct adapter *padapter, -enum hal_intf_ps_func efunc_id, u8 *val); - s32 (*hal_xmit)(struct adapter *padapter, struct xmit_frame *pxmitframe); s32 (*mgnt_xmit)(struct adapter *padapter, -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 02/24] staging: rtl8188eu: Remove unused function rtw_hal_intf_ps_func()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/hal_intf.c |9 - drivers/staging/rtl8188eu/include/hal_intf.h |3 --- 2 files changed, 12 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/hal_intf.c b/drivers/staging/rtl8188eu/hal/hal_intf.c index d75ca7a..43eee48 100644 --- a/drivers/staging/rtl8188eu/hal/hal_intf.c +++ b/drivers/staging/rtl8188eu/hal/hal_intf.c @@ -207,15 +207,6 @@ u32 rtw_hal_inirp_deinit(struct adapter *adapt) return _FAIL; } -u8 rtw_hal_intf_ps_func(struct adapter *adapt, - enum hal_intf_ps_func efunc_id, u8 *val) -{ - if (adapt->HalFunc.interface_ps_func) - return adapt->HalFunc.interface_ps_func(adapt, efunc_id, - val); - return _FAIL; -} - s32 rtw_hal_xmit(struct adapter *adapt, struct xmit_frame *pxmitframe) { if (adapt->HalFunc.hal_xmit) diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h index c274b34..9228bc6 100644 --- a/drivers/staging/rtl8188eu/include/hal_intf.h +++ b/drivers/staging/rtl8188eu/include/hal_intf.h @@ -332,9 +332,6 @@ void rtw_hal_disable_interrupt(struct adapter *padapter); u32rtw_hal_inirp_init(struct adapter *padapter); u32rtw_hal_inirp_deinit(struct adapter *padapter); -u8 rtw_hal_intf_ps_func(struct adapter *padapter, -enum hal_intf_ps_func efunc_id, u8 *val); - s32rtw_hal_xmit(struct adapter *padapter, struct xmit_frame *pxmitframe); s32rtw_hal_mgnt_xmit(struct adapter *padapter, struct xmit_frame *pmgntframe); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 05/24] staging: rtl8188eu: Remove unused function ODM_MacStatusQuery()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm_HWConfig.c |8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm_HWConfig.c b/drivers/staging/rtl8188eu/hal/odm_HWConfig.c index a755df3..0145a11 100644 --- a/drivers/staging/rtl8188eu/hal/odm_HWConfig.c +++ b/drivers/staging/rtl8188eu/hal/odm_HWConfig.c @@ -436,14 +436,6 @@ void ODM_PhyStatusQuery(struct odm_dm_struct *dm_odm, ODM_PhyStatusQuery_92CSeries(dm_odm, pPhyInfo, pPhyStatus, pPktinfo); } -/* For future use. */ -void ODM_MacStatusQuery(struct odm_dm_struct *dm_odm, u8 *mac_stat, - u8 macid, bool pkt_match_bssid, - bool pkttoself, bool pkt_beacon) -{ - /* 2011/10/19 Driver team will handle in the future. */ -} - enum HAL_STATUS ODM_ConfigRFWithHeaderFile(struct odm_dm_struct *dm_odm, enum rf_radio_path content, enum rf_radio_path rfpath) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 06/24] staging: rtl8188eu: Remove unused function odm_Init_RSSIForDM()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm_HWConfig.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm_HWConfig.c b/drivers/staging/rtl8188eu/hal/odm_HWConfig.c index 0145a11..f2e1d02 100644 --- a/drivers/staging/rtl8188eu/hal/odm_HWConfig.c +++ b/drivers/staging/rtl8188eu/hal/odm_HWConfig.c @@ -275,10 +275,6 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm, dm_odm->DM_FatTable.antsel_rx_keep_2 = pPhyStaRpt->antsel_rx_keep_2; } -void odm_Init_RSSIForDM(struct odm_dm_struct *dm_odm) -{ -} - static void odm_Process_RSSIForDM(struct odm_dm_struct *dm_odm, struct odm_phy_status_info *pPhyInfo, struct odm_per_pkt_info *pPktinfo) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 04/24] staging: rtl8188eu: Remove unused function rtl8188eu_ps_func()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/usb_halinit.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 9020129..141f85a 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -2226,12 +2226,6 @@ static void rtl8188eu_init_default_value(struct adapter *adapt) haldata->odmpriv.RFCalibrateInfo.ThermalValue_HP[i] = 0; } -static u8 rtl8188eu_ps_func(struct adapter *Adapter, enum hal_intf_ps_func efunc_id, u8 *val) -{ - u8 bResult = true; - return bResult; -} - void rtl8188eu_set_hal_ops(struct adapter *adapt) { struct hal_ops *halfunc = &adapt->HalFunc; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 08/24] staging: rtl8188eu: Remove function rtw_hal_dm_deinit()
rtw_hal_dm_deinit() calls rtl8188e_deinit_dm_priv() using funtion pointer. rtl8188e_deinit_dm_priv() has empty defination, so we can remove rtw_hal_dm_deinit() and later rtl8188e_deinit_dm_priv() also will be removed. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/hal_intf.c |7 --- drivers/staging/rtl8188eu/include/hal_intf.h |1 - drivers/staging/rtl8188eu/os_dep/os_intfs.c |2 -- 3 files changed, 10 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/hal_intf.c b/drivers/staging/rtl8188eu/hal/hal_intf.c index 43eee48..d0ac4a1 100644 --- a/drivers/staging/rtl8188eu/hal/hal_intf.c +++ b/drivers/staging/rtl8188eu/hal/hal_intf.c @@ -60,13 +60,6 @@ void rtw_hal_dm_init(struct adapter *adapt) adapt->HalFunc.dm_init(adapt); } -void rtw_hal_dm_deinit(struct adapter *adapt) -{ - /* cancel dm timer */ - if (adapt->HalFunc.dm_deinit) - adapt->HalFunc.dm_deinit(adapt); -} - void rtw_hal_sw_led_init(struct adapter *adapt) { if (adapt->HalFunc.InitSwLeds) diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h index acdef1d..a8f25c9 100644 --- a/drivers/staging/rtl8188eu/include/hal_intf.h +++ b/drivers/staging/rtl8188eu/include/hal_intf.h @@ -296,7 +296,6 @@ void rtw_hal_def_value_init(struct adapter *padapter); void rtw_hal_free_data(struct adapter *padapter); void rtw_hal_dm_init(struct adapter *padapter); -void rtw_hal_dm_deinit(struct adapter *padapter); void rtw_hal_sw_led_init(struct adapter *padapter); void rtw_hal_sw_led_deinit(struct adapter *padapter); diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c index 9edb8e8..c1368b8 100644 --- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c +++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c @@ -951,8 +951,6 @@ void rtw_cancel_all_timer(struct adapter *padapter) _cancel_timer_ex(&padapter->pwrctrlpriv.pwr_state_check_timer); _cancel_timer_ex(&padapter->recvpriv.signal_stat_timer); - /* cancel dm timer */ - rtw_hal_dm_deinit(padapter); } u8 rtw_free_drv_sw(struct adapter *padapter) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 10/24] staging: rtl8188eu: Remove unused function rtl8188e_deinit_dm_priv()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c |4 drivers/staging/rtl8188eu/include/rtl8188e_dm.h |1 - 2 files changed, 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c index 4e9f797..d5cd30b 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c @@ -203,10 +203,6 @@ void rtl8188e_init_dm_priv(struct adapter *Adapter) ODM_InitDebugSetting(podmpriv); } -void rtl8188e_deinit_dm_priv(struct adapter *Adapter) -{ -} - /* Add new function to reset the state of antenna diversity before link. */ /* Compare RSSI for deciding antenna */ void AntDivCompare8188E(struct adapter *Adapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src) diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_dm.h b/drivers/staging/rtl8188eu/include/rtl8188e_dm.h index 97a3175..5e0ac31 100644 --- a/drivers/staging/rtl8188eu/include/rtl8188e_dm.h +++ b/drivers/staging/rtl8188eu/include/rtl8188e_dm.h @@ -51,7 +51,6 @@ structdm_priv { }; void rtl8188e_init_dm_priv(struct adapter *adapt); -void rtl8188e_deinit_dm_priv(struct adapter *adapt); void rtl8188e_InitHalDm(struct adapter *adapt); void rtl8188e_HalDmWatchDog(struct adapter *adapt); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/