[PATCH] msi3103: Use time_before_eq()
To be future-proof and for better readability the time comparisons are modified to use time_before_eq() instead of plain, error-prone math. Signed-off-by: Manuel Schölling --- drivers/staging/media/msi3101/sdr-msi3101.c | 28 +-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/media/msi3101/sdr-msi3101.c b/drivers/staging/media/msi3101/sdr-msi3101.c index 65d351f..7a0a8ca 100644 --- a/drivers/staging/media/msi3101/sdr-msi3101.c +++ b/drivers/staging/media/msi3101/sdr-msi3101.c @@ -207,10 +207,10 @@ static int msi3101_convert_stream_504(struct msi3101_state *s, u8 *dst, dst_len += 1008; } - /* calculate samping rate and output it in 10 seconds intervals */ - if ((s->jiffies_next + msecs_to_jiffies(1)) <= jiffies) { + /* calculate sampling rate and output it in 10 seconds intervals */ + if (time_before_eq(s->jiffies_next + 10 * HZ, jiffies)) { unsigned long jiffies_now = jiffies; - unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies_next); + unsigned long msecs = jiffies_to_msecs(jiffies_now - s->jiffies_next); unsigned int samples = sample_num[i_max - 1] - s->sample; s->jiffies_next = jiffies_now; s->sample = sample_num[i_max - 1]; @@ -265,7 +265,7 @@ static int msi3101_convert_stream_504_u8(struct msi3101_state *s, u8 *dst, dst_len += 1008; } - /* calculate samping rate and output it in 10 seconds intervals */ + /* calculate sampling rate and output it in 10 seconds intervals */ if (unlikely(time_is_before_jiffies(s->jiffies_next))) { #define MSECS 1UL unsigned int samples = sample_num[i_max - 1] - s->sample; @@ -359,10 +359,10 @@ static int msi3101_convert_stream_384(struct msi3101_state *s, u8 *dst, dst_len += 984; } - /* calculate samping rate and output it in 10 seconds intervals */ - if ((s->jiffies_next + msecs_to_jiffies(1)) <= jiffies) { + /* calculate sampling rate and output it in 10 seconds intervals */ + if (time_before_eq(s->jiffies_next + 10 * HZ, jiffies)) { unsigned long jiffies_now = jiffies; - unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies_next); + unsigned long msecs = jiffies_to_msecs(jiffies_now - s->jiffies_next); unsigned int samples = sample_num[i_max - 1] - s->sample; s->jiffies_next = jiffies_now; s->sample = sample_num[i_max - 1]; @@ -424,10 +424,10 @@ static int msi3101_convert_stream_336(struct msi3101_state *s, u8 *dst, dst_len += 1008; } - /* calculate samping rate and output it in 10 seconds intervals */ - if ((s->jiffies_next + msecs_to_jiffies(1)) <= jiffies) { + /* calculate sampling rate and output it in 10 seconds intervals */ + if (time_before_eq(s->jiffies_next + 10 * HZ, jiffies)) { unsigned long jiffies_now = jiffies; - unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies_next); + unsigned long msecs = jiffies_to_msecs(jiffies_now - s->jiffies_next); unsigned int samples = sample_num[i_max - 1] - s->sample; s->jiffies_next = jiffies_now; s->sample = sample_num[i_max - 1]; @@ -487,10 +487,10 @@ static int msi3101_convert_stream_252(struct msi3101_state *s, u8 *dst, dst_len += 1008; } - /* calculate samping rate and output it in 10 seconds intervals */ - if ((s->jiffies_next + msecs_to_jiffies(1)) <= jiffies) { + /* calculate sampling rate and output it in 10 seconds intervals */ + if (time_before_eq(s->jiffies_next + 10 * HZ, jiffies)) { unsigned long jiffies_now = jiffies; - unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies_next); + unsigned long msecs = jiffies_to_msecs(jiffies_now - s->jiffies_next); unsigned int samples = sample_num[i_max - 1] - s->sample; s->jiffies_next = jiffies_now; s->sample = sample_num[i_max - 1]; @@ -560,7 +560,7 @@ static int msi3101_convert_stream_252_u16(struct msi3101_state *s, u8 *dst, dst_len += 1008; } - /* calculate samping rate and output it in 10 seconds intervals */ + /* calculate sampling rate and output it in 10 seconds intervals */ if (unlikely(time_is_before_jiffies(s->jiffies_next))) { #define MSECS 1UL unsigned int samples = sample_num[i_max - 1] - s->sample; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listi
[PATCH] rtl8188eu: use time_before/time_after and change type of ips_deny_time
To be future-proof and for better readability the time comparisons are modified to use time_before/_after() instead of plain, error-prone math. To suppress compiler warnings the type of ips_deny_time was changed. Signed-off-by: Manuel Schölling --- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c|9 ++--- drivers/staging/rtl8188eu/include/rtw_pwrctrl.h |2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c index f658373..eaf2630 100644 --- a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c @@ -122,7 +122,7 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter) bool ret = false; - if (adapter->pwrctrlpriv.ips_deny_time >= jiffies) + if (time_after_eq(adapter->pwrctrlpriv.ips_deny_time, jiffies)) goto exit; if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE|WIFI_SITE_MONITOR) || @@ -523,9 +523,11 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal { struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + unsigned long expires; int ret = _SUCCESS; - if (pwrpriv->ips_deny_time < jiffies + rtw_ms_to_systime(ips_deffer_ms)) + expires = jiffies + rtw_ms_to_systime(ips_deffer_ms); + if (time_before(pwrpriv->ips_deny_time, expires)) pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ips_deffer_ms); { @@ -580,7 +582,8 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal } exit: - if (pwrpriv->ips_deny_time < jiffies + rtw_ms_to_systime(ips_deffer_ms)) + expires = jiffies + rtw_ms_to_systime(ips_deffer_ms); + if (time_before(pwrpriv->ips_deny_time, expires)) pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ips_deffer_ms); return ret; } diff --git a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h index 9a42859..4211023 100644 --- a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h +++ b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h @@ -192,7 +192,7 @@ struct pwrctrl_priv { u8 ips_mode_req; /* used to accept the mode setting request, * will update to ipsmode later */ uint bips_processing; - u32 ips_deny_time; /* will deny IPS when system time less than this */ + unsigned long ips_deny_time; /* will deny IPS when system time less than this */ u8 ps_processing; /* temp used to mark whether in rtw_ps_processor */ u8 bLeisurePs; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] gdm72xx: use time_before()
To be future-proof and for better readability the time comparisons are modified to use time_before() instead of plain, error-prone math. Signed-off-by: Manuel Schölling --- drivers/staging/gdm72xx/gdm_usb.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gdm72xx/gdm_usb.c b/drivers/staging/gdm72xx/gdm_usb.c index 20539d8..9ddf8f5 100644 --- a/drivers/staging/gdm72xx/gdm_usb.c +++ b/drivers/staging/gdm72xx/gdm_usb.c @@ -730,7 +730,7 @@ static int k_mode_thread(void *arg) spin_unlock_irqrestore(&k_lock, flags2); expire = jiffies + K_WAIT_TIME; - while (jiffies < expire) + while (time_before(jiffies, expire)) schedule_timeout(K_WAIT_TIME); spin_lock_irqsave(&rx->lock, flags); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: rtl8192u: r819xU_firmware_img.c Fixed checkpatch.pl ERRORs
Fixed a lot of errors of the type "ERROR: space required after that ',' (ctx:VxV)" Added tabs at the beginning of line. Signed-off-by: Chaitanya Hazarey --- drivers/staging/rtl8192u/r819xU_firmware_img.c | 1042 1 file changed, 521 insertions(+), 521 deletions(-) diff --git a/drivers/staging/rtl8192u/r819xU_firmware_img.c b/drivers/staging/rtl8192u/r819xU_firmware_img.c index 0785de7..4eb43cf 100644 --- a/drivers/staging/rtl8192u/r819xU_firmware_img.c +++ b/drivers/staging/rtl8192u/r819xU_firmware_img.c @@ -3,546 +3,546 @@ #include "r819xU_firmware_img.h" u32 Rtl8192UsbPHY_REGArray[] = { -0x0, }; + 0x0, }; u32 Rtl8192UsbPHY_REG_1T2RArray[] = { -0x800,0x, -0x804,0x0001, -0x808,0xfc00, -0x80c,0x001c, -0x810,0x801010aa, -0x814,0x008514d0, -0x818,0x0040, -0x81c,0x, -0x820,0x0004, -0x824,0x0069, -0x828,0x0004, -0x82c,0x00e9, -0x830,0x0004, -0x834,0x0069, -0x838,0x0004, -0x83c,0x00e9, -0x840,0x, -0x844,0x, -0x848,0x, -0x84c,0x, -0x850,0x, -0x854,0x, -0x858,0x65a965a9, -0x85c,0x65a965a9, -0x860,0x001f0010, -0x864,0x007f0010, -0x868,0x001f0010, -0x86c,0x007f0010, -0x870,0x0f100f70, -0x874,0x0f100f70, -0x878,0x, -0x87c,0x, -0x880,0x6870e36c, -0x884,0xe3573600, -0x888,0x4260c340, -0x88c,0xff00, -0x890,0x, -0x894,0xfffe, -0x898,0x4c42382f, -0x89c,0x00656056, -0x8b0,0x, -0x8e0,0x, -0x8e4,0x, -0x900,0x, -0x904,0x0023, -0x908,0x, -0x90c,0x31121311, -0xa00,0x00d0c7d8, -0xa04,0x811f0008, -0xa08,0x80cd8300, -0xa0c,0x2e62740f, -0xa10,0x95009b78, -0xa14,0x11145008, -0xa18,0x00881117, -0xa1c,0x89140fa0, -0xa20,0x1a1b, -0xa24,0x090e1317, -0xa28,0x0204, -0xa2c,0x, -0xc00,0x0040, -0xc04,0x5433, -0xc08,0x00e4, -0xc0c,0x6c6c6c6c, -0xc10,0x0880, -0xc14,0x4100, -0xc18,0x0800, -0xc1c,0x4100, -0xc20,0x0800, -0xc24,0x4100, -0xc28,0x0800, -0xc2c,0x4100, -0xc30,0x6de9ac44, -0xc34,0x465c52cd, -0xc38,0x497f5994, -0xc3c,0x0a969764, -0xc40,0x1f7c403f, -0xc44,0x000100b7, -0xc48,0xec02, -0xc4c,0x0300, -0xc50,0x69543420, -0xc54,0x433c0094, -0xc58,0x69543420, -0xc5c,0x433c0094, -0xc60,0x69543420, -0xc64,0x433c0094, -0xc68,0x69543420, -0xc6c,0x433c0094, -0xc70,0x2c7f000d, -0xc74,0x0186175b, -0xc78,0x001f, -0xc7c,0x00b91612, -0xc80,0x4100, -0xc84,0x2000, -0xc88,0x4100, -0xc8c,0x2020, -0xc90,0x4100, -0xc94,0x, -0xc98,0x4100, -0xc9c,0x, -0xca0,0x00492492, -0xca4,0x, -0xca8,0x, -0xcac,0x, -0xcb0,0x, -0xcb4,0x, -0xcb8,0x, -0xcbc,0x00492492, -0xcc0,0x, -0xcc4,0x, -0xcc8,0x, -0xccc,0x, -0xcd0,0x, -0xcd4,0x, -0xcd8,0x64b22427, -0xcdc,0x00766932, -0xce0,0x0022, -0xd00,0x0750, -0xd04,0x0403, -0xd08,0x907f, -0xd0c,0x0001, -0xd10,0xa063, -0xd14,0x3c63, -0xd18,0x6a8f5b6b, -0xd1c,0x, -0xd20,0x, -0xd24,0x, -0xd28,0x, -0xd2c,0xcc979975, -0xd30,0x, -0xd34,0x, -0xd38,0x, -0xd3c,0x00027293, -0xd40,0x, -0xd44,0x, -0xd48,0x, -0xd4c,0x, -0xd50,0x6437140a, -0xd54,0x024dbd02, -0xd58,0x, -0xd5c,0x04032064, -0xe00,0x161a1a1a, -0xe04,0x12121416, -0xe08,0x1800, -0xe0c,0x, -0xe10,0x161a1a1a, -0xe14,0x12121416, -0xe18,0x161a1a1a, -0xe1c,0x12121416, + 0x800, 0x, + 0x804, 0x0001, + 0x808, 0xfc00, + 0x80c, 0x001c, + 0x810, 0x801010aa, + 0x814, 0x008514d0, + 0x818, 0x0040, + 0x81c, 0x, + 0x820, 0x0004, + 0x824, 0x0069, + 0x828, 0x0004, + 0x82c, 0x00e9, + 0x830, 0x0004, + 0x834, 0x0069, + 0x838, 0x0004, + 0x83c, 0x00e9, + 0x840, 0x, + 0x844, 0x, + 0x848, 0x, + 0x84c, 0x, + 0x850, 0x, + 0x854, 0x, + 0x858, 0x65a965a9, + 0x85c, 0x65a965a9, + 0x860, 0x001f0010, + 0x864, 0x007f0010, + 0x868, 0x001f0010, + 0x86c, 0x007f0010, + 0x870, 0x0f100f70, + 0x874, 0x0f100f70, + 0x878, 0x, + 0x87c, 0x, + 0x880, 0x6870e36c, + 0x884, 0xe3573600, + 0x888, 0x4260c340, + 0x88c, 0xff00, + 0x890, 0x, + 0x894, 0xfffe, + 0x898, 0x4c42382f, + 0x89c, 0x00656056, + 0x8b0, 0x, + 0x8e0, 0x, + 0x8e4, 0x, + 0x900, 0x, + 0x904, 0x0023, + 0x908, 0x, + 0x90c, 0x31121311, + 0xa00, 0x00d0c7d8, + 0xa04, 0x811f0008, + 0xa08, 0x80cd8300, + 0xa0c, 0x2e62740f, + 0xa10, 0x95009b78, + 0xa14, 0x11145008, + 0xa18, 0x00881117, + 0xa1c, 0x89140fa0, +
Re: [PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: Fixed a lot of checkpatch.pl warnings
On Fri, May 23, 2014 at 10:25:28PM -0700, Chaitanya Hazarey wrote: > Added a blank line after declarations in many places to fix the > following warning issued by checkpatch.pl: > > WARNING: Missing a blank line after declarations > > Thanks Greg K-H and Dan for the patience. Hope it works this time, I did > apply it against staging and it was ok. Hm, something is odd, it still doesn't apply properly: $ p1 < ../s1 checking file drivers/staging/silicom/bpctl_mod.c Hunk #40 FAILED at 4773. Hunk #41 FAILED at 4821. ... Hunk #89 FAILED at 7534. 3 out of 89 hunks FAILED Can you refresh this against my tree again and resend? I think we are out of sync here still. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] dgnc: Use time_after_eq()
To be future-proof and for better readability the time comparisons are modified to use time_after_eq() instead of plain, error-prone math. Signed-off-by: Manuel Schölling --- drivers/staging/dgnc/dgnc_neo.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index cf22c7b..a8ca22a 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -395,7 +395,8 @@ static inline void neo_clear_break(struct channel_t *ch, int force) /* Turn break off, and unset some variables */ if (ch->ch_flags & CH_BREAK_SENDING) { - if ((jiffies >= ch->ch_stop_sending_break) || force) { + if (time_after_eq(jiffies, ch->ch_stop_sending_break) + || force) { uchar temp = readb(&ch->ch_neo_uart->lcr); writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr); neo_pci_posting_flush(ch->ch_bd); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/8 V2] drivers/staging: Remove useless return variables
On Sat, May 24, 2014 at 01:06:48PM +0200, Peter Senna Tschudin wrote: > This patch remove variables that are initialized with a constant, > are never updated, and are only used as parameter of return. > Return the constant instead of using a variable. > > Verified by compilation only. > > The coccinelle script that find and fixes this issue is: > // > @@ > type T; > constant C; > identifier ret; > @@ > - T ret = C; > ... when != ret > when strict > return > - ret > + C > ; > // > > Signed-off-by: Peter Senna Tschudin > > --- > Changes from V1: > - Updated semantic patch > - Refreshed for next-20140523 Can you refresh again? It still doesn't apply :( thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: gdm72xx: use time_before()
On Sun, May 25, 2014 at 03:08:59PM +0200, Manuel Schölling wrote: > To be future-proof and for better readability the time comparisons are > modified to use time_before() instead of plain, error-prone math. > > Signed-off-by: Manuel Schölling > --- > drivers/staging/gdm72xx/gdm_usb.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) This patch doesn't apply, can you please refresh it against my latest tree and resend? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: gdm72xx: use time_before()
On So, 2014-05-25 at 11:14 -0700, Greg KH wrote: > On Sun, May 25, 2014 at 03:08:59PM +0200, Manuel Schölling wrote: > > To be future-proof and for better readability the time comparisons are > > modified to use time_before() instead of plain, error-prone math. > > > > Signed-off-by: Manuel Schölling > > --- > > drivers/staging/gdm72xx/gdm_usb.c |2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > This patch doesn't apply, can you please refresh it against my latest > tree and resend? That's weird. I pulled the lastest master from Linus and rebased the patch, but no modification of my patch was required (latest commit before my patch to that file was 8943a92fc257c439ffe55fb0f9896be57c58c56b according to my repo). Maybe you have a more recent version than Linus? Bye, Manuel > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: Fixed a lot of checkpatch.pl warnings
Sorry Greg, this is taking so long, will make this against your tree and send it out. Thanks for looking into this, Chaitanya On Sun, May 25, 2014 at 11:03 AM, Greg KH wrote: > On Fri, May 23, 2014 at 10:25:28PM -0700, Chaitanya Hazarey wrote: >> Added a blank line after declarations in many places to fix the >> following warning issued by checkpatch.pl: >> >> WARNING: Missing a blank line after declarations >> >> Thanks Greg K-H and Dan for the patience. Hope it works this time, I did >> apply it against staging and it was ok. > > > Hm, something is odd, it still doesn't apply properly: > > $ p1 < ../s1 > checking file drivers/staging/silicom/bpctl_mod.c > Hunk #40 FAILED at 4773. > Hunk #41 FAILED at 4821. > ... > Hunk #89 FAILED at 7534. > 3 out of 89 hunks FAILED > > Can you refresh this against my tree again and resend? I think we are > out of sync here still. > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: gdm72xx: use time_before()
On Sun, May 25, 2014 at 08:24:33PM +0200, Manuel Schoelling wrote: > On So, 2014-05-25 at 11:14 -0700, Greg KH wrote: > > On Sun, May 25, 2014 at 03:08:59PM +0200, Manuel Schölling wrote: > > > To be future-proof and for better readability the time comparisons are > > > modified to use time_before() instead of plain, error-prone math. > > > > > > Signed-off-by: Manuel Schölling > > > --- > > > drivers/staging/gdm72xx/gdm_usb.c |2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > This patch doesn't apply, can you please refresh it against my latest > > tree and resend? > That's weird. I pulled the lastest master from Linus and rebased the > patch, but no modification of my patch was required (latest commit > before my patch to that file was > 8943a92fc257c439ffe55fb0f9896be57c58c56b according to my repo). > > Maybe you have a more recent version than Linus? I have a much different version from Linus, with a few thousand patches added, otherwise how would I be able to queue up stuff to go to Linus for the next kernel release? :) For the staging patches, either use the linux-next tree (which you should use for all kernel development), or my staging.git tree, and the staging-next branch on git.kernel.org, which is what gets pulled into linux-next every week-day. If you have more questions about this, take a look at Documentation/development-process/ it should explain how patches move to Linus and why working against Linus's tree isn't going to get you very far. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: gdm72xx: use time_before()
On So, 2014-05-25 at 11:33 -0700, Greg KH wrote: > On Sun, May 25, 2014 at 08:24:33PM +0200, Manuel Schoelling wrote: > > On So, 2014-05-25 at 11:14 -0700, Greg KH wrote: > > > On Sun, May 25, 2014 at 03:08:59PM +0200, Manuel Schölling wrote: > > > > To be future-proof and for better readability the time comparisons are > > > > modified to use time_before() instead of plain, error-prone math. > > > > > > > > Signed-off-by: Manuel Schölling > > > > --- > > > > drivers/staging/gdm72xx/gdm_usb.c |2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > This patch doesn't apply, can you please refresh it against my latest > > > tree and resend? > > That's weird. I pulled the lastest master from Linus and rebased the > > patch, but no modification of my patch was required (latest commit > > before my patch to that file was > > 8943a92fc257c439ffe55fb0f9896be57c58c56b according to my repo). > > > > Maybe you have a more recent version than Linus? > > > I have a much different version from Linus, with a few thousand patches > added, otherwise how would I be able to queue up stuff to go to Linus > for the next kernel release? :) > > For the staging patches, either use the linux-next tree (which you > should use for all kernel development), or my staging.git tree, and the > staging-next branch on git.kernel.org, which is what gets pulled into > linux-next every week-day. > > If you have more questions about this, take a look at > Documentation/development-process/ it should explain how patches move > to Linus and why working against Linus's tree isn't going to get you > very far. Ok, thanks for your answer, Greg. I will use the linux-next tree and send you a new version of that patch today. Bye, Manuel > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: Fixed a lot of checkpatch.pl warnings
Added a blank line after declarations in many places to fix the following warning issued by checkpatch.pl: WARNING: Missing a blank line after declarations Lets see if this works now, this patch is prepared against Greg's staging tree. Signed-off-by: Chaitanya Hazarey --- drivers/staging/silicom/bpctl_mod.c| 92 +++- drivers/staging/silicom/bypasslib/bypass.c |2 + 2 files changed, 91 insertions(+), 3 deletions(-) diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c index 6b9365b..b7f9893 100644 --- a/drivers/staging/silicom/bpctl_mod.c +++ b/drivers/staging/silicom/bpctl_mod.c @@ -749,6 +749,7 @@ static void write_reg(struct bpctl_dev *pbpctl_dev, unsigned char value, uint32_t ctrl_ext = 0, ctrl = 0; struct bpctl_dev *pbpctl_dev_c = NULL; unsigned long flags; + if (pbpctl_dev->bp_10g9) { pbpctl_dev_c = get_status_port_fn(pbpctl_dev); if (!pbpctl_dev_c) @@ -924,6 +925,7 @@ static int read_reg(struct bpctl_dev *pbpctl_dev, unsigned char addr) #ifdef BP_SYNC_FLAG unsigned long flags; + spin_lock_irqsave(&pbpctl_dev->bypass_wr_lock, flags); #else atomic_set(&pbpctl_dev->wdt_busy, 1); @@ -1560,6 +1562,7 @@ int pulse_set_fn(struct bpctl_dev *pbpctl_dev, unsigned int counter) int zero_set_fn(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl_ext = 0, ctrl_value = 0; + if (!pbpctl_dev) return -1; @@ -1585,6 +1588,7 @@ int zero_set_fn(struct bpctl_dev *pbpctl_dev) int pulse_get2_fn(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl_ext = 0, ctrl_value = 0; + if (!pbpctl_dev) return -1; @@ -1600,6 +1604,7 @@ int pulse_get2_fn(struct bpctl_dev *pbpctl_dev) int pulse_get1_fn(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl_ext = 0, ctrl_value = 0; + if (!pbpctl_dev) return -1; @@ -1663,6 +1668,7 @@ static struct bpctl_dev *lookup_port(struct bpctl_dev *dev) { struct bpctl_dev *p; int n; + for (n = 0, p = bpctl_dev_arr; n < device_num && p->pdev; n++) { if (p->bus == dev->bus && p->slot == dev->slot @@ -1840,6 +1846,7 @@ static int bypass_off(struct bpctl_dev *pbpctl_dev) static int tap_off(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; + if ((pbpctl_dev->bp_caps & TAP_CAP) && (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER)) { write_data(pbpctl_dev, TAP_OFF); @@ -1853,6 +1860,7 @@ static int tap_off(struct bpctl_dev *pbpctl_dev) static int tap_on(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; + if ((pbpctl_dev->bp_caps & TAP_CAP) && (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER)) { write_data(pbpctl_dev, TAP_ON); @@ -1866,6 +1874,7 @@ static int tap_on(struct bpctl_dev *pbpctl_dev) static int disc_off(struct bpctl_dev *pbpctl_dev) { int ret = 0; + if ((pbpctl_dev->bp_caps & DISC_CAP) && (pbpctl_dev->bp_ext_ver >= 0x8)) { write_data(pbpctl_dev, DISC_OFF); msec_delay_bp(LATCH_DELAY); @@ -1878,6 +1887,7 @@ static int disc_off(struct bpctl_dev *pbpctl_dev) static int disc_on(struct bpctl_dev *pbpctl_dev) { int ret = 0; + if ((pbpctl_dev->bp_caps & DISC_CAP) && (pbpctl_dev->bp_ext_ver >= 0x8)) { write_data(pbpctl_dev, /*DISC_ON */ 0x85); msec_delay_bp(LATCH_DELAY); @@ -2267,6 +2277,7 @@ static int set_tx(struct bpctl_dev *pbpctl_dev, int tx_state) { int ret = 0, ctrl = 0; struct bpctl_dev *pbpctl_dev_m; + if ((is_bypass_fn(pbpctl_dev)) == 1) pbpctl_dev_m = pbpctl_dev; else @@ -2799,6 +2810,7 @@ int wdt_time_left(struct bpctl_dev *pbpctl_dev) static int wdt_timer(struct bpctl_dev *pbpctl_dev, int *time_left) { int ret = 0; + if (pbpctl_dev->bp_caps & WD_CTL_CAP) { { if (pbpctl_dev->wdt_status == WDT_STATUS_UNKNOWN) @@ -3011,6 +3023,7 @@ static int tx_status(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl = 0; struct bpctl_dev *pbpctl_dev_m; + if ((is_bypass_fn(pbpctl_dev)) == 1) pbpctl_dev_m = pbpctl_dev; else @@ -3192,6 +3205,7 @@ static int bypass_change_status(struct bpctl_dev *pbpctl_dev) static int bypass_status(struct bpctl_dev *pbpctl_dev) { u32 ctrl_ext = 0; + if (pbpctl_dev->bp_caps & BP_CAP) { struct bpctl_dev *pbpctl_dev_b = NULL; @@ -3320,6 +3334,7 @@ static int dis_bypass_cap_status(struct bpctl_dev *pbpctl_dev) static int wdt_programmed(struct bpctl_dev *pbpctl_dev, int *timeout) { int ret = 0; + if (pbpctl_dev->bp_caps & WD_CTL_CAP) { if (pbpctl_dev->bp_ext_ver >= PXG2BPI_VER) { if ((read_reg(pbpctl_dev, STATUS_REG_ADDR)) & @@ -3383,6 +3398,7 @@
[PATCH 09/48] staging: rtl8723au: Remove unused struct hostapd_priv
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/include/drv_types.h | 4 drivers/staging/rtl8723au/include/rtw_mlme.h | 10 -- 2 files changed, 14 deletions(-) diff --git a/drivers/staging/rtl8723au/include/drv_types.h b/drivers/staging/rtl8723au/include/drv_types.h index c3d633c..49add5f 100644 --- a/drivers/staging/rtl8723au/include/drv_types.h +++ b/drivers/staging/rtl8723au/include/drv_types.h @@ -229,10 +229,6 @@ struct rtw_adapter { struct eeprom_priv eeprompriv; struct led_privledpriv; -#ifdef CONFIG_8723AU_AP_MODE - struct hostapd_priv*phostapdpriv; -#endif - u32 setband; void *HalData; diff --git a/drivers/staging/rtl8723au/include/rtw_mlme.h b/drivers/staging/rtl8723au/include/rtw_mlme.h index d601c55..4d327ba 100644 --- a/drivers/staging/rtl8723au/include/rtw_mlme.h +++ b/drivers/staging/rtl8723au/include/rtw_mlme.h @@ -225,16 +225,6 @@ struct mlme_priv { u32 wfd_go_probe_resp_ie_len; /* for GO */ }; -#ifdef CONFIG_8723AU_AP_MODE - -struct hostapd_priv { - struct rtw_adapter *padapter; -}; - -int hostapd_mode_init(struct rtw_adapter *padapter); -void hostapd_mode_unload(struct rtw_adapter *padapter); -#endif - void rtw_joinbss_event_prehandle23a(struct rtw_adapter *adapter, u8 *pbuf); void rtw_survey_event_cb23a(struct rtw_adapter *adapter, const u8 *pbuf); void rtw_surveydone_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf); -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/48] staging: rtl8723au: Remove unused enum SCAN_RESULT_TYPE
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/include/rtw_mlme.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/rtl8723au/include/rtw_mlme.h b/drivers/staging/rtl8723au/include/rtw_mlme.h index 1aafa26..129c524 100644 --- a/drivers/staging/rtl8723au/include/rtw_mlme.h +++ b/drivers/staging/rtl8723au/include/rtw_mlme.h @@ -83,13 +83,6 @@ enum { GHZ_24, }; -enum SCAN_RESULT_TYPE { - SCAN_RESULT_P2P_ONLY = 0, /* Will return all the P2P devices. */ - SCAN_RESULT_ALL = 1,/* Will return all the scanned device, include AP. */ - SCAN_RESULT_WFD_TYPE = 2/* Will just return the correct WFD device. */ - /* If this device is Miracast sink device, it will just return all the Miracast source devices. */ -}; - /* there are several "locks" in mlme_priv, -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 33/48] staging: rtl8723au: rtw_pwrctrl.c: Remove an unnecessary COEXIST #ifdef
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c index f4e32d9..ef9b468 100644 --- a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c @@ -350,11 +350,8 @@ void rtw_set_ps_mode23a(struct rtw_adapter *padapter, u8 ps_mode, rtl8723a_set_FwPwrMode_cmd(padapter, ps_mode); pwrpriv->bFwCurrentInPSMode = false; } else { - if (PS_RDY_CHECK(padapter) -#ifdef CONFIG_8723AU_BT_COEXIST - || (rtl8723a_BT_using_antenna_1(padapter)) -#endif - ) { + if (PS_RDY_CHECK(padapter) || + rtl8723a_BT_using_antenna_1(padapter)) { DBG_8723A("%s: Enter 802.11 power save\n", __func__); pwrpriv->bFwCurrentInPSMode = true; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 31/48] staging: rtl8723au: Rename BT_LpsLeave() rtl8723a_BT_lps_leave()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_cmd.c | 8 ++-- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 7 +-- drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h | 2 ++ 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 0f837fa..646b59b 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -1088,13 +1088,9 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) LPS_Leave23a(padapter); break; case LPS_CTRL_LEAVE: -#ifdef CONFIG_8723AU_BT_COEXIST - BT_LpsLeave(padapter); - if (rtl8723a_BT_using_antenna_1(padapter) == false) -#endif - { + rtl8723a_BT_lps_leave(padapter); + if (!rtl8723a_BT_using_antenna_1(padapter)) LPS_Leave23a(padapter); - } break; default: diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index f00313b..9891a2f 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -161,11 +161,6 @@ void BT_HaltProcess(struct rtw_adapter *padapter) BTDM_ForHalt(padapter); } -void BT_LpsLeave(struct rtw_adapter *padapter) -{ - BTDM_LpsLeave(padapter); -} - /* = End of sync from SD7 driver COMMOM/BT.c = */ #define i64fmt "ll" @@ -9728,7 +9723,7 @@ BTDM_Set8723ABtCoexCurrAntNum(struct rtw_adapter *padapter, u8 antNum) pBtCoex->TotalAntNum = Ant_x2; } -void BTDM_LpsLeave(struct rtw_adapter *padapter) +void rtl8723a_BT_lps_leave(struct rtw_adapter *padapter) { struct bt_30info *pBTInfo = GET_BT_INFO(padapter); struct bt_mgnt *pBtMgnt = &pBTInfo->BtMgnt; diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h index 52e1732..1b2845e 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h @@ -28,6 +28,7 @@ void rtl8723a_BT_wifiscan_notify(struct rtw_adapter *padapter, u8 scanType); void rtl8723a_BT_mediastatus_notify(struct rtw_adapter *padapter, enum rt_media_status mstatus); void rtl8723a_BT_specialpacket_notify(struct rtw_adapter *padapter); +void rtl8723a_BT_lps_leave(struct rtw_adapter *padapter); #else static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) { @@ -45,6 +46,7 @@ static inline bool rtl8723a_BT_coexist(struct rtw_adapter *padapter) #define rtl8723a_BT_wifiscan_notify(padapter, scanType)do {} while(0) #define rtl8723a_BT_mediastatus_notify(padapter, mstatus) do {} while(0) #define rtl8723a_BT_specialpacket_notify(padapter) do {} while(0) +#define rtl8723a_BT_lps_leave(padapter)do {} while(0) #endif #endif -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/48] staging: rtl8723au: Use ieee80211.h defines for IV/ICV len values
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 4 ++-- drivers/staging/rtl8723au/core/rtw_recv.c | 12 ++-- drivers/staging/rtl8723au/core/rtw_xmit.c | 12 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index b78e453..b0f218b 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -3085,7 +3085,7 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta, (unsigned char *)&val32, &pattrib->pktlen); - pattrib->iv_len = 4; + pattrib->iv_len = IEEE80211_WEP_IV_LEN; } pframe = rtw_set_fixed_ie23a(pframe, _AUTH_ALGM_NUM_, @@ -3121,7 +3121,7 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta, pattrib->encrypt = WLAN_CIPHER_SUITE_WEP40; - pattrib->icv_len = 4; + pattrib->icv_len = IEEE80211_WEP_ICV_LEN; pattrib->pktlen += pattrib->icv_len; } diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c b/drivers/staging/rtl8723au/core/rtw_recv.c index 3275287..24fa288 100644 --- a/drivers/staging/rtl8723au/core/rtw_recv.c +++ b/drivers/staging/rtl8723au/core/rtw_recv.c @@ -1410,16 +1410,16 @@ static int validate_recv_data_frame(struct rtw_adapter *adapter, { case WLAN_CIPHER_SUITE_WEP40: case WLAN_CIPHER_SUITE_WEP104: - pattrib->iv_len = 4; - pattrib->icv_len = 4; + pattrib->iv_len = IEEE80211_WEP_IV_LEN; + pattrib->icv_len = IEEE80211_WEP_ICV_LEN; break; case WLAN_CIPHER_SUITE_TKIP: - pattrib->iv_len = 8; - pattrib->icv_len = 4; + pattrib->iv_len = IEEE80211_TKIP_IV_LEN; + pattrib->icv_len = IEEE80211_TKIP_ICV_LEN; break; case WLAN_CIPHER_SUITE_CCMP: - pattrib->iv_len = 8; - pattrib->icv_len = 8; + pattrib->iv_len = IEEE80211_CCMP_HDR_LEN; + pattrib->icv_len = IEEE80211_CCMP_MIC_LEN; break; default: pattrib->iv_len = 0; diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c b/drivers/staging/rtl8723au/core/rtw_xmit.c index 3869386..0c66d35 100644 --- a/drivers/staging/rtl8723au/core/rtw_xmit.c +++ b/drivers/staging/rtl8723au/core/rtw_xmit.c @@ -597,13 +597,13 @@ static int update_attrib(struct rtw_adapter *padapter, switch (pattrib->encrypt) { case WLAN_CIPHER_SUITE_WEP40: case WLAN_CIPHER_SUITE_WEP104: - pattrib->iv_len = 4; - pattrib->icv_len = 4; + pattrib->iv_len = IEEE80211_WEP_IV_LEN; + pattrib->icv_len = IEEE80211_WEP_ICV_LEN; break; case WLAN_CIPHER_SUITE_TKIP: - pattrib->iv_len = 8; - pattrib->icv_len = 4; + pattrib->iv_len = IEEE80211_TKIP_IV_LEN; + pattrib->icv_len = IEEE80211_TKIP_ICV_LEN; if (!padapter->securitypriv.busetkipkey) { RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, @@ -619,8 +619,8 @@ static int update_attrib(struct rtw_adapter *padapter, RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("pattrib->encrypt =%d (WLAN_CIPHER_SUITE_CCMP)\n", pattrib->encrypt)); - pattrib->iv_len = 8; - pattrib->icv_len = 8; + pattrib->iv_len = IEEE80211_CCMP_HDR_LEN; + pattrib->icv_len = IEEE80211_CCMP_MIC_LEN; break; default: -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 36/48] staging: rtl8723au: rtw_mlme_ext.c: Sanitize calls to alloc_mgtxmitframe23a()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index a994f14..e1b28a2 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -2467,7 +2467,8 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms) /* DBG_8723A("%s\n", __func__); */ - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) { + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) { DBG_8723A("%s, alloc mgnt frame fail\n", __func__); return; } @@ -2843,7 +2844,8 @@ static int _issue_probereq(struct rtw_adapter *padapter, RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+%s\n", __func__)); - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) goto exit; /* update attribute */ @@ -2991,7 +2993,8 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta, struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) return; /* update attribute */ @@ -3569,7 +3572,8 @@ static int _issue_nulldata23a(struct rtw_adapter *padapter, unsigned char *da, pmlmeext = &padapter->mlmeextpriv; pmlmeinfo = &pmlmeext->mlmext_info; - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) goto exit; /* update attribute */ @@ -3685,7 +3689,8 @@ static int _issue_qos_nulldata23a(struct rtw_adapter *padapter, DBG_8723A("%s\n", __func__); - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) goto exit; /* update attribute */ @@ -3810,7 +3815,8 @@ static int _issue_deauth(struct rtw_adapter *padapter, unsigned char *da, /* DBG_8723A("%s to "MAC_FMT"\n", __func__, MAC_ARG(da)); */ - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) goto exit; /* update attribute */ @@ -3921,7 +3927,8 @@ void issue_action_spct_ch_switch23a(struct rtw_adapter *padapter, DBG_8723A("%s(%s): ra ="MAC_FMT", ch:%u, offset:%u\n", __func__, padapter->pnetdev->name, MAC_ARG(ra), new_ch, ch_offset); - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) return; /* update attribute */ @@ -3990,7 +3997,8 @@ void issue_action_BA23a(struct rtw_adapter *padapter, DBG_8723A("%s, category =%d, action =%d, status =%d\n", __func__, category, action, status); - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) return; /* update attribute */ -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 41/48] staging: rtl8723au: rtl8732au_hal_init.c: Use rtl8723au_BT_coexist() to pick firmware image
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index 970b585..dc97885 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -309,15 +309,15 @@ int rtl8723a_FirmwareDownload(struct rtw_adapter *padapter) DBG_8723A(" Rtl8723_FwUMCBCutImageArrayWithoutBT for " "RTL8723A B CUT\n"); } else { -#ifdef CONFIG_8723AU_BT_COEXIST - fw_name = "rtlwifi/rtl8723aufw_B.bin"; - DBG_8723A(" Rtl8723_FwUMCBCutImageArrayWithBT for " - "RTL8723A B CUT\n"); -#else - fw_name = "rtlwifi/rtl8723aufw_B_NoBT.bin"; - DBG_8723A(" Rtl8723_FwUMCBCutImageArrayWithoutBT for " - "RTL8723A B CUT\n"); -#endif + if (rtl8723a_BT_coexist(padapter)) { + fw_name = "rtlwifi/rtl8723aufw_B.bin"; + DBG_8723A(" Rtl8723_FwUMCBCutImageArrayWithBT " + "for RTL8723A B CUT\n"); + } else { + fw_name = "rtlwifi/rtl8723aufw_B_NoBT.bin"; + DBG_8723A(" Rtl8723_FwUMCBCutImageArrayWithout " + "BT for RTL8723A B CUT\n"); + } } } else { /* We should download proper RAM Code here -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/48] staging: rtl8723au: Do not call netdev_open23a() from cfg80211_rtw_change_iface()
From: Jes Sorensen Calling open on the device when changing the interface type is wrong. Let the stack call open at the right time. Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index f75a825..2bcdbe1 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -1391,15 +1391,6 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, int ret = 0; DBG_8723A("%s(%s): call netdev_open23a\n", __func__, ndev->name); - if (netdev_open23a(ndev) != 0) { - ret = -EPERM; - goto exit; - } - - if (_FAIL == rtw_pwr_wakeup(padapter)) { - ret = -EPERM; - goto exit; - } old_type = rtw_wdev->iftype; DBG_8723A("%s(%s): old_iftype =%d, new_iftype =%d\n", -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/48] staging: rtl8723au: ioctl_cfg80211.c: Use ether_addr_copy()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 25 --- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 2bcdbe1..d183098 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -317,14 +317,14 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter, pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON); } else { - memcpy(pwlanhdr->addr1, myid(&padapter->eeprompriv), ETH_ALEN); + ether_addr_copy(pwlanhdr->addr1, myid(&padapter->eeprompriv)); pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_RESP); } - memcpy(pwlanhdr->addr2, pnetwork->network.MacAddress, ETH_ALEN); - memcpy(pwlanhdr->addr3, pnetwork->network.MacAddress, ETH_ALEN); + ether_addr_copy(pwlanhdr->addr2, pnetwork->network.MacAddress); + ether_addr_copy(pwlanhdr->addr3, pnetwork->network.MacAddress); pbuf += sizeof(struct ieee80211_hdr_3addr); len = sizeof(struct ieee80211_hdr_3addr); @@ -458,7 +458,7 @@ static int set_pairwise_key(struct rtw_adapter *padapter, struct sta_info *psta) psetstakey_para->algorithm = psta->dot118021XPrivacy; - memcpy(psetstakey_para->addr, psta->hwaddr, ETH_ALEN); + ether_addr_copy(psetstakey_para->addr, psta->hwaddr); memcpy(psetstakey_para->key, &psta->dot118021x_UncstKey, 16); @@ -1148,7 +1148,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { #ifdef CONFIG_8723AU_AP_MODE if (mac_addr) - memcpy(param->sta_addr, (void *)mac_addr, ETH_ALEN); + ether_addr_copy(param->sta_addr, mac_addr); ret = rtw_cfg80211_ap_set_encryption(ndev, param, param_len); #endif @@ -2340,8 +2340,9 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy, DBG_8723A("%s(%s): Use new entry index = %d for this PMKID\n", __func__, netdev->name, psecuritypriv->PMKIDIndex); - memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex]. - Bssid, pmksa->bssid, ETH_ALEN); + ether_addr_copy( + psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex]. + Bssid, pmksa->bssid); memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex]. PMKID, pmksa->pmkid, WLAN_PMKID_LEN); @@ -2479,9 +2480,9 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter, pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH); - memcpy(pwlanhdr->addr1, myid(&padapter->eeprompriv), ETH_ALEN); - memcpy(pwlanhdr->addr2, da, ETH_ALEN); - memcpy(pwlanhdr->addr3, get_my_bssid23a(&pmlmeinfo->network), ETH_ALEN); + ether_addr_copy(pwlanhdr->addr1, myid(&padapter->eeprompriv)); + ether_addr_copy(pwlanhdr->addr2, da); + ether_addr_copy(pwlanhdr->addr3, get_my_bssid23a(&pmlmeinfo->network)); pwlanhdr->seq_ctrl = cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq)); @@ -2575,8 +2576,8 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, skb_pull(skb, dot11_hdr_len + qos_len + snap_len - ETH_ALEN * 2); pdata = (unsigned char *)skb->data; - memcpy(pdata, dst_mac_addr, ETH_ALEN); - memcpy(pdata + ETH_ALEN, src_mac_addr, ETH_ALEN); + ether_addr_copy(pdata, dst_mac_addr); + ether_addr_copy(pdata + ETH_ALEN, src_mac_addr); DBG_8723A("should be eapol packet\n"); -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 24/48] staging: rtl8723au: Convert BT_IsBtDisabled() into rtl8723a_BT_enabled()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/hal/hal_com.c| 11 --- .../staging/rtl8723au/hal/rtl8723a_bt-coexist.c| 22 +++--- .../rtl8723au/include/rtl8723a_bt-coexist.h| 2 -- .../staging/rtl8723au/include/rtl8723a_bt_intf.h | 5 + 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/hal_com.c b/drivers/staging/rtl8723au/hal/hal_com.c index dc4dfe9..09e888a 100644 --- a/drivers/staging/rtl8723au/hal/hal_com.c +++ b/drivers/staging/rtl8723au/hal/hal_com.c @@ -455,15 +455,12 @@ void rtl8723a_set_ampdu_factor(struct rtw_adapter *padapter, u8 FactorToSet) u8 index = 0; pRegToSet = RegToSet_Normal;/* 0xb972a841; */ -#ifdef CONFIG_8723AU_BT_COEXIST - if ((BT_IsBtDisabled(padapter) == false) && - rtl8723a_BT_using_antenna_1(padapter)) { + + if (rtl8723a_BT_enabled(padapter) && + rtl8723a_BT_using_antenna_1(padapter)) MaxAggNum = 0x8; - } else -#endif /* CONFIG_8723AU_BT_COEXIST */ - { + else MaxAggNum = 0xF; - } if (FactorToSet <= 3) { FactorToSet = (1 << (FactorToSet + 2)); diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index 4c4f0bf..b28dc1a 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -5519,7 +5519,7 @@ _btdm_1AntSetPSTDMA(struct rtw_adapter *padapter, u8 bPSEn, u8 smartps, if (!bTDMAOn) { btdm_1AntPsTdma(padapter, false, tdmaType); } else { - if ((BT_IsBtDisabled(padapter)) || + if (!rtl8723a_BT_enabled(padapter) || (pHalData->bt_coexist.halCoex8723.c2hBtInfo == BT_INFO_STATE_NO_CONNECTION) || (pHalData->bt_coexist.halCoex8723.c2hBtInfo == BT_INFO_STATE_CONNECT_IDLE) || (tdmaType == 29)) @@ -6064,7 +6064,7 @@ static void btdm_1AntBtCoexistHandler(struct rtw_adapter *padapter) pBtCoex8723 = &pHalData->bt_coexist.halCoex8723; pBtdm8723 = &pBtCoex8723->btdm1Ant; padapter->pwrctrlpriv.btcoex_rfon = false; - if (BT_IsBtDisabled(padapter)) { + if (!rtl8723a_BT_enabled(padapter)) { RTPRINT(FBT, BT_TRACE, ("[BTCoex], BT is disabled\n")); if (BTDM_IsWifiConnectionExist(padapter)) { @@ -6243,7 +6243,7 @@ static void BTDM_1AntWifiAssociateNotify(struct rtw_adapter *padapter, u8 type) if (type) { rtl8723a_CheckAntenna_Selection(padapter); - if (BT_IsBtDisabled(padapter)) + if (!rtl8723a_BT_enabled(padapter)) btdm_1AntSetPSTDMA(padapter, false, 0, false, 9); else { struct bt_coexist_8723a *pBtCoex; @@ -6275,7 +6275,7 @@ static void BTDM_1AntWifiAssociateNotify(struct rtw_adapter *padapter, u8 type) } } } else { - if (BT_IsBtDisabled(padapter)) { + if (!rtl8723a_BT_enabled(padapter)) { if (!BTDM_IsWifiConnectionExist(padapter)) { btdm_1AntPsTdma(padapter, false, 0); btdm_1AntTSFSwitch(padapter, false); @@ -6360,7 +6360,7 @@ static void BTDM_1AntWifiScanNotify(struct rtw_adapter *padapter, u8 scanType) if (scanType) { rtl8723a_CheckAntenna_Selection(padapter); - if (BT_IsBtDisabled(padapter)) { + if (!rtl8723a_BT_enabled(padapter)) { btdm_1AntSetPSTDMA(padapter, false, 0, false, 9); } else if (BTDM_IsWifiConnectionExist(padapter) == false) { BTDM_1AntWifiAssociateNotify(padapter, true); @@ -9306,7 +9306,7 @@ void BTDM_QueryBtInformation(struct rtw_adapter *padapter) pHalData = GET_HAL_DATA(padapter); pBtCoex = &pHalData->bt_coexist.halCoex8723; - if (BT_IsBtDisabled(padapter)) { + if (!rtl8723a_BT_enabled(padapter)) { pBtCoex->c2hBtInfo = BT_INFO_STATE_DISABLED; pBtCoex->bC2hBtInfoReqSent = false; return; @@ -9851,7 +9851,7 @@ static void BTDM_BTCoexist8723A(struct rtw_adapter *padapter) } if (pBtCoex->bC2hBtInfoReqSent) { - if (BT_IsBtDisabled(padapter)) { + if (!rtl8723a_BT_enabled(padapter)) { pBtCoex->c2hBtInfo = BT_INFO_STATE_DISABLED; } else { if (pBtCoex->c2hBtInfo == BT_INFO_STATE_DISABLED) @@ -9859,7 +9859,7 @@ static void BTDM_BTCoexist8723A(struct rtw_adapter *padapter) }
[PATCH 39/48] staging: rtl8723au: Rename HALBT_InitHwConfig() rtl8723a_BT_init_hwconfig()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +- drivers/staging/rtl8723au/hal/usb_halinit.c | 4 ++-- drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h | 2 -- drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h| 2 ++ 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index 48c16f4..3050607 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -11330,7 +11330,7 @@ u8 HALBT_BTChipType(struct rtw_adapter *padapter) return pHalData->bt_coexist.BT_CoexistType; } -void HALBT_InitHwConfig(struct rtw_adapter *padapter) +void rtl8723a_BT_init_hwconfig(struct rtw_adapter *padapter) { halbt_InitHwConfig8723A(padapter); rtl8723a_BT_do_coexist(padapter); diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index cbd5a8c..2fde327 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -869,9 +869,9 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter) #ifdef CONFIG_8723AU_BT_COEXIST HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_BT_COEXIST); - /* Init BT hw config. */ - BT_InitHwConfig(Adapter); #endif + /* Init BT hw config. */ + rtl8723a_BT_init_hwconfig(Adapter); HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_HAL_DM); rtl8723a_InitHalDm(Adapter); diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h index b5659fd..8ab56d8 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h @@ -1613,8 +1613,6 @@ void HALBT_InitBTVars8723A(struct rtw_adapter * padapter); u8 HALBT_IsBTExist(struct rtw_adapter * padapter); #define BT_IsBtExist HALBT_IsBTExist u8 HALBT_BTChipType(struct rtw_adapter * padapter); -void HALBT_InitHwConfig(struct rtw_adapter * padapter); -#define BT_InitHwConfig HALBT_InitHwConfig void HALBT_SetRtsCtsNoLenLimit(struct rtw_adapter * padapter); /* = End of sync from SD7 driver HAL/HalBT.c = */ diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h index 7cf4de6..98bea65 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h @@ -32,6 +32,7 @@ void rtl8723a_BT_lps_leave(struct rtw_adapter *padapter); void rtl8723a_BT_disable_coexist(struct rtw_adapter *padapter); bool rtl8723a_BT_disable_EDCA_turbo(struct rtw_adapter *padapter); void rtl8723a_dual_antenna_detection(struct rtw_adapter *padapter); +void rtl8723a_BT_init_hwconfig(struct rtw_adapter *padapter); #else static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) { @@ -56,6 +57,7 @@ static inline bool rtl8723a_BT_disable_EDCA_turbo(struct rtw_adapter *padapter) return false; } #define rtl8723a_dual_antenna_detection(padapter) do {} while(0) +#define rtl8723a_BT_init_hwconfig(padapter)do {} while(0) #endif #endif -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 22/48] staging: rtl8723au: PS_RDY_CHECK() return bools in 'bool'
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c index 937bbbc..79cc729 100644 --- a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c @@ -288,7 +288,7 @@ void rtw_set_rpwm23a(struct rtw_adapter *padapter, u8 pslv) pwrpriv->cpwm = pslv; } -static u8 PS_RDY_CHECK(struct rtw_adapter * padapter) +static bool PS_RDY_CHECK(struct rtw_adapter * padapter) { unsigned long delta_time; struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/48] staging: rtl8723au: _rtw_pwr_wakeup23a(): Do not mix _FAIL/false as return value
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c index 86ce51f..937bbbc 100644 --- a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c @@ -600,7 +600,7 @@ int _rtw_pwr_wakeup23a(struct rtw_adapter *padapter, u32 ips_deffer_ms, const ch DBG_8723A("%s: bDriverStopped =%d, bup =%d, hw_init_completed " "=%u\n", caller, padapter->bDriverStopped, padapter->bup, padapter->hw_init_completed); - ret = false; + ret = _FAIL; goto exit; } -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 30/48] staging: rtl8723au: Rename BTDM_ForDhcp() to rtl8723a_BT_specialpacket_notify()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_cmd.c | 8 ++-- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 7 +-- drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h | 4 +++- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index c89a19c..0f837fa 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -1083,13 +1083,9 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) break; case LPS_CTRL_SPECIAL_PACKET: pwrpriv->DelayLPSLastTimeStamp = jiffies; -#ifdef CONFIG_8723AU_BT_COEXIST - BT_SpecialPacketNotify(padapter); - if (rtl8723a_BT_using_antenna_1(padapter) == false) -#endif - { + rtl8723a_BT_specialpacket_notify(padapter); + if (!rtl8723a_BT_using_antenna_1(padapter)) LPS_Leave23a(padapter); - } break; case LPS_CTRL_LEAVE: #ifdef CONFIG_8723AU_BT_COEXIST diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index dbaa7c4..f00313b 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -156,11 +156,6 @@ void BT_WifiAssociateNotify(struct rtw_adapter *padapter, u8 action) BTDM_WifiAssociateNotify(padapter, action); } -void BT_SpecialPacketNotify(struct rtw_adapter *padapter) -{ - BTDM_ForDhcp(padapter); -} - void BT_HaltProcess(struct rtw_adapter *padapter) { BTDM_ForHalt(padapter); @@ -11007,7 +11002,7 @@ void rtl8723a_BT_mediastatus_notify(struct rtw_adapter *padapter, BTDM_MediaStatusNotify8723A(padapter, mstatus); } -void BTDM_ForDhcp(struct rtw_adapter *padapter) +void rtl8723a_BT_specialpacket_notify(struct rtw_adapter *padapter) { if (!rtl8723a_BT_coexist(padapter)) return; diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h index 7ef59a2..52e1732 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h @@ -27,6 +27,7 @@ void rtl8723a_BT_do_coexist(struct rtw_adapter *padapter); void rtl8723a_BT_wifiscan_notify(struct rtw_adapter *padapter, u8 scanType); void rtl8723a_BT_mediastatus_notify(struct rtw_adapter *padapter, enum rt_media_status mstatus); +void rtl8723a_BT_specialpacket_notify(struct rtw_adapter *padapter); #else static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) { @@ -40,9 +41,10 @@ static inline bool rtl8723a_BT_coexist(struct rtw_adapter *padapter) { return false; } -#define rtl8723a_BT_do_coexist(padapter) do {} while(0) +#define rtl8723a_BT_do_coexist(padapter) do {} while(0) #define rtl8723a_BT_wifiscan_notify(padapter, scanType)do {} while(0) #define rtl8723a_BT_mediastatus_notify(padapter, mstatus) do {} while(0) +#define rtl8723a_BT_specialpacket_notify(padapter) do {} while(0) #endif #endif -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 27/48] staging: rtl8723au: Rename BTDM_Coexist() to rtl8723a_BT_do_coexist()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_cmd.c| 4 +--- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 4 ++-- drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h | 2 -- drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h| 2 ++ 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index e4caa3f..986abd8 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -1039,12 +1039,10 @@ static void dynamic_chk_wk_hdl(struct rtw_adapter *padapter, u8 *pbuf, int sz) rtl8723a_HalDmWatchDog(padapter); -#ifdef CONFIG_8723AU_BT_COEXIST /* */ /* BT-Coexist */ /* */ - BT_CoexistMechanism(padapter); -#endif + rtl8723a_BT_do_coexist(padapter); } static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index 9326e05..ab34b2b 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -10766,7 +10766,7 @@ void BTDM_SignalCompensation(struct rtw_adapter *padapter, u8 *rssi_wifi, u8 *rs BTDM_8723ASignalCompensation(padapter, rssi_wifi, rssi_bt); } -void BTDM_Coexist(struct rtw_adapter *padapter) +void rtl8723a_BT_do_coexist(struct rtw_adapter *padapter) { struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); @@ -11347,7 +11347,7 @@ u8 HALBT_BTChipType(struct rtw_adapter *padapter) void HALBT_InitHwConfig(struct rtw_adapter *padapter) { halbt_InitHwConfig8723A(padapter); - BTDM_Coexist(padapter); + rtl8723a_BT_do_coexist(padapter); } void HALBT_SetRtsCtsNoLenLimit(struct rtw_adapter *padapter) diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h index d8a3244..db25b72 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h @@ -1571,8 +1571,6 @@ void BTDM_HWCoexAllOff(struct rtw_adapter * padapter); void BTDM_CoexAllOff(struct rtw_adapter * padapter); void BTDM_TurnOffBtCoexistBeforeEnterIPS(struct rtw_adapter * padapter); void BTDM_SignalCompensation(struct rtw_adapter * padapter, u8 *rssi_wifi, u8 *rssi_bt); -void BTDM_Coexist(struct rtw_adapter * padapter); -#define BT_CoexistMechanism BTDM_Coexist void BTDM_UpdateCoexState(struct rtw_adapter * padapter); u8 BTDM_IsSameCoexistState(struct rtw_adapter * padapter); void BTDM_PWDBMonitor(struct rtw_adapter * padapter); diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h index 02178ac..3e7bdde 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h @@ -22,6 +22,7 @@ bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter); bool rtl8723a_BT_enabled(struct rtw_adapter *padapter); bool rtl8723a_BT_coexist(struct rtw_adapter *padapter); +void rtl8723a_BT_do_coexist(struct rtw_adapter *padapter); #else static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) { @@ -35,6 +36,7 @@ static inline bool rtl8723a_BT_coexist(struct rtw_adapter *padapter) { return false; } +#define rtl8723a_BT_do_coexist(padapter) do {} while(0) #endif #endif -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 35/48] staging: rtl8723au: rtw_mlme_ext.c: Remove CONFIG_8723AU_BT_COEXIST #ifdefs
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index def3299..a994f14 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -3478,13 +3478,12 @@ static void issue_assocreq(struct rtw_adapter *padapter) pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info = cpu_to_le16(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info); -#ifdef CONFIG_8723AU_BT_COEXIST - if (rtl8723a_BT_using_antenna_1(padapter)) { + if (rtl8723a_BT_coexist(padapter) && + rtl8723a_BT_using_antenna_1(padapter)) { /* set to 8K */ pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para &= (u8)~IEEE80211_HT_AMPDU_PARM_FACTOR; /* pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para |= MAX_AMPDU_FACTOR_8K */ } -#endif pframe = rtw_set_ie23a(pframe, WLAN_EID_HT_CAPABILITY, p[1], (u8 *)&pmlmeinfo->HT_caps, @@ -3986,9 +3985,7 @@ void issue_action_BA23a(struct rtw_adapter *padapter, struct sta_info *psta; struct sta_priv *pstapriv = &padapter->stapriv; struct registry_priv *pregpriv = &padapter->registrypriv; -#ifdef CONFIG_8723AU_BT_COEXIST u8 tendaAPMac[] = {0xC8, 0x3A, 0x35}; -#endif DBG_8723A("%s, category =%d, action =%d, status =%d\n", __func__, category, action, status); @@ -4037,9 +4034,9 @@ void issue_action_BA23a(struct rtw_adapter *padapter, pframe = rtw_set_fixed_ie23a(pframe, 1, &pmlmeinfo->dialogToken, &pattrib->pktlen); -#ifdef CONFIG_8723AU_BT_COEXIST - if (rtl8723a_BT_using_antenna_1(padapter) && - ((pmlmeinfo->assoc_AP_vendor != broadcomAP) || + if (rtl8723a_BT_coexist(padapter) && + rtl8723a_BT_using_antenna_1(padapter) && + (pmlmeinfo->assoc_AP_vendor != broadcomAP || memcmp(raddr, tendaAPMac, 3))) { /* A-MSDU NOT Supported */ BA_para_set = 0; @@ -4052,9 +4049,7 @@ void issue_action_BA23a(struct rtw_adapter *padapter, /* max buffer size is 8 MSDU */ BA_para_set |= (8 << 6) & IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK; - } else -#endif - { + } else { /* immediate ack & 64 buffer size */ BA_para_set = (0x1002 | ((status & 0xf) << 2)); } @@ -4104,16 +4099,15 @@ void issue_action_BA23a(struct rtw_adapter *padapter, else BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x1000); /* 64 buffer size */ -#ifdef CONFIG_8723AU_BT_COEXIST - if (rtl8723a_BT_using_antenna_1(padapter) && - ((pmlmeinfo->assoc_AP_vendor != broadcomAP) || + if (rtl8723a_BT_coexist(padapter) && + rtl8723a_BT_using_antenna_1(padapter) && + (pmlmeinfo->assoc_AP_vendor != broadcomAP || memcmp(raddr, tendaAPMac, 3))) { /* max buffer size is 8 MSDU */ BA_para_set &= ~IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK; BA_para_set |= (8 << 6) & IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK; } -#endif if (pregpriv->ampdu_amsdu == 0)/* disabled */ BA_para_set = cpu_to_le16(BA_para_set & ~BIT(0)); -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/48] staging: rtl8723au: ioctl_cfg80211.c: Use ether_addr_equal()
From: Jes Sorensen ... and in one case use is_zero_ether_addr() Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 25 +++ 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index d183098..b16a416 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -1258,7 +1258,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy, check_fwstate(pmlmepriv, _FW_LINKED)) { struct wlan_network *cur_network = &pmlmepriv->cur_network; - if (memcmp(mac, cur_network->network.MacAddress, ETH_ALEN)) { + if (!ether_addr_equal(mac, cur_network->network.MacAddress)) { DBG_8723A("%s, mismatch bssid =" MAC_FMT "\n", __func__, MAC_ARG(cur_network->network.MacAddress)); ret = -ENOENT; @@ -2068,8 +2068,8 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, dst_bssid = pnetwork->network.MacAddress; if (sme->bssid) { - if (memcmp(pnetwork->network.MacAddress, - sme->bssid, ETH_ALEN)) + if (!ether_addr_equal(pnetwork->network.MacAddress, + sme->bssid)) continue; } @@ -2083,7 +2083,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, if (sme->bssid) { src_bssid = sme->bssid; - if ((!memcmp(dst_bssid, src_bssid, ETH_ALEN))) { + if (ether_addr_equal(dst_bssid, src_bssid)) { DBG_8723A("matched by bssid\n"); ndis_ssid.ssid_len = @@ -2307,20 +2307,18 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy, u8 index, blInserted = false; struct rtw_adapter *padapter = wiphy_to_adapter(wiphy); struct security_priv *psecuritypriv = &padapter->securitypriv; - u8 strZeroMacAddress[ETH_ALEN] = { 0x00 }; DBG_8723A("%s(%s)\n", __func__, netdev->name); - if (!memcmp(pmksa->bssid, strZeroMacAddress, ETH_ALEN)) { + if (is_zero_ether_addr(pmksa->bssid)) return -EINVAL; - } blInserted = false; /* overwrite PMKID */ for (index = 0; index < NUM_PMKID_CACHE; index++) { - if (!memcmp(psecuritypriv->PMKIDList[index].Bssid, - pmksa->bssid, ETH_ALEN)) { + if (ether_addr_equal(psecuritypriv->PMKIDList[index].Bssid, +pmksa->bssid)) { /* BSSID is matched, the same AP => rewrite with new PMKID. */ DBG_8723A("%s(%s): BSSID exists in the PMKList.\n", @@ -2368,9 +2366,10 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy, DBG_8723A("%s(%s)\n", __func__, netdev->name); for (index = 0; index < NUM_PMKID_CACHE; index++) { - if (!memcmp(psecuritypriv->PMKIDList[index].Bssid, - pmksa->bssid, ETH_ALEN)) { - /* BSSID is matched, the same AP => Remove this PMKID information and reset it. */ + if (ether_addr_equal(psecuritypriv->PMKIDList[index].Bssid, +pmksa->bssid)) { + /* BSSID is matched, the same AP => Remove this PMKID + information and reset it. */ eth_zero_addr(psecuritypriv->PMKIDList[index].Bssid); memset(psecuritypriv->PMKIDList[index].PMKID, 0x00, WLAN_PMKID_LEN); @@ -2961,7 +2960,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, list_for_each_safe(plist, ptmp, phead) { psta = container_of(plist, struct sta_info, asoc_list); - if (!memcmp(mac, psta->hwaddr, ETH_ALEN)) { + if (ether_addr_equal(mac, psta->hwaddr)) { if (psta->dot8021xalg == 1 && psta->bpairwise_key_installed == false) { DBG_8723A("%s, sta's dot8021xalg = 1 and " -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/48] staging: rtl8723au: rtw_wdev_alloc(): Don't register wiphy before kmalloc() completed
From: Jes Sorensen There is no point starting to register the wiphy and then having to unregister it again if the followon kmalloc() fails. Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 9f9f034..4528c95 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -3367,22 +3367,24 @@ int rtw_wdev_alloc(struct rtw_adapter *padapter, struct device *dev) ret = -ENOMEM; goto exit; } + + /* wdev */ + wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); + if (!wdev) { + DBG_8723A("Couldn't allocate wireless device\n"); + ret = -ENOMEM; + goto free_wiphy; + } + set_wiphy_dev(wiphy, dev); rtw_cfg80211_preinit_wiphy(padapter, wiphy); ret = wiphy_register(wiphy); if (ret < 0) { DBG_8723A("Couldn't register wiphy device\n"); - goto free_wiphy; + goto free_wdev; } - /* wdev */ - wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); - if (!wdev) { - DBG_8723A("Couldn't allocate wireless device\n"); - ret = -ENOMEM; - goto unregister_wiphy; - } wdev->wiphy = wiphy; wdev->netdev = pnetdev; /* wdev->iftype = NL80211_IFTYPE_STATION; */ @@ -3408,8 +3410,8 @@ int rtw_wdev_alloc(struct rtw_adapter *padapter, struct device *dev) pwdev_priv->power_mgmt = false; return ret; -unregister_wiphy: - wiphy_unregister(wiphy); +free_wdev: + kfree(wdev); free_wiphy: wiphy_free(wiphy); exit: -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 25/48] staging: rtl8723au: Introduce rtl8723a_BT_coexist() - and use it!
From: Jes Sorensen Signed-off-by: Jes Sorensen --- .../staging/rtl8723au/hal/rtl8723a_bt-coexist.c| 39 +- .../staging/rtl8723au/include/rtl8723a_bt_intf.h | 5 +++ 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index b28dc1a..9326e05 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -9484,7 +9484,7 @@ static void BTDM_Display8723ABtCoexInfo(struct rtw_adapter *padapter) rsprintf(btCoexDbgBuf, BT_TMP_BUF_SIZE, "\r\n [BT Coexist info]"); DCMD_Printf(btCoexDbgBuf); - if (!pHalData->bt_coexist.BluetoothCoexist) { + if (!rtl8723a_BT_coexist(padapter)) { rsprintf(btCoexDbgBuf, BT_TMP_BUF_SIZE, "\r\n BT not exists !!!"); DCMD_Printf(btCoexDbgBuf); return; @@ -9930,7 +9930,7 @@ void BTDM_CheckBTIdleChange1Ant(struct rtw_adapter *padapter) u32 BT_Active, BT_State; u32 regBTActive = 0, regBTState = 0, regBTPolling = 0; - if (!pHalData->bt_coexist.BluetoothCoexist) + if (!rtl8723a_BT_coexist(padapter)) return; if (pBtMgnt->ExtConfig.bManualControl) return; @@ -10560,7 +10560,7 @@ u8 BTDM_DisableEDCATurbo(struct rtw_adapter *padapter) pHalData = GET_HAL_DATA(padapter); pBtMgnt = &pHalData->BtInfo.BtMgnt; - if (!pHalData->bt_coexist.BluetoothCoexist) { + if (!rtl8723a_BT_coexist(padapter)) { bRet = false; pHalData->bt_coexist.lastBtEdca = 0; return bRet; @@ -10743,10 +10743,9 @@ void BTDM_CoexAllOff(struct rtw_adapter *padapter) void BTDM_TurnOffBtCoexistBeforeEnterIPS(struct rtw_adapter *padapter) { - struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); struct pwrctrl_priv *ppwrctrl = &padapter->pwrctrlpriv; - if (!pHalData->bt_coexist.BluetoothCoexist) + if (!rtl8723a_BT_coexist(padapter)) return; /* 8723 1Ant doesn't need to turn off bt coexist mechanism. */ @@ -10771,7 +10770,7 @@ void BTDM_Coexist(struct rtw_adapter *padapter) { struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); - if (!pHalData->bt_coexist.BluetoothCoexist) { + if (!rtl8723a_BT_coexist(padapter)) { RTPRINT(FBT, BT_TRACE, ("[DM][BT], BT not exists!!\n")); return; } @@ -10981,9 +10980,7 @@ void BTDM_SetBtCoexCurrAntNum(struct rtw_adapter *padapter, u8 antNum) void BTDM_ForHalt(struct rtw_adapter *padapter) { - struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); - - if (!pHalData->bt_coexist.BluetoothCoexist) + if (!rtl8723a_BT_coexist(padapter)) return; BTDM_ForHalt8723A(padapter); @@ -10992,9 +10989,7 @@ void BTDM_ForHalt(struct rtw_adapter *padapter) void BTDM_WifiScanNotify(struct rtw_adapter *padapter, u8 scanType) { - struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); - - if (!pHalData->bt_coexist.BluetoothCoexist) + if (!rtl8723a_BT_coexist(padapter)) return; BTDM_WifiScanNotify8723A(padapter, scanType); @@ -11002,9 +10997,7 @@ void BTDM_WifiScanNotify(struct rtw_adapter *padapter, u8 scanType) void BTDM_WifiAssociateNotify(struct rtw_adapter *padapter, u8 action) { - struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); - - if (!pHalData->bt_coexist.BluetoothCoexist) + if (!rtl8723a_BT_coexist(padapter)) return; BTDM_WifiAssociateNotify8723A(padapter, action); @@ -11012,9 +11005,7 @@ void BTDM_WifiAssociateNotify(struct rtw_adapter *padapter, u8 action) void BTDM_MediaStatusNotify(struct rtw_adapter *padapter, enum rt_media_status mstatus) { - struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); - - if (!pHalData->bt_coexist.BluetoothCoexist) + if (!rtl8723a_BT_coexist(padapter)) return; BTDM_MediaStatusNotify8723A(padapter, mstatus); @@ -11022,9 +11013,7 @@ void BTDM_MediaStatusNotify(struct rtw_adapter *padapter, enum rt_media_status m void BTDM_ForDhcp(struct rtw_adapter *padapter) { - struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); - - if (!pHalData->bt_coexist.BluetoothCoexist) + if (!rtl8723a_BT_coexist(padapter)) return; BTDM_ForDhcp8723A(padapter); @@ -11315,8 +11304,10 @@ void HALBT_InitBTVars8723A(struct rtw_adapter *padapter) pHalData->bt_coexist.BT_Ant_isolation = pHalData->EEPROMBluetoothAntIsolation; pHalData->bt_coexist.bt_radiosharedtype = pHalData->EEPROMBluetoothRadioShared; - RT_TRACE(_module_hal_init_c_, _drv_info_, ("BT Coexistance = 0x%x\n", pHalData->bt_co
[PATCH 38/48] staging: rtl8723au: Move rtl8723a_dual_antenna_detection() to rtl8723a_bt-coexist.c
From: Jes Sorensen Signed-off-by: Jes Sorensen --- .../staging/rtl8723au/hal/rtl8723a_bt-coexist.c| 46 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 49 -- drivers/staging/rtl8723au/hal/usb_halinit.c| 4 +- .../staging/rtl8723au/include/rtl8723a_bt_intf.h | 2 + drivers/staging/rtl8723au/include/rtl8723a_hal.h | 4 -- 5 files changed, 49 insertions(+), 56 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index 4d94b4b..48c16f4 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -11341,3 +11341,49 @@ void HALBT_SetRtsCtsNoLenLimit(struct rtw_adapter *padapter) } /* = End of sync from SD7 driver HAL/HalBT.c = */ + +void rtl8723a_dual_antenna_detection(struct rtw_adapter *padapter) +{ + struct hal_data_8723a *pHalData; + struct dm_odm_t *pDM_Odm; + struct sw_ant_sw *pDM_SWAT_Table; + u8 i; + + pHalData = GET_HAL_DATA(padapter); + pDM_Odm = &pHalData->odmpriv; + pDM_SWAT_Table = &pDM_Odm->DM_SWAT_Table; + + /* */ + /* RTL8723A Single and Dual antenna dynamic detection + mechanism when RF power state is on. */ + /* We should take power tracking, IQK, LCK, RCK RF read/write + operation into consideration. */ + /* 2011.12.15. */ + /* */ + if (!pHalData->bAntennaDetected) { + u8 btAntNum = BT_GetPGAntNum(padapter); + + /* Set default antenna B status */ + if (btAntNum == Ant_x2) + pDM_SWAT_Table->ANTB_ON = true; + else if (btAntNum == Ant_x1) + pDM_SWAT_Table->ANTB_ON = false; + else + pDM_SWAT_Table->ANTB_ON = true; + + if (pHalData->CustomerID != RT_CID_TOSHIBA) { + for (i = 0; i < MAX_ANTENNA_DETECTION_CNT; i++) { + if (ODM_SingleDualAntennaDetection + (&pHalData->odmpriv, ANTTESTALL) == true) + break; + } + + /* Set default antenna number for BT coexistence */ + if (btAntNum == Ant_x2) + BT_SetBtCoexCurrAntNum(padapter, + pDM_SWAT_Table-> + ANTB_ON ? 2 : 1); + } + pHalData->bAntennaDetected = true; + } +} diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index 20c93e4..970b585 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -2575,52 +2575,3 @@ void hw_var_set_mlme_join(struct rtw_adapter *padapter, u8 type) } #endif } - -#ifdef CONFIG_8723AU_BT_COEXIST - -void rtl8723a_SingleDualAntennaDetection(struct rtw_adapter *padapter) -{ - struct hal_data_8723a *pHalData; - struct dm_odm_t *pDM_Odm; - struct sw_ant_sw *pDM_SWAT_Table; - u8 i; - - pHalData = GET_HAL_DATA(padapter); - pDM_Odm = &pHalData->odmpriv; - pDM_SWAT_Table = &pDM_Odm->DM_SWAT_Table; - - /* */ - /* RTL8723A Single and Dual antenna dynamic detection - mechanism when RF power state is on. */ - /* We should take power tracking, IQK, LCK, RCK RF read/write - operation into consideration. */ - /* 2011.12.15. */ - /* */ - if (!pHalData->bAntennaDetected) { - u8 btAntNum = BT_GetPGAntNum(padapter); - - /* Set default antenna B status */ - if (btAntNum == Ant_x2) - pDM_SWAT_Table->ANTB_ON = true; - else if (btAntNum == Ant_x1) - pDM_SWAT_Table->ANTB_ON = false; - else - pDM_SWAT_Table->ANTB_ON = true; - - if (pHalData->CustomerID != RT_CID_TOSHIBA) { - for (i = 0; i < MAX_ANTENNA_DETECTION_CNT; i++) { - if (ODM_SingleDualAntennaDetection - (&pHalData->odmpriv, ANTTESTALL) == true) - break; - } - - /* Set default antenna number for BT coexistence */ - if (btAntNum == Ant_x2) - BT_SetBtCoexCurrAntNum(padapter, - pDM_SWAT_Table-> - ANTB_ON ? 2 : 1); - } - pHalData->bAntennaDetected = true; - } -} -#endif /* CONFIG_8723AU_BT_COEXIST */ diff --git a/drivers/staging
[PATCH 00/48] staging-next: rtl8723au: More fixes and removal of dead code
From: Jes Sorensen Hi Greg, Please find attached another round of cleanups, removal of dead code, and tidying up most of the #ifdef CONFIG_8723AU_BT_COEXIST mess. Notably patch 10 fixes an OOPS case if a user tries to add a monitor interface - monitor mode still doesn't work, but at least it doesn't wedge the kernel. This one could go for 3.15, but it's not a common use case. Cheers, Jes Jes Sorensen (48): staging: rtl8723au: ieee80211.h: Remove some unused #defines staging: rtl8723au: Use ieee80211.h defines for IV/ICV len values staging: rtl8723au: rtw_xmit.c: Use ether_addr_copy() staging: rtl8723au: Don't explicitly check check_fwstate() == true staging: rtl8723au: Make check_fwstate() return bool staging: rtl8723au: Don't check check_fwstate() == false staging: rtl8723au: Remove unused enum SCAN_RESULT_TYPE staging: rtl8723au: rtw_mlme.h: Remove a bunch of unused structs staging: rtl8723au: Remove unused struct hostapd_priv staging: rtl8723au: Do not call netdev_open23a() from cfg80211_rtw_change_iface() staging: rtl8723au: ioctl_cfg80211.c: Use ether_addr_copy() staging: rtl8723au: ioctl_cfg80211.c: Use ether_addr_equal() staging: rtl8723au: Delete unused rtw_cfg80211_set_mgnt_wpsp2pie() staging: rtl8723au: _cfg80211_rtw_mgmt_tx() clean up checking function return values staging: rtl8723au: Get rid of unused struct rtw_wdev_invit_info staging: rtl8723au: struct rtw_wdev_priv: Remove some never 'true' variables staging: rtl8723au: Remove some pointless cfg80211_* wrapper macros staging: rtl8723au: rtw_wdev_alloc(): Don't register wiphy before kmalloc() completed staging: rtl8723au: Remove unused prototype rtw_cfg80211_issue_p2p_provision_request23a() staging: rtl8723au: bInternalAutoSuspend is always false staging: rtl8723au: _rtw_pwr_wakeup23a(): Do not mix _FAIL/false as return value staging: rtl8723au: PS_RDY_CHECK() return bools in 'bool' staging: rtl8723au: Create rtl8723au_bt_intf.h staging: rtl8723au: Convert BT_IsBtDisabled() into rtl8723a_BT_enabled() staging: rtl8723au: Introduce rtl8723a_BT_coexist() - and use it! staging: rtl8723au: Remove some CONFIG_8723AU_BT_COEXIST clutter staging: rtl8723au: Rename BTDM_Coexist() to rtl8723a_BT_do_coexist() staging: rtl8723au: Rename BT_WifiScanNotify() rtl8723a_BT_wifiscan_notify() staging: rtl8723au: Rename BT_WifiMediaStatusNotify() rtl8723a_BT_mediastatus_notify() staging: rtl8723au: Rename BTDM_ForDhcp() to rtl8723a_BT_specialpacket_notify() staging: rtl8723au: Rename BT_LpsLeave() rtl8723a_BT_lps_leave() staging: rtl8723au: rtw_cmd.c: Remove last #ifdef CONFIG_8723AU_BT_COEXIST usage staging: rtl8723au: rtw_pwrctrl.c: Remove an unnecessary COEXIST #ifdef staging: rtl8723au: rtw_pwrctrl.c: Eliminate CONFIG_8723AU_BT_COEXIST #ifdefs staging: rtl8723au: rtw_mlme_ext.c: Remove CONFIG_8723AU_BT_COEXIST #ifdefs staging: rtl8723au: rtw_mlme_ext.c: Sanitize calls to alloc_mgtxmitframe23a() staging: rtl8723au: odm.c: Rename BTDM_DisableEDCATurbo() to rtl8723a_BT_disable_EDCA_turbo() staging: rtl8723au: Move rtl8723a_dual_antenna_detection() to rtl8723a_bt-coexist.c staging: rtl8723au: Rename HALBT_InitHwConfig() rtl8723a_BT_init_hwconfig() staging: rtl8723au: usb_halinit.c: Remove no-op HAL_INIT_PROFILE_TAG() staging: rtl8723au: rtl8732au_hal_init.c: Use rtl8723au_BT_coexist() to pick firmware image staging: rtl8723au: Rename BT_WifiAssociateNotify() rtl8723a_BT_wifiassociate_notify() staging: rtl8723au: Make rtl8723a_set_BTCoex_AP_mode_FwRsvdPkt_cmd() a no-op when no co-exist enabled staging: rtl8723au: Rename HALBT_InitBTVars8723A() rtl8723a_BT_init_hal_vars() staging: rtl8723au: rtl8723a_bt-coexist.c: Remove unnecessary #ifdef CONFIG_8723AU_BT_COEXIST staging: rtl8723au: Rename BTDM_FwC2hBtInfo8723A() to rtl8723a_fw_c2h_BT_info() staging: rtl8723au: Remove unused struct btdata_info staging: rtl8723au: _InitQueueReservedPage(): Remove pointless brackets drivers/staging/rtl8723au/core/rtw_cmd.c | 99 +++ drivers/staging/rtl8723au/core/rtw_ioctl_set.c | 27 +- drivers/staging/rtl8723au/core/rtw_led.c | 48 ++-- drivers/staging/rtl8723au/core/rtw_mlme.c | 6 +- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 60 ++--- drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 47 ++-- drivers/staging/rtl8723au/core/rtw_recv.c | 41 ++- drivers/staging/rtl8723au/core/rtw_xmit.c | 56 ++-- drivers/staging/rtl8723au/hal/hal_com.c| 15 +- drivers/staging/rtl8723au/hal/odm.c| 4 +- .../staging/rtl8723au/hal/rtl8723a_bt-coexist.c| 167 ++-- drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 85 ++ drivers/staging/rtl8723au/hal/usb_halinit.c| 102 +++- drivers/staging/rtl8723au/include/drv_types.h | 4 - drivers/staging/rtl8723au/i
[PATCH 40/48] staging: rtl8723au: usb_halinit.c: Remove no-op HAL_INIT_PROFILE_TAG()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/hal/usb_halinit.c | 58 - 1 file changed, 16 insertions(+), 42 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index 2fde327..2032b5e 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -616,9 +616,6 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter) unsigned long init_start_time = jiffies; -#define HAL_INIT_PROFILE_TAG(stage) do {} while (0) - - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_BEGIN); if (Adapter->pwrctrlpriv.bkeepfwalive) { _ps_open_RF23a(Adapter); @@ -650,7 +647,6 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter) ("%s: MAC has already power on\n", __func__)); } - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_PW_ON); status = _InitPowerOn(Adapter); if (status == _FAIL) { RT_TRACE(_module_hci_hal_init_c_, _drv_err_, @@ -658,7 +654,6 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter) goto exit; } - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_LLTT); if (!pregistrypriv->wifi_spec) { boundary = TX_PAGE_BOUNDARY; } else { @@ -675,11 +670,9 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter) } } - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC01); if (pHalData->bRDGEnable) _InitRDGSetting(Adapter); - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_DOWNLOAD_FW); status = rtl8723a_FirmwareDownload(Adapter); if (status != _SUCCESS) { Adapter->bFWReady = false; @@ -711,14 +704,12 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter) /* Current Channel will be updated again later. */ pHalData->CurrentChannel = 6;/* default set to 6 */ - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MAC); status = PHY_MACConfig8723A(Adapter); if (status == _FAIL) { DBG_8723A("PHY_MACConfig8723A fault !!\n"); goto exit; } - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_BB); /* */ /* d. Initialize BB related configurations. */ /* */ @@ -731,7 +722,6 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter) /* Add for tx power by rate fine tune. We need to call the function after BB config. */ /* Because the tx power by rate table is inited in BB config. */ - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_RF); status = PHY_RFConfig8723A(Adapter); if (status == _FAIL) { DBG_8723A("PHY_RFConfig8723A fault !!\n"); @@ -757,7 +747,6 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter) pHalData->RfRegChnlVal[0] = PHY_QueryRFReg(Adapter, (enum RF_RADIO_PATH)0, RF_CHNLBW, bRFRegOffsetMask); pHalData->RfRegChnlVal[1] = PHY_QueryRFReg(Adapter, (enum RF_RADIO_PATH)1, RF_CHNLBW, bRFRegOffsetMask); - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC02); if (!pHalData->bMACFuncEnable) { _InitQueueReservedPage(Adapter); _InitTxBufferBoundary(Adapter); @@ -783,14 +772,11 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter) _InitHWLed(Adapter); - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_TURN_ON_BLOCK); _BBTurnOnBlock(Adapter); /* NicIFSetMacAddress(padapter, padapter->PermanentAddress); */ - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_SECURITY); invalidate_cam_all23a(Adapter); - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC11); /* 2010/12/17 MH We need to set TX power according to EFUSE content at first. */ PHY_SetTxPowerLevel8723A(Adapter, pHalData->CurrentChannel); @@ -812,30 +798,26 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter) /* Move by Neo for USB SS from above setp */ _RfPowerSave(Adapter); - HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_IQK); - /* 2010/08/26 MH Merge from 8192CE. */ - /* sherry masked that it has been done in _RfPowerSave */ - /* 20110927 */ - /* recovery for 8192cu and 9723Au 20111017 */ - if (pwrctrlpriv->rf_pwrstate == rf_on) { - if (pHalData->bIQKInitialized) { - rtl8723a_phy_iq_calibrate(Adapter, true); - } else { - rtl8723a_phy_iq_calibrate(Adapter, false); - pHalData->bIQKInitialized = true; - } + /* 2010/08/26 MH Merge from 8192CE. */ + /* sherry masked that it has been done in _RfPowerSave */ + /* 20110927 */ + /* recovery for 8192cu and 9723Au 20111017 */ + if (pwrctrlpriv->rf_pwrstate == rf_on) { +
[PATCH 19/48] staging: rtl8723au: Remove unused prototype rtw_cfg80211_issue_p2p_provision_request23a()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/include/ioctl_cfg80211.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8723au/include/ioctl_cfg80211.h b/drivers/staging/rtl8723au/include/ioctl_cfg80211.h index 256000f..63e921f 100644 --- a/drivers/staging/rtl8723au/include/ioctl_cfg80211.h +++ b/drivers/staging/rtl8723au/include/ioctl_cfg80211.h @@ -61,8 +61,6 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter, unsigned char *da, unsigned short reason); #endif /* CONFIG_8723AU_AP_MODE */ -void rtw_cfg80211_issue_p2p_provision_request23a(struct rtw_adapter *padapter, - const u8 *buf, size_t len); void rtw_cfg80211_rx_action(struct rtw_adapter *adapter, u8 *frame, uint frame_len, const char*msg); -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 46/48] staging: rtl8723au: Rename BTDM_FwC2hBtInfo8723A() to rtl8723a_fw_c2h_BT_info()
From: Jes Sorensen In addition get rid of some pointless code obfuscating wrappers Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 9 ++--- drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 5 ++--- drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h | 2 -- drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h| 2 ++ 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index c1d54bc..c001053 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -9396,8 +9396,8 @@ static void BTDM_FwC2hBtRssi8723A(struct rtw_adapter *padapter, u8 *tmpBuf) /*RTPRINT(FBT, BT_TRACE, ("[BTC2H], BT RSSI =%d\n", percent)); */ } -static void -BTDM_FwC2hBtInfo8723A(struct rtw_adapter *padapter, u8 *tmpBuf, u8 length) +void +rtl8723a_fw_c2h_BT_info(struct rtw_adapter *padapter, u8 *tmpBuf, u8 length) { struct hal_data_8723a *pHalData; struct bt_30info *pBTInfo; @@ -10131,11 +10131,6 @@ void BTDM_FwC2hBtRssi(struct rtw_adapter *padapter, u8 *tmpBuf) BTDM_FwC2hBtRssi8723A(padapter, tmpBuf); } -void BTDM_FwC2hBtInfo(struct rtw_adapter *padapter, u8 *tmpBuf, u8 length) -{ - BTDM_FwC2hBtInfo8723A(padapter, tmpBuf, length); -} - void BTDM_DisplayBtCoexInfo(struct rtw_adapter *padapter) { BTDM_Display8723ABtCoexInfo(padapter); diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index 7798532..487629c 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -1202,12 +1202,11 @@ int c2h_handler_8723a(struct rtw_adapter *padapter, struct c2h_evt_hdr *c2h_evt) c2h_evt->payload[3], c2h_evt->payload[4])); break; -#ifdef CONFIG_8723AU_BT_COEXIST case C2H_BT_INFO: DBG_8723A("%s , Got C2H_BT_INFO \n", __func__); - BT_FwC2hBtInfo(padapter, c2h_evt->payload, c2h_evt->plen); + rtl8723a_fw_c2h_BT_info(padapter, + c2h_evt->payload, c2h_evt->plen); break; -#endif default: ret = _FAIL; diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h index 3637619..2a6a100 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h @@ -1543,8 +1543,6 @@ struct bt_coexist_str { void BTDM_CheckAntSelMode(struct rtw_adapter * padapter); void BTDM_FwC2hBtRssi(struct rtw_adapter * padapter, u8 *tmpBuf); #define BT_FwC2hBtRssi BTDM_FwC2hBtRssi -void BTDM_FwC2hBtInfo(struct rtw_adapter * padapter, u8 *tmpBuf, u8 length); -#define BT_FwC2hBtInfo BTDM_FwC2hBtInfo void BTDM_DisplayBtCoexInfo(struct rtw_adapter * padapter); #define BT_DisplayBtCoexInfo BTDM_DisplayBtCoexInfo void BTDM_RejectAPAggregatedPacket(struct rtw_adapter * padapter, u8 bReject); diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h index fdcee75..4733559 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h @@ -35,6 +35,7 @@ void rtl8723a_dual_antenna_detection(struct rtw_adapter *padapter); void rtl8723a_BT_init_hwconfig(struct rtw_adapter *padapter); void rtl8723a_BT_wifiassociate_notify(struct rtw_adapter *padapter, u8 action); void rtl8723a_BT_init_hal_vars(struct rtw_adapter *padapter); +void rtl8723a_fw_c2h_BT_info(struct rtw_adapter *padapter, u8 *tmpBuf, u8 length); #else static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) { @@ -62,6 +63,7 @@ static inline bool rtl8723a_BT_disable_EDCA_turbo(struct rtw_adapter *padapter) #define rtl8723a_BT_init_hwconfig(padapter)do {} while(0) #define rtl8723a_BT_wifiassociate_notify(padapter, action) do {} while(0) #define rtl8723a_BT_init_hal_vars(padapter)do {} while(0) +#define rtl8723a_fw_c2h_BT_info(padapter, tmpBuf, length) do {} while(0) #endif #endif -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/48] staging: rtl8723au: rtw_xmit.c: Use ether_addr_copy()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_xmit.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c b/drivers/staging/rtl8723au/core/rtw_xmit.c index 0c66d35..9060494 100644 --- a/drivers/staging/rtl8723au/core/rtw_xmit.c +++ b/drivers/staging/rtl8723au/core/rtw_xmit.c @@ -902,9 +902,9 @@ static int rtw_make_wlanhdr(struct rtw_adapter *padapter, u8 *hdr, /* Data transfer to AP */ pwlanhdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_TODS); - memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN); - memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); - memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN); + ether_addr_copy(pwlanhdr->addr1, get_bssid(pmlmepriv)); + ether_addr_copy(pwlanhdr->addr2, pattrib->src); + ether_addr_copy(pwlanhdr->addr3, pattrib->dst); if (pmlmepriv->qos_option) qos_option = true; @@ -914,18 +914,18 @@ static int rtw_make_wlanhdr(struct rtw_adapter *padapter, u8 *hdr, /* to_ds = 0, fr_ds = 1; */ pwlanhdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_FROMDS); - memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); - memcpy(pwlanhdr->addr2, get_bssid(pmlmepriv), ETH_ALEN); - memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN); + ether_addr_copy(pwlanhdr->addr1, pattrib->dst); + ether_addr_copy(pwlanhdr->addr2, get_bssid(pmlmepriv)); + ether_addr_copy(pwlanhdr->addr3, pattrib->src); if (psta->qos_option) qos_option = true; } else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) || (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) { - memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); - memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); - memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); + ether_addr_copy(pwlanhdr->addr1, pattrib->dst); + ether_addr_copy(pwlanhdr->addr2, pattrib->src); + ether_addr_copy(pwlanhdr->addr3, get_bssid(pmlmepriv)); if (psta->qos_option) qos_option = true; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/48] staging: rtl8723au: _cfg80211_rtw_mgmt_tx() clean up checking function return values
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 09e6e81..5f508ac 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -3055,7 +3055,6 @@ static int _cfg80211_rtw_mgmt_tx(struct rtw_adapter *padapter, u8 tx_ch, struct pkt_attrib *pattrib; unsigned char *pframe; int ret = _FAIL; - bool ack = true; struct ieee80211_hdr *pwlanhdr; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -3079,7 +3078,7 @@ static int _cfg80211_rtw_mgmt_tx(struct rtw_adapter *padapter, u8 tx_ch, /* starting alloc mgmt frame to dump it */ pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); - if (pmgntframe == NULL) { + if (!pmgntframe) { /* ret = -ENOMEM; */ ret = _FAIL; goto exit; @@ -3105,15 +3104,12 @@ static int _cfg80211_rtw_mgmt_tx(struct rtw_adapter *padapter, u8 tx_ch, pattrib->last_txcmdsz = pattrib->pktlen; - if (dump_mgntframe23a_and_wait_ack23a(padapter, pmgntframe) != _SUCCESS) { - ack = false; - ret = _FAIL; + ret = dump_mgntframe23a_and_wait_ack23a(padapter, pmgntframe); - DBG_8723A("%s, ack == _FAIL\n", __func__); - } else { - DBG_8723A("%s, ack =%d, ok!\n", __func__, ack); - ret = _SUCCESS; - } + if (ret != _SUCCESS) + DBG_8723A("%s, ack == false\n", __func__); + else + DBG_8723A("%s, ack == true\n", __func__); exit: -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 48/48] staging: rtl8723au: _InitQueueReservedPage(): Remove pointless brackets
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/hal/usb_halinit.c | 40 + 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index 2032b5e..6a7fb28 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -150,33 +150,29 @@ static void _InitQueueReservedPage(struct rtw_adapter *Adapter) u32 value32; u8 value8; bool bWiFiConfig = pregistrypriv->wifi_spec; - /* u32 txQPageNum, txQPageUnit, txQRemainPage; */ - { /* for WMM */ - /* RT_ASSERT((outEPNum>= 2), ("for WMM , number of out-ep " - "must more than or equal to 2!\n")); */ + /* RT_ASSERT((outEPNum>= 2), ("for WMM , number of out-ep " + "must more than or equal to 2!\n")); */ - numPubQ = bWiFiConfig ? - WMM_NORMAL_PAGE_NUM_PUBQ : NORMAL_PAGE_NUM_PUBQ; + numPubQ = bWiFiConfig ? WMM_NORMAL_PAGE_NUM_PUBQ : NORMAL_PAGE_NUM_PUBQ; - if (pHalData->OutEpQueueSel & TX_SELE_HQ) { - numHQ = bWiFiConfig ? - WMM_NORMAL_PAGE_NUM_HPQ : NORMAL_PAGE_NUM_HPQ; - } + if (pHalData->OutEpQueueSel & TX_SELE_HQ) { + numHQ = bWiFiConfig ? + WMM_NORMAL_PAGE_NUM_HPQ : NORMAL_PAGE_NUM_HPQ; + } - if (pHalData->OutEpQueueSel & TX_SELE_LQ) { - numLQ = bWiFiConfig ? - WMM_NORMAL_PAGE_NUM_LPQ : NORMAL_PAGE_NUM_LPQ; - } - /* NOTE: This step shall be proceed before - writting REG_RQPN. */ - if (pHalData->OutEpQueueSel & TX_SELE_NQ) { - numNQ = bWiFiConfig ? - WMM_NORMAL_PAGE_NUM_NPQ : NORMAL_PAGE_NUM_NPQ; - } - value8 = (u8)_NPQ(numNQ); - rtl8723au_write8(Adapter, REG_RQPN_NPQ, value8); + if (pHalData->OutEpQueueSel & TX_SELE_LQ) { + numLQ = bWiFiConfig ? + WMM_NORMAL_PAGE_NUM_LPQ : NORMAL_PAGE_NUM_LPQ; + } + /* NOTE: This step shall be proceed before + writting REG_RQPN. */ + if (pHalData->OutEpQueueSel & TX_SELE_NQ) { + numNQ = bWiFiConfig ? + WMM_NORMAL_PAGE_NUM_NPQ : NORMAL_PAGE_NUM_NPQ; } + value8 = (u8)_NPQ(numNQ); + rtl8723au_write8(Adapter, REG_RQPN_NPQ, value8); /* TX DMA */ value32 = _HPQ(numHQ) | _LPQ(numLQ) | _PUBQ(numPubQ) | LD_RQPN; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/48] staging: rtl8723au: ieee80211.h: Remove some unused #defines
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/include/ieee80211.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/staging/rtl8723au/include/ieee80211.h b/drivers/staging/rtl8723au/include/ieee80211.h index e69f1cc..69c0f5c 100644 --- a/drivers/staging/rtl8723au/include/ieee80211.h +++ b/drivers/staging/rtl8723au/include/ieee80211.h @@ -330,21 +330,11 @@ join_res: > 0: TID */ -#define DEFAULT_MAX_SCAN_AGE (15 * HZ) -#define DEFAULT_FTS 2346 #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" #define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5] -#define CFG_IEEE80211_RESERVE_FCS (1<<0) -#define CFG_IEEE80211_COMPUTE_FCS (1<<1) - #define MAXTID 16 -#define IEEE_A(1<<0) -#define IEEE_B(1<<1) -#define IEEE_G(1<<2) -#define IEEE_MODE_MASK(IEEE_A|IEEE_B|IEEE_G) - enum _PUBLIC_ACTION{ ACT_PUBLIC_BSSCOEXIST = 0, /* 20/40 BSS Coexistence */ ACT_PUBLIC_DSE_ENABLE = 1, -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 44/48] staging: rtl8723au: Rename HALBT_InitBTVars8723A() rtl8723a_BT_init_hal_vars()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +- drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 5 ++--- drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h | 3 --- drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h| 2 ++ 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index ed084d1..5aa9ea5 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -11278,7 +11278,7 @@ void HALBT_RemoveKey(struct rtw_adapter *padapter, u8 EntryNum) } } -void HALBT_InitBTVars8723A(struct rtw_adapter *padapter) +void rtl8723a_BT_init_hal_vars(struct rtw_adapter *padapter) { struct hal_data_8723a *pHalData; diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index fb364d1..7798532 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -1943,9 +1943,8 @@ Hal_EfuseParseBTCoexistInfo_8723A(struct rtw_adapter *padapter, pHalData->EEPROMBluetoothAntIsolation = 0; pHalData->EEPROMBluetoothRadioShared = BT_Radio_Shared; } -#ifdef CONFIG_8723AU_BT_COEXIST - BT_InitHalVars(padapter); -#endif + + rtl8723a_BT_init_hal_vars(padapter); } void diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h index eff4021..3637619 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h @@ -1605,9 +1605,6 @@ u8 HALBT_GetPGAntNum(struct rtw_adapter * padapter); #define BT_GetPGAntNum HALBT_GetPGAntNum void HALBT_SetKey(struct rtw_adapter * padapter, u8 EntryNum); void HALBT_RemoveKey(struct rtw_adapter * padapter, u8 EntryNum); -void HALBT_InitBTVars8723A(struct rtw_adapter * padapter); -#define HALBT_InitHalVars HALBT_InitBTVars8723A -#define BT_InitHalVars HALBT_InitHalVars u8 HALBT_IsBTExist(struct rtw_adapter * padapter); #define BT_IsBtExist HALBT_IsBTExist u8 HALBT_BTChipType(struct rtw_adapter * padapter); diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h index ff9ad3f..fdcee75 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h @@ -34,6 +34,7 @@ bool rtl8723a_BT_disable_EDCA_turbo(struct rtw_adapter *padapter); void rtl8723a_dual_antenna_detection(struct rtw_adapter *padapter); void rtl8723a_BT_init_hwconfig(struct rtw_adapter *padapter); void rtl8723a_BT_wifiassociate_notify(struct rtw_adapter *padapter, u8 action); +void rtl8723a_BT_init_hal_vars(struct rtw_adapter *padapter); #else static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) { @@ -60,6 +61,7 @@ static inline bool rtl8723a_BT_disable_EDCA_turbo(struct rtw_adapter *padapter) #define rtl8723a_dual_antenna_detection(padapter) do {} while(0) #define rtl8723a_BT_init_hwconfig(padapter)do {} while(0) #define rtl8723a_BT_wifiassociate_notify(padapter, action) do {} while(0) +#define rtl8723a_BT_init_hal_vars(padapter)do {} while(0) #endif #endif -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 28/48] staging: rtl8723au: Rename BT_WifiScanNotify() rtl8723a_BT_wifiscan_notify()
From: Jes Sorensen Providing a dummy wrapper also allows removing some more CONFIG_8723AU_BT_COEXIST clutter Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_cmd.c| 7 ++- drivers/staging/rtl8723au/hal/hal_com.c | 4 +--- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +- drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h | 1 - drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h| 2 ++ 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 986abd8..a4875ae 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -1058,11 +1058,8 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) switch (lps_ctrl_type) { case LPS_CTRL_SCAN: -#ifdef CONFIG_8723AU_BT_COEXIST - BT_WifiScanNotify(padapter, true); - if (rtl8723a_BT_using_antenna_1(padapter) == false) -#endif - { + rtl8723a_BT_wifiscan_notify(padapter, true); + if (!rtl8723a_BT_using_antenna_1(padapter)) { if (check_fwstate(pmlmepriv, _FW_LINKED)) LPS_Leave23a(padapter); } diff --git a/drivers/staging/rtl8723au/hal/hal_com.c b/drivers/staging/rtl8723au/hal/hal_com.c index 09e888a..9fba049 100644 --- a/drivers/staging/rtl8723au/hal/hal_com.c +++ b/drivers/staging/rtl8723au/hal/hal_com.c @@ -581,9 +581,7 @@ void rtl8723a_mlme_sitesurvey(struct rtw_adapter *padapter, u8 flag) rtl8723au_write32(padapter, REG_RCR, v32); } -#ifdef CONFIG_8723AU_BT_COEXIST - BT_WifiScanNotify(padapter, flag ? true : false); -#endif + rtl8723a_BT_wifiscan_notify(padapter, flag ? true : false); } void rtl8723a_on_rcr_am(struct rtw_adapter *padapter) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index ab34b2b..5efdbfa 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -138,7 +138,7 @@ void BT_SignalCompensation(struct rtw_adapter *padapter, u8 *rssi_wifi, u8 *rssi BTDM_SignalCompensation(padapter, rssi_wifi, rssi_bt); } -void BT_WifiScanNotify(struct rtw_adapter *padapter, u8 scanType) +void rtl8723a_BT_wifiscan_notify(struct rtw_adapter *padapter, u8 scanType) { BTHCI_WifiScanNotify(padapter, scanType); BTDM_CheckAntSelMode(padapter); diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h index db25b72..aacbe39 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h @@ -31,7 +31,6 @@ enum rt_media_status { void BT_SignalCompensation(struct rtw_adapter *padapter, u8 *rssi_wifi, u8 *rssi_bt); -void BT_WifiScanNotify(struct rtw_adapter *padapter, u8 scanType); void BT_WifiAssociateNotify(struct rtw_adapter *padapter, u8 action); void BT_WifiMediaStatusNotify(struct rtw_adapter *padapter, enum rt_media_status mstatus); diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h index 3e7bdde..b198cf0 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h @@ -23,6 +23,7 @@ bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter); bool rtl8723a_BT_enabled(struct rtw_adapter *padapter); bool rtl8723a_BT_coexist(struct rtw_adapter *padapter); void rtl8723a_BT_do_coexist(struct rtw_adapter *padapter); +void rtl8723a_BT_wifiscan_notify(struct rtw_adapter *padapter, u8 scanType); #else static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) { @@ -37,6 +38,7 @@ static inline bool rtl8723a_BT_coexist(struct rtw_adapter *padapter) return false; } #define rtl8723a_BT_do_coexist(padapter) do {} while(0) +#define rtl8723a_BT_wifiscan_notify(padapter, scanType)do {} while(0) #endif #endif -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/48] staging: rtl8723au: Get rid of unused struct rtw_wdev_invit_info
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/include/ioctl_cfg80211.h | 19 --- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 1 - 2 files changed, 20 deletions(-) diff --git a/drivers/staging/rtl8723au/include/ioctl_cfg80211.h b/drivers/staging/rtl8723au/include/ioctl_cfg80211.h index d0d6bbc..5fc710b 100644 --- a/drivers/staging/rtl8723au/include/ioctl_cfg80211.h +++ b/drivers/staging/rtl8723au/include/ioctl_cfg80211.h @@ -15,23 +15,6 @@ #ifndef __IOCTL_CFG80211_H__ #define __IOCTL_CFG80211_H__ -struct rtw_wdev_invit_info { - u8 token; - u8 flags; - u8 status; - u8 req_op_ch; - u8 rsp_op_ch; -}; - -#define rtw_wdev_invit_info_init(invit_info) \ - do { \ - (invit_info)->token = 0; \ - (invit_info)->flags = 0x00; \ - (invit_info)->status = 0xff; \ - (invit_info)->req_op_ch = 0; \ - (invit_info)->rsp_op_ch = 0; \ - } while (0) - struct rtw_wdev_priv { struct wireless_dev *rtw_wdev; @@ -47,8 +30,6 @@ struct rtw_wdev_priv { u8 provdisc_req_issued; - struct rtw_wdev_invit_info invit_info; - bool block; bool power_mgmt; }; diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 5f508ac..6b9bf16 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -3407,7 +3407,6 @@ int rtw_wdev_alloc(struct rtw_adapter *padapter, struct device *dev) pwdev_priv->p2p_enabled = false; pwdev_priv->provdisc_req_issued = false; - rtw_wdev_invit_info_init(&pwdev_priv->invit_info); if (padapter->registrypriv.power_mgnt != PS_MODE_ACTIVE) pwdev_priv->power_mgmt = true; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 42/48] staging: rtl8723au: Rename BT_WifiAssociateNotify() rtl8723a_BT_wifiassociate_notify()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +- drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 6 ++ drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h | 2 -- drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h| 2 ++ 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index 3050607..ed084d1 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -145,7 +145,7 @@ void rtl8723a_BT_wifiscan_notify(struct rtw_adapter *padapter, u8 scanType) BTDM_WifiScanNotify(padapter, scanType); } -void BT_WifiAssociateNotify(struct rtw_adapter *padapter, u8 action) +void rtl8723a_BT_wifiassociate_notify(struct rtw_adapter *padapter, u8 action) { /* action : */ /* true = associate start */ diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index dc97885..f13a21c 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -2558,20 +2558,18 @@ void hw_var_set_mlme_join(struct rtw_adapter *padapter, u8 type) RetryLimit << RETRY_LIMIT_SHORT_SHIFT | RetryLimit << RETRY_LIMIT_LONG_SHIFT); -#ifdef CONFIG_8723AU_BT_COEXIST switch (type) { case 0: /* prepare to join */ - BT_WifiAssociateNotify(padapter, true); + rtl8723a_BT_wifiassociate_notify(padapter, true); break; case 1: /* joinbss_event callback when join res < 0 */ - BT_WifiAssociateNotify(padapter, false); + rtl8723a_BT_wifiassociate_notify(padapter, false); break; case 2: /* sta add event callback */ /* BT_WifiMediaStatusNotify(padapter, RT_MEDIA_CONNECT); */ break; } -#endif } diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h index 8ab56d8..eff4021 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h @@ -31,8 +31,6 @@ enum rt_media_status { void BT_SignalCompensation(struct rtw_adapter *padapter, u8 *rssi_wifi, u8 *rssi_bt); -void BT_WifiAssociateNotify(struct rtw_adapter *padapter, u8 action); -void BT_SpecialPacketNotify(struct rtw_adapter * padapter); void BT_HaltProcess(struct rtw_adapter * padapter); void BT_LpsLeave(struct rtw_adapter * padapter); diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h index 98bea65..ff9ad3f 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h @@ -33,6 +33,7 @@ void rtl8723a_BT_disable_coexist(struct rtw_adapter *padapter); bool rtl8723a_BT_disable_EDCA_turbo(struct rtw_adapter *padapter); void rtl8723a_dual_antenna_detection(struct rtw_adapter *padapter); void rtl8723a_BT_init_hwconfig(struct rtw_adapter *padapter); +void rtl8723a_BT_wifiassociate_notify(struct rtw_adapter *padapter, u8 action); #else static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) { @@ -58,6 +59,7 @@ static inline bool rtl8723a_BT_disable_EDCA_turbo(struct rtw_adapter *padapter) } #define rtl8723a_dual_antenna_detection(padapter) do {} while(0) #define rtl8723a_BT_init_hwconfig(padapter)do {} while(0) +#define rtl8723a_BT_wifiassociate_notify(padapter, action) do {} while(0) #endif #endif -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 34/48] staging: rtl8723au: rtw_pwrctrl.c: Eliminate CONFIG_8723AU_BT_COEXIST #ifdefs
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 9 +++-- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +- drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h | 2 ++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c index ef9b468..dbd01b6 100644 --- a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c @@ -20,9 +20,7 @@ #include #include -#ifdef CONFIG_8723AU_BT_COEXIST -#include -#endif +#include #include void ips_enter23a(struct rtw_adapter * padapter) @@ -38,9 +36,8 @@ void ips_enter23a(struct rtw_adapter * padapter) pwrpriv->ips_enter23a_cnts++; DBG_8723A("==>ips_enter23a cnts:%d\n", pwrpriv->ips_enter23a_cnts); -#ifdef CONFIG_8723AU_BT_COEXIST - BTDM_TurnOffBtCoexistBeforeEnterIPS(padapter); -#endif + rtl8723a_BT_disable_coexist(padapter); + if (pwrpriv->change_rfpwrstate == rf_off) { pwrpriv->bpower_saving = true; DBG_8723A_LEVEL(_drv_always_, "nolinked power save enter\n"); diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index 9891a2f..b746b08 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -10726,7 +10726,7 @@ void BTDM_CoexAllOff(struct rtw_adapter *padapter) BTDM_HWCoexAllOff(padapter); } -void BTDM_TurnOffBtCoexistBeforeEnterIPS(struct rtw_adapter *padapter) +void rtl8723a_BT_disable_coexist(struct rtw_adapter *padapter) { struct pwrctrl_priv *ppwrctrl = &padapter->pwrctrlpriv; diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h index 1b2845e..b632889 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h @@ -29,6 +29,7 @@ void rtl8723a_BT_mediastatus_notify(struct rtw_adapter *padapter, enum rt_media_status mstatus); void rtl8723a_BT_specialpacket_notify(struct rtw_adapter *padapter); void rtl8723a_BT_lps_leave(struct rtw_adapter *padapter); +void rtl8723a_BT_disable_coexist(struct rtw_adapter *padapter); #else static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) { @@ -47,6 +48,7 @@ static inline bool rtl8723a_BT_coexist(struct rtw_adapter *padapter) #define rtl8723a_BT_mediastatus_notify(padapter, mstatus) do {} while(0) #define rtl8723a_BT_specialpacket_notify(padapter) do {} while(0) #define rtl8723a_BT_lps_leave(padapter)do {} while(0) +#define rtl8723a_BT_disable_coexist(padapter) do {} while(0) #endif #endif -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 43/48] staging: rtl8723au: Make rtl8723a_set_BTCoex_AP_mode_FwRsvdPkt_cmd() a no-op when no co-exist enabled
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2 -- drivers/staging/rtl8723au/include/rtl8723a_cmd.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index f13a21c..fb364d1 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -2395,10 +2395,8 @@ void hw_var_set_opmode(struct rtw_adapter *padapter, u8 mode) val8 = DIS_TSF_UDT | EN_BCN_FUNCTION | DIS_BCNQ_SUB; SetBcnCtrlReg23a(padapter, val8, ~val8); } else if (mode == _HW_STATE_AP_) { -#ifdef CONFIG_8723AU_BT_COEXIST /* add NULL Data and BT NULL Data Packets to FW RSVD Page */ rtl8723a_set_BTCoex_AP_mode_FwRsvdPkt_cmd(padapter); -#endif ResumeTxBeacon(padapter); diff --git a/drivers/staging/rtl8723au/include/rtl8723a_cmd.h b/drivers/staging/rtl8723au/include/rtl8723a_cmd.h index 3a15c9e..900bacc 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_cmd.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_cmd.h @@ -146,6 +146,8 @@ void rtl8723a_set_FwPwrMode_cmd(struct rtw_adapter *padapter, u8 Mode); void rtl8723a_set_FwJoinBssReport_cmd(struct rtw_adapter *padapter, u8 mstatus); #ifdef CONFIG_8723AU_BT_COEXIST void rtl8723a_set_BTCoex_AP_mode_FwRsvdPkt_cmd(struct rtw_adapter *padapter); +#else +#define rtl8723a_set_BTCoex_AP_mode_FwRsvdPkt_cmd(padapter) do {} while(0) #endif int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u8 *param); int rtl8723a_set_raid_cmd(struct rtw_adapter *padapter, u32 mask, u8 arg); -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 29/48] staging: rtl8723au: Rename BT_WifiMediaStatusNotify() rtl8723a_BT_mediastatus_notify()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_cmd.c| 12 +++- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 8 ++-- drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h | 2 -- drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h| 4 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index a4875ae..c89a19c 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -1072,19 +1072,13 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) /* Reset LPS Setting */ padapter->pwrctrlpriv.LpsIdleCount = 0; rtl8723a_set_FwJoinBssReport_cmd(padapter, 1); -#ifdef CONFIG_8723AU_BT_COEXIST - BT_WifiMediaStatusNotify(padapter, mstatus); -#endif + rtl8723a_BT_mediastatus_notify(padapter, mstatus); break; case LPS_CTRL_DISCONNECT: mstatus = 0;/* disconnect */ -#ifdef CONFIG_8723AU_BT_COEXIST - BT_WifiMediaStatusNotify(padapter, mstatus); - if (rtl8723a_BT_using_antenna_1(padapter) == false) -#endif - { + rtl8723a_BT_mediastatus_notify(padapter, mstatus); + if (!rtl8723a_BT_using_antenna_1(padapter)) LPS_Leave23a(padapter); - } rtl8723a_set_FwJoinBssReport_cmd(padapter, 0); break; case LPS_CTRL_SPECIAL_PACKET: diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index 5efdbfa..dbaa7c4 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -156,11 +156,6 @@ void BT_WifiAssociateNotify(struct rtw_adapter *padapter, u8 action) BTDM_WifiAssociateNotify(padapter, action); } -void BT_WifiMediaStatusNotify(struct rtw_adapter *padapter, enum rt_media_status mstatus) -{ - BTDM_MediaStatusNotify(padapter, mstatus); -} - void BT_SpecialPacketNotify(struct rtw_adapter *padapter) { BTDM_ForDhcp(padapter); @@ -11003,7 +10998,8 @@ void BTDM_WifiAssociateNotify(struct rtw_adapter *padapter, u8 action) BTDM_WifiAssociateNotify8723A(padapter, action); } -void BTDM_MediaStatusNotify(struct rtw_adapter *padapter, enum rt_media_status mstatus) +void rtl8723a_BT_mediastatus_notify(struct rtw_adapter *padapter, + enum rt_media_status mstatus) { if (!rtl8723a_BT_coexist(padapter)) return; diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h index aacbe39..46e2904 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h @@ -32,8 +32,6 @@ enum rt_media_status { void BT_SignalCompensation(struct rtw_adapter *padapter, u8 *rssi_wifi, u8 *rssi_bt); void BT_WifiAssociateNotify(struct rtw_adapter *padapter, u8 action); -void BT_WifiMediaStatusNotify(struct rtw_adapter *padapter, - enum rt_media_status mstatus); void BT_SpecialPacketNotify(struct rtw_adapter * padapter); void BT_HaltProcess(struct rtw_adapter * padapter); void BT_LpsLeave(struct rtw_adapter * padapter); diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h index b198cf0..7ef59a2 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h @@ -19,11 +19,14 @@ #include #ifdef CONFIG_8723AU_BT_COEXIST +enum rt_media_status; bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter); bool rtl8723a_BT_enabled(struct rtw_adapter *padapter); bool rtl8723a_BT_coexist(struct rtw_adapter *padapter); void rtl8723a_BT_do_coexist(struct rtw_adapter *padapter); void rtl8723a_BT_wifiscan_notify(struct rtw_adapter *padapter, u8 scanType); +void rtl8723a_BT_mediastatus_notify(struct rtw_adapter *padapter, + enum rt_media_status mstatus); #else static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) { @@ -39,6 +42,7 @@ static inline bool rtl8723a_BT_coexist(struct rtw_adapter *padapter) } #define rtl8723a_BT_do_coexist(padapter) do {} while(0) #define rtl8723a_BT_wifiscan_notify(padapter, scanType)do {} while(0) +#define rtl8723a_BT_mediastatus_notify(padapter, mstatus) do {} while(0) #endif #endif -- 1.9.3 ___ devel maili
[PATCH 08/48] staging: rtl8723au: rtw_mlme.h: Remove a bunch of unused structs
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/include/rtw_mlme.h | 63 1 file changed, 63 deletions(-) diff --git a/drivers/staging/rtl8723au/include/rtw_mlme.h b/drivers/staging/rtl8723au/include/rtw_mlme.h index 129c524..d601c55 100644 --- a/drivers/staging/rtl8723au/include/rtw_mlme.h +++ b/drivers/staging/rtl8723au/include/rtw_mlme.h @@ -97,16 +97,6 @@ To avoid possible dead lock, any thread trying to modifiying mlme_priv SHALL not lock up more than one locks at a time! */ -#define traffic_threshold 10 -#definetraffic_scan_period 500 - -struct sitesurvey_ctrl { - u64 last_tx_pkts; - uintlast_rx_pkts; - int traffic_busy; - struct timer_list sitesurvey_ctrl_timer; -}; - struct rt_link_detect { u32 NumTxOkInPeriod; u32 NumRxOkInPeriod; @@ -119,59 +109,6 @@ struct rt_link_detect { boolbHigherBusyTxTraffic; /* We may disable Tx interrupt according as Tx traffic. */ }; -struct profile_info { - u8 ssidlen; - u8 ssid[IEEE80211_MAX_SSID_LEN]; - u8 peermac[ETH_ALEN]; -}; - -struct tx_invite_req_info { - u8 token; - u8 benable; - u8 go_ssid[IEEE80211_MAX_SSID_LEN]; - u8 ssidlen; - u8 go_bssid[ETH_ALEN]; - u8 peer_macaddr[ETH_ALEN]; - u8 operating_ch; /* This information will be set by using the p2p_set op_ch = x */ - u8 peer_ch;/* The listen channel for peer P2P device */ - -}; - -struct tx_invite_resp_info { - u8 token; /* Used to record the dialog token of p2p invitation request frame. */ -}; - -struct tx_provdisc_req_info { - u16 wps_config_method_request; /* Used when sending the provisioning request frame */ - u16 peer_channel_num[2];/* The channel number which the receiver stands. */ - struct cfg80211_ssid ssid; - u8 peerDevAddr[ETH_ALEN]; /* Peer device address */ - u8 peerIFAddr[ETH_ALEN]; /* Peer interface address */ - u8 benable;/* This provision discovery request frame is trigger to send or not */ -}; - -struct rx_provdisc_req_info { /* When peer device issue prov_disc_req first, we should store the following informations */ - u8 peerDevAddr[ETH_ALEN]; /* Peer device address */ - u8 strconfig_method_desc_of_prov_disc_req[4]; /* description for the config method located in the provisioning discovery request frame. */ - /* The UI must know this information to know which config method the remote p2p device is requiring. */ -}; - -struct tx_nego_req_info { - u16 peer_channel_num[2];/* The channel number which the receiver stands. */ - u8 peerDevAddr[ETH_ALEN];/* Peer device address */ - u8 benable;/* This negoitation request frame is trigger to send or not */ -}; - -struct group_id_info { - u8 go_device_addr[ETH_ALEN]; /*The GO's device address of P2P group */ - u8 ssid[IEEE80211_MAX_SSID_LEN]; /* The SSID of this P2P group */ -}; - -struct scan_limit_info { - u8 scan_op_ch_only;/* When this flag is set, the driver should just scan the operation channel */ - u8 operation_ch[2];/* Store the operation channel of invitation request frame */ -}; - struct mlme_priv { spinlock_t lock; int fw_state; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/48] staging: rtl8723au: Remove some pointless cfg80211_* wrapper macros
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/include/ioctl_cfg80211.h | 19 --- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 15 --- 2 files changed, 8 insertions(+), 26 deletions(-) diff --git a/drivers/staging/rtl8723au/include/ioctl_cfg80211.h b/drivers/staging/rtl8723au/include/ioctl_cfg80211.h index e1eaf9c..256000f 100644 --- a/drivers/staging/rtl8723au/include/ioctl_cfg80211.h +++ b/drivers/staging/rtl8723au/include/ioctl_cfg80211.h @@ -68,23 +68,4 @@ void rtw_cfg80211_rx_action(struct rtw_adapter *adapter, u8 *frame, bool rtw_cfg80211_pwr_mgmt(struct rtw_adapter *adapter); -#define rtw_cfg80211_rx_mgmt(adapter, freq, sig_dbm, buf, len, gfp)\ - cfg80211_rx_mgmt((adapter)->rtw_wdev, freq, sig_dbm, buf, len, 0, gfp) - -#define rtw_cfg80211_send_rx_assoc(adapter, bss, buf, len) \ - cfg80211_send_rx_assoc((adapter)->pnetdev, bss, buf, len) - -#define rtw_cfg80211_mgmt_tx_status(adapter, cookie, buf, len, ack, gfp) \ - cfg80211_mgmt_tx_status((adapter)->rtw_wdev, cookie, buf, \ - len, ack, gfp) - -#define rtw_cfg80211_ready_on_channel(adapter, cookie, chan, \ - channel_type, duration, gfp) \ - cfg80211_ready_on_channel((adapter)->rtw_wdev, cookie, chan,\ - duration, gfp) -#define rtw_cfg80211_remain_on_channel_expired(adapter, cookie, chan, \ - chan_type, gfp) \ - cfg80211_remain_on_channel_expired((adapter)->rtw_wdev, \ - cookie, chan, gfp) - #endif /* __IOCTL_CFG80211_H__ */ diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 017ea44..9f9f034 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -2433,8 +2433,8 @@ void rtw_cfg80211_indicate_sta_assoc(struct rtw_adapter *padapter, freq = ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ); - rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, -GFP_ATOMIC); + cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, pmgmt_frame, frame_len, +0, GFP_ATOMIC); #endif /* defined(RTW_USE_CFG80211_STA_EVENT) */ } @@ -2489,8 +2489,8 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter, WLAN_REASON_PREV_AUTH_NOT_VALID, (unsigned char *)&reason, &frame_len); - rtw_cfg80211_rx_mgmt(padapter, freq, 0, mgmt_buf, frame_len, -GFP_ATOMIC); + cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, mgmt_buf, frame_len, +0, GFP_ATOMIC); #endif /* defined(RTW_USE_CFG80211_STA_EVENT) */ } @@ -3039,7 +3039,8 @@ void rtw_cfg80211_rx_action(struct rtw_adapter *adapter, u8 *frame, freq = ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ); - rtw_cfg80211_rx_mgmt(adapter, freq, 0, frame, frame_len, GFP_ATOMIC); + cfg80211_rx_mgmt(adapter->rtw_wdev, freq, 0, frame, frame_len, +0, GFP_ATOMIC); } static int _cfg80211_rtw_mgmt_tx(struct rtw_adapter *padapter, u8 tx_ch, @@ -3141,8 +3142,8 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, padapter->pnetdev->name, len, tx_ch); /* indicate ack before issue frame to avoid racing with rsp frame */ - rtw_cfg80211_mgmt_tx_status(padapter, *cookie, buf, len, ack, - GFP_KERNEL); + cfg80211_mgmt_tx_status(padapter->rtw_wdev, *cookie, buf, len, ack, + GFP_KERNEL); DBG_8723A("RTW_Tx:tx_ch =%d, da =" MAC_FMT "\n", tx_ch, MAC_ARG(hdr->da)); -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 32/48] staging: rtl8723au: rtw_cmd.c: Remove last #ifdef CONFIG_8723AU_BT_COEXIST usage
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_cmd.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 646b59b..1696cb8 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -21,10 +21,6 @@ #include #include -#ifdef CONFIG_8723AU_BT_COEXIST -#include -#endif /* CONFIG_8723AU_BT_COEXIST */ - static struct cmd_hdl wlancmds[] = { GEN_DRV_CMD_HANDLER(0, NULL) /*0*/ GEN_DRV_CMD_HANDLER(0, NULL) @@ -950,25 +946,19 @@ static void traffic_status_watchdog(struct rtw_adapter *padapter) u8 bHigherBusyTraffic = false, bHigherBusyRxTraffic = false; u8 bHigherBusyTxTraffic = false; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -#ifndef CONFIG_8723AU_BT_COEXIST int BusyThreshold = 100; -#endif /* */ /* Determine if our traffic is busy now */ /* */ if (check_fwstate(pmlmepriv, _FW_LINKED)) { -#ifdef CONFIG_8723AU_BT_COEXIST - if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 50 || - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 50) -#else /* !CONFIG_8723AU_BT_COEXIST */ + if (rtl8723a_BT_coexist(padapter)) + BusyThreshold = 50; + else if (pmlmepriv->LinkDetectInfo.bBusyTraffic) + BusyThreshold = 75; /* if we raise bBusyTraffic in last watchdog, using lower threshold. */ - if (pmlmepriv->LinkDetectInfo.bBusyTraffic) - BusyThreshold = 75; if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > BusyThreshold || - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) -#endif /* !CONFIG_8723AU_BT_COEXIST */ - { + pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) { bBusyTraffic = true; if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/48] staging: rtl8723au: Make check_fwstate() return bool
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/include/rtw_mlme.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723au/include/rtw_mlme.h b/drivers/staging/rtl8723au/include/rtw_mlme.h index 1bb9e6c..1aafa26 100644 --- a/drivers/staging/rtl8723au/include/rtw_mlme.h +++ b/drivers/staging/rtl8723au/include/rtw_mlme.h @@ -332,7 +332,7 @@ static inline u8 *get_bssid(struct mlme_priv *pmlmepriv) return pmlmepriv->cur_network.network.MacAddress; } -static inline int check_fwstate(struct mlme_priv *pmlmepriv, int state) +static inline bool check_fwstate(struct mlme_priv *pmlmepriv, int state) { if (pmlmepriv->fw_state & state) return true; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/48] staging: rtl8723au: Don't explicitly check check_fwstate() == true
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_cmd.c | 12 +- drivers/staging/rtl8723au/core/rtw_ioctl_set.c | 24 +--- drivers/staging/rtl8723au/core/rtw_led.c | 31 +- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 8 +++ drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 12 +- drivers/staging/rtl8723au/core/rtw_recv.c | 26 ++--- drivers/staging/rtl8723au/core/rtw_xmit.c | 22 -- 7 files changed, 63 insertions(+), 72 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index bf9e562..1768a94 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -349,7 +349,7 @@ int rtw_sitesurvey_cmd23a(struct rtw_adapter *padapter, struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - if (check_fwstate(pmlmepriv, _FW_LINKED) == true) + if (check_fwstate(pmlmepriv, _FW_LINKED)) rtw_lps_ctrl_wk_cmd23a(padapter, LPS_CTRL_SCAN, 1); ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); @@ -1030,7 +1030,7 @@ static void dynamic_chk_wk_hdl(struct rtw_adapter *padapter, u8 *pbuf, int sz) pmlmepriv = &padapter->mlmepriv; #ifdef CONFIG_8723AU_AP_MODE - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) expire_timeout_chk23a(padapter); #endif @@ -1055,8 +1055,8 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; u8 mstatus; - if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) || - (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)) + if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) || + check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) return; switch (lps_ctrl_type) @@ -1597,8 +1597,8 @@ void rtw_setassocsta_cmdrsp_callback23a(struct rtw_adapter *padapter, spin_lock_bh(&pmlmepriv->lock); - if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) && - (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)) + if (check_fwstate(pmlmepriv, WIFI_MP_STATE) && + check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); set_fwstate(pmlmepriv, _FW_LINKED); diff --git a/drivers/staging/rtl8723au/core/rtw_ioctl_set.c b/drivers/staging/rtl8723au/core/rtw_ioctl_set.c index f65443c..ff740af 100644 --- a/drivers/staging/rtl8723au/core/rtw_ioctl_set.c +++ b/drivers/staging/rtl8723au/core/rtw_ioctl_set.c @@ -82,7 +82,7 @@ int rtw_do_join23a(struct rtw_adapter *padapter) mod_timer(&pmlmepriv->assoc_timer, jiffies + msecs_to_jiffies(MAX_JOIN_TIMEOUT)); } else { - if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) { + if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) { struct wlan_bssid_ex *pdev_network; /* submit createbss_cmd to change to a ADHOC_MASTER */ @@ -175,14 +175,12 @@ int rtw_set_802_11_ssid23a(struct rtw_adapter* padapter, spin_lock_bh(&pmlmepriv->lock); DBG_8723A("Set SSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv)); - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) { + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) goto handle_tkip_countermeasure; - } else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) { + else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) goto release_mlme_lock; - } - if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) - { + if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE)) { RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("set_ssid: _FW_LINKED||WIFI_ADHOC_MASTER_STATE\n")); @@ -200,12 +198,12 @@ int rtw_set_802_11_ssid23a(struct rtw_adapter* padapter, /* if in WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE, create bss or rejoin again */ rtw_disassoc_cmd23a(padapter, 0, true); - if (check_fwstate(pmlmepriv, _FW_LINKED) == true) + if (check_fwstate(pmlmepriv, _FW_LINKED)) rtw_indicate_disconnect23a(padapter); rtw_free_assoc_resources23a(padapter, 1); - if (check_fwstate(pmlmepriv, WIFI_A
[PATCH 06/48] staging: rtl8723au: Don't check check_fwstate() == false
From: Jes Sorensen In addition, remove a followon check for false just after having checked for true. Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_ioctl_set.c | 3 +-- drivers/staging/rtl8723au/core/rtw_led.c | 17 ++--- drivers/staging/rtl8723au/core/rtw_mlme.c | 6 +++--- drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 2 +- drivers/staging/rtl8723au/core/rtw_recv.c | 3 +-- drivers/staging/rtl8723au/core/rtw_xmit.c | 4 ++-- 6 files changed, 14 insertions(+), 21 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_ioctl_set.c b/drivers/staging/rtl8723au/core/rtw_ioctl_set.c index ff740af..cf897c7 100644 --- a/drivers/staging/rtl8723au/core/rtw_ioctl_set.c +++ b/drivers/staging/rtl8723au/core/rtw_ioctl_set.c @@ -187,8 +187,7 @@ int rtw_set_802_11_ssid23a(struct rtw_adapter* padapter, if ((pmlmepriv->assoc_ssid.ssid_len == ssid->ssid_len) && !memcmp(&pmlmepriv->assoc_ssid.ssid, ssid->ssid, ssid->ssid_len)) { - if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false)) - { + if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("Set SSID is the same ssid, fw_state = 0x%08x\n", get_fwstate(pmlmepriv))); diff --git a/drivers/staging/rtl8723au/core/rtw_led.c b/drivers/staging/rtl8723au/core/rtw_led.c index c433768..e21a42c5 100644 --- a/drivers/staging/rtl8723au/core/rtw_led.c +++ b/drivers/staging/rtl8723au/core/rtw_led.c @@ -234,7 +234,7 @@ static void SwLedBlink1(struct led_8723a *pLed) pLed->BlinkingLedState = RTW_LED_ON; delay = LED_BLINK_LINK_INTERVAL_ALPHA; RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState)); - } else if (check_fwstate(pmlmepriv, _FW_LINKED) == false) { + } else { pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) @@ -267,8 +267,7 @@ static void SwLedBlink1(struct led_8723a *pLed) pLed->BlinkingLedState = RTW_LED_ON; delay = LED_BLINK_LINK_INTERVAL_ALPHA; RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState)); - } else if (check_fwstate(pmlmepriv, -_FW_LINKED) == false) { + } else { pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) @@ -354,7 +353,7 @@ static void SwLedBlink2(struct led_8723a *pLed) RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("stop scan blink CurrLedState %d\n", pLed->CurrLedState)); - } else if (!check_fwstate(pmlmepriv, _FW_LINKED)) { + } else { pLed->CurrLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF; SwLedOff23a(padapter, pLed); @@ -390,7 +389,7 @@ static void SwLedBlink2(struct led_8723a *pLed) RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("stop CurrLedState %d\n", pLed->CurrLedState)); - } else if (!check_fwstate(pmlmepriv, _FW_LINKED)) { + } else { pLed->CurrLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF; SwLedOff23a(padapter, pLed); @@ -457,9 +456,7 @@ static void SwLedBlink3(struct led_8723a *pLed) SwLedOn23a(padapter, pLed); RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState)); - } - else if (check_fwstate(pmlmepriv, _FW_LINKED) == false) - { + } else { pLed->CurrLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF; if (pLed->bLedOn) @@ -507,9 +504,7 @@ static void SwLedBlink3(struct led_8723a *pLed)
[PATCH 13/48] staging: rtl8723au: Delete unused rtw_cfg80211_set_mgnt_wpsp2pie()
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/include/ioctl_cfg80211.h | 3 - drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 166 - 2 files changed, 169 deletions(-) diff --git a/drivers/staging/rtl8723au/include/ioctl_cfg80211.h b/drivers/staging/rtl8723au/include/ioctl_cfg80211.h index ed91ba0..d0d6bbc 100644 --- a/drivers/staging/rtl8723au/include/ioctl_cfg80211.h +++ b/drivers/staging/rtl8723au/include/ioctl_cfg80211.h @@ -88,9 +88,6 @@ void rtw_cfg80211_issue_p2p_provision_request23a(struct rtw_adapter *padapter, void rtw_cfg80211_rx_action(struct rtw_adapter *adapter, u8 *frame, uint frame_len, const char*msg); -int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, char *buf, int len, - int type); - bool rtw_cfg80211_pwr_mgmt(struct rtw_adapter *adapter); #define rtw_cfg80211_rx_mgmt(adapter, freq, sig_dbm, buf, len, gfp)\ diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index b16a416..09e6e81 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -3189,172 +3189,6 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, return; } -static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf, - int len) -{ - int ret = 0; - uint wps_ielen = 0; - u8 *wps_ie; -#ifdef CONFIG_8723AU_AP_MODE - u8 wps_oui[8] = { 0x0, 0x50, 0xf2, 0x04 }; -#endif - struct rtw_adapter *padapter = netdev_priv(ndev); - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - - DBG_8723A("%s(%s): ielen =%d\n", __func__, ndev->name, len); - - if (len > 0) { - wps_ie = rtw_get_wps_ie23a(buf, len, NULL, &wps_ielen); - if (wps_ie) { - DBG_8723A("bcn_wps_ielen =%d\n", wps_ielen); - - if (pmlmepriv->wps_beacon_ie) { - pmlmepriv->wps_beacon_ie_len = 0; - kfree(pmlmepriv->wps_beacon_ie); - pmlmepriv->wps_beacon_ie = NULL; - } - - pmlmepriv->wps_beacon_ie = kmemdup(wps_ie, wps_ielen, - GFP_KERNEL); - if (pmlmepriv->wps_beacon_ie == NULL) { - DBG_8723A("%s()-%d: kmalloc() ERROR!\n", - __func__, __LINE__); - return -EINVAL; - } - pmlmepriv->wps_beacon_ie_len = wps_ielen; - -#ifdef CONFIG_8723AU_AP_MODE - update_beacon23a(padapter, WLAN_EID_VENDOR_SPECIFIC, -wps_oui, true); -#endif - } - - pmlmeext->bstart_bss = true; - - } - - return ret; -} - -static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, - char *buf, int len) -{ - struct rtw_adapter *padapter = netdev_priv(net); - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - int ret = 0; - uint wps_ielen = 0; - u8 *wps_ie; - - if (len > 0) { - wps_ie = rtw_get_wps_ie23a(buf, len, NULL, &wps_ielen); - if (wps_ie) { - uint attr_contentlen = 0; - u16 uconfig_method, *puconfig_method = NULL; - - if (pmlmepriv->wps_probe_resp_ie) { - pmlmepriv->wps_probe_resp_ie_len = 0; - kfree(pmlmepriv->wps_probe_resp_ie); - pmlmepriv->wps_probe_resp_ie = NULL; - } - - pmlmepriv->wps_probe_resp_ie = - kmalloc(wps_ielen, GFP_KERNEL); - if (pmlmepriv->wps_probe_resp_ie == NULL) { - DBG_8723A("%s()-%d: kmalloc() ERROR!\n", - __func__, __LINE__); - return -EINVAL; - - } - - /* add PUSH_BUTTON config_method by driver self in - wpsie of probe_resp at GO Mode */ - puconfig_method = (u16 *)rtw_get_wps_attr_content23a(wps_ie, wps_ielen, - WPS_ATTR_CONF_METHOD, - NULL, - &attr_contentlen); - if (puconfig_method) { - uconfig_method = WPS_CM_PUSH_BU
[PATCH 37/48] staging: rtl8723au: odm.c: Rename BTDM_DisableEDCATurbo() to rtl8723a_BT_disable_EDCA_turbo()
From: Jes Sorensen Make it return bool since it only returns true/false, and get rid of Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/hal/odm.c | 4 +--- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 4 ++-- drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h | 2 -- drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h| 5 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c index 6b3b2f0..e15ebfe 100644 --- a/drivers/staging/rtl8723au/hal/odm.c +++ b/drivers/staging/rtl8723au/hal/odm.c @@ -1668,10 +1668,8 @@ void odm_EdcaTurboCheck23aCE23a(struct dm_odm_t *pDM_Odm) if (pmlmeinfo->assoc_AP_vendor >= HT_IOT_PEER_MAX) goto dm_CheckEdcaTurbo_EXIT; -#ifdef CONFIG_8723AU_BT_COEXIST - if (BT_DisableEDCATurbo(Adapter)) + if (rtl8723a_BT_disable_EDCA_turbo(Adapter)) goto dm_CheckEdcaTurbo_EXIT; -#endif /* Check if the status needs to be changed. */ if ((bbtchange) || (!precvpriv->bIsAnyNonBEPkts)) { diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index b746b08..4d94b4b 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -10534,13 +10534,13 @@ u8 BTDM_CheckCoexRSSIState(struct rtw_adapter *padapter, u8 levelNum, return btRssiState; } -u8 BTDM_DisableEDCATurbo(struct rtw_adapter *padapter) +bool rtl8723a_BT_disable_EDCA_turbo(struct rtw_adapter *padapter) { struct bt_mgnt *pBtMgnt; struct hal_data_8723a *pHalData; u8 bBtChangeEDCA = false; u32 EDCA_BT_BE = 0x5ea42b, cur_EDCA_reg; - u8 bRet = false; + bool bRet = false; pHalData = GET_HAL_DATA(padapter); pBtMgnt = &pHalData->BtInfo.BtMgnt; diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h index 46e2904..b5659fd 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h @@ -1557,8 +1557,6 @@ s32 BTDM_GetRxSS(struct rtw_adapter * padapter); u8 BTDM_CheckCoexBcnRssiState(struct rtw_adapter * padapter, u8 levelNum, u8 RssiThresh, u8 RssiThresh1); u8 BTDM_CheckCoexRSSIState1(struct rtw_adapter * padapter, u8 levelNum, u8 RssiThresh, u8 RssiThresh1); u8 BTDM_CheckCoexRSSIState(struct rtw_adapter * padapter, u8 levelNum, u8 RssiThresh, u8 RssiThresh1); -u8 BTDM_DisableEDCATurbo(struct rtw_adapter * padapter); -#define BT_DisableEDCATurbo BTDM_DisableEDCATurbo void BTDM_Balance(struct rtw_adapter * padapter, u8 bBalanceOn, u8 ms0, u8 ms1); void BTDM_AGCTable(struct rtw_adapter * padapter, u8 type); void BTDM_BBBackOffLevel(struct rtw_adapter * padapter, u8 type); diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h index b632889..5de42b0 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h @@ -30,6 +30,7 @@ void rtl8723a_BT_mediastatus_notify(struct rtw_adapter *padapter, void rtl8723a_BT_specialpacket_notify(struct rtw_adapter *padapter); void rtl8723a_BT_lps_leave(struct rtw_adapter *padapter); void rtl8723a_BT_disable_coexist(struct rtw_adapter *padapter); +bool rtl8723a_BT_disable_EDCA_turbo(struct rtw_adapter *padapter); #else static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) { @@ -49,6 +50,10 @@ static inline bool rtl8723a_BT_coexist(struct rtw_adapter *padapter) #define rtl8723a_BT_specialpacket_notify(padapter) do {} while(0) #define rtl8723a_BT_lps_leave(padapter)do {} while(0) #define rtl8723a_BT_disable_coexist(padapter) do {} while(0) +static inline bool rtl8723a_BT_disable_EDCA_turbo(struct rtw_adapter *padapter) +{ + return false; +} #endif #endif -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 26/48] staging: rtl8723au: Remove some CONFIG_8723AU_BT_COEXIST clutter
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_cmd.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index db97ffb..e4caa3f 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -990,23 +990,21 @@ static void traffic_status_watchdog(struct rtw_adapter *padapter) bHigherBusyTxTraffic = true; } -#ifdef CONFIG_8723AU_BT_COEXIST - if (rtl8723a_BT_using_antenna_1(padapter) == false) -#endif - { + if (!rtl8723a_BT_coexist(padapter) || + !rtl8723a_BT_using_antenna_1(padapter)) { /* check traffic for powersaving. */ - if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod + - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) > 8) || - (pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2)) - bEnterPS = false; - else - bEnterPS = true; + if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod + + pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) > 8) || + pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod >2) + bEnterPS = false; + else + bEnterPS = true; - /* LeisurePS only work in infra mode. */ - if (bEnterPS) - LPS_Enter23a(padapter); - else - LPS_Leave23a(padapter); + /* LeisurePS only work in infra mode. */ + if (bEnterPS) + LPS_Enter23a(padapter); + else + LPS_Leave23a(padapter); } } else LPS_Leave23a(padapter); -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 45/48] staging: rtl8723au: rtl8723a_bt-coexist.c: Remove unnecessary #ifdef CONFIG_8723AU_BT_COEXIST
From: Jes Sorensen This file is only compiled if CONFIG_8723AU_BT_COEXIST=y Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index 5aa9ea5..c1d54bc 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -19,8 +19,6 @@ #define DIS_PS_RX_BCN -#ifdef CONFIG_8723AU_BT_COEXIST - u32 BTCoexDbgLevel = _bt_dbg_off_; #define RTPRINT(_Comp, _Level, Fmt)\ @@ -71,7 +69,6 @@ if ((BTCoexDbgLevel == _bt_dbg_on_)) {\ printk(_TitleString); \ printk(": %d, <%s>\n", _Len, buffer); \ } -#endif #define DCMD_Printf(...) #define RT_ASSERT(...) -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 47/48] staging: rtl8723au: Remove unused struct btdata_info
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h index 2a6a100..0506965 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h @@ -1086,12 +1086,6 @@ enum hci_ext_bp_operation { HCI_BT_OP_MAX }; -/* Function proto type */ -struct btdata_entry { - struct list_headList; - void*pDataBlock; -}; - #define BTHCI_SM_WITH_INFO(_Adapter, _StateToEnter, _StateCmd, _EntryNum) \ { \ RTPRINT(FIOCTL, IOCTL_STATE, ("[BT state change] caused by ""%s"", line =%d\n", __func__, __LINE__)); \ -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 23/48] staging: rtl8723au: Create rtl8723au_bt_intf.h
From: Jes Sorensen Use this header for declaring functions that are currently #ifdef'ed out in the general code. Start by moving BTDM_1Ant8723A() there and renaming it appropriately. Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_cmd.c | 10 drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 6 ++--- drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 2 +- drivers/staging/rtl8723au/hal/hal_com.c| 2 +- .../staging/rtl8723au/hal/rtl8723a_bt-coexist.c| 8 +++--- .../rtl8723au/include/rtl8723a_bt-coexist.h| 2 -- .../staging/rtl8723au/include/rtl8723a_bt_intf.h | 30 ++ drivers/staging/rtl8723au/include/rtl8723a_hal.h | 1 + 8 files changed, 45 insertions(+), 16 deletions(-) create mode 100644 drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 1768a94..db97ffb 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -991,7 +991,7 @@ static void traffic_status_watchdog(struct rtw_adapter *padapter) } #ifdef CONFIG_8723AU_BT_COEXIST - if (BT_1Ant(padapter) == false) + if (rtl8723a_BT_using_antenna_1(padapter) == false) #endif { /* check traffic for powersaving. */ @@ -1064,7 +1064,7 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) case LPS_CTRL_SCAN: #ifdef CONFIG_8723AU_BT_COEXIST BT_WifiScanNotify(padapter, true); - if (BT_1Ant(padapter) == false) + if (rtl8723a_BT_using_antenna_1(padapter) == false) #endif { if (check_fwstate(pmlmepriv, _FW_LINKED)) @@ -1087,7 +1087,7 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) mstatus = 0;/* disconnect */ #ifdef CONFIG_8723AU_BT_COEXIST BT_WifiMediaStatusNotify(padapter, mstatus); - if (BT_1Ant(padapter) == false) + if (rtl8723a_BT_using_antenna_1(padapter) == false) #endif { LPS_Leave23a(padapter); @@ -1098,7 +1098,7 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) pwrpriv->DelayLPSLastTimeStamp = jiffies; #ifdef CONFIG_8723AU_BT_COEXIST BT_SpecialPacketNotify(padapter); - if (BT_1Ant(padapter) == false) + if (rtl8723a_BT_using_antenna_1(padapter) == false) #endif { LPS_Leave23a(padapter); @@ -1107,7 +1107,7 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) case LPS_CTRL_LEAVE: #ifdef CONFIG_8723AU_BT_COEXIST BT_LpsLeave(padapter); - if (BT_1Ant(padapter) == false) + if (rtl8723a_BT_using_antenna_1(padapter) == false) #endif { LPS_Leave23a(padapter); diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index aaadd8d..def3299 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -3479,7 +3479,7 @@ static void issue_assocreq(struct rtw_adapter *padapter) cpu_to_le16(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info); #ifdef CONFIG_8723AU_BT_COEXIST - if (BT_1Ant(padapter) == true) { + if (rtl8723a_BT_using_antenna_1(padapter)) { /* set to 8K */ pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para &= (u8)~IEEE80211_HT_AMPDU_PARM_FACTOR; /* pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para |= MAX_AMPDU_FACTOR_8K */ @@ -4038,7 +4038,7 @@ void issue_action_BA23a(struct rtw_adapter *padapter, &pattrib->pktlen); #ifdef CONFIG_8723AU_BT_COEXIST - if ((BT_1Ant(padapter) == true) && + if (rtl8723a_BT_using_antenna_1(padapter) && ((pmlmeinfo->assoc_AP_vendor != broadcomAP) || memcmp(raddr, tendaAPMac, 3))) { /* A-MSDU NOT Supported */ @@ -4105,7 +4105,7 @@ void issue_action_BA23a(struct rtw_adapter *padapter, BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x1000); /* 64 buffer size */ #ifdef CONFIG_8723AU_BT_COEXIST - if ((BT_1Ant(padapter) == true) && + if (rtl8723a_BT_using_antenna_1(padapter) && ((pmlmeinfo->assoc_AP_vendor != broadco
[PATCH 20/48] staging: rtl8723au: bInternalAutoSuspend is always false
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_pwrctrl.c| 13 ++--- drivers/staging/rtl8723au/include/rtw_pwrctrl.h | 1 - drivers/staging/rtl8723au/os_dep/os_intfs.c | 4 drivers/staging/rtl8723au/os_dep/usb_intf.c | 11 +++ 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c index 90359d1..86ce51f 100644 --- a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c @@ -481,7 +481,6 @@ void rtw_init_pwrctrl_priv23a(struct rtw_adapter *padapter) pwrctrlpriv->pwr_state_check_interval = RTW_PWR_STATE_CHK_INTERVAL; pwrctrlpriv->pwr_state_check_cnts = 0; - pwrctrlpriv->bInternalAutoSuspend = false; pwrctrlpriv->bInSuspend = false; pwrctrlpriv->bkeepfwalive = false; @@ -562,7 +561,7 @@ int _rtw_pwr_wakeup23a(struct rtw_adapter *padapter, u32 ips_deffer_ms, const ch DBG_8723A("%s wait sreset_inprogress done\n", __func__); } - if (pwrpriv->bInternalAutoSuspend == false && pwrpriv->bInSuspend) { + if (pwrpriv->bInSuspend) { DBG_8723A("%s wait bInSuspend...\n", __func__); while (pwrpriv->bInSuspend && (jiffies_to_msecs(jiffies - start) <= 3000)) { @@ -575,15 +574,7 @@ int _rtw_pwr_wakeup23a(struct rtw_adapter *padapter, u32 ips_deffer_ms, const ch } /* System suspend is not allowed to wakeup */ - if (pwrpriv->bInternalAutoSuspend == false && - pwrpriv->bInSuspend == true) { - ret = _FAIL; - goto exit; - } - - /* block??? */ - if (pwrpriv->bInternalAutoSuspend == true && - padapter->net_closed == true) { + if (pwrpriv->bInSuspend) { ret = _FAIL; goto exit; } diff --git a/drivers/staging/rtl8723au/include/rtw_pwrctrl.h b/drivers/staging/rtl8723au/include/rtw_pwrctrl.h index 44a7d4f..a458af9 100644 --- a/drivers/staging/rtl8723au/include/rtw_pwrctrl.h +++ b/drivers/staging/rtl8723au/include/rtw_pwrctrl.h @@ -191,7 +191,6 @@ struct pwrctrl_priv { s32 pnp_current_pwr_state; u8 pnp_bstop_trx; - u8 bInternalAutoSuspend; u8 bInSuspend; #ifdef CONFIG_8723AU_BT_COEXIST u8 bAutoResume; diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c b/drivers/staging/rtl8723au/os_dep/os_intfs.c index d572f64..5b27eb4 100644 --- a/drivers/staging/rtl8723au/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c @@ -835,10 +835,6 @@ static int netdev_close(struct net_device *pnetdev) RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+871x_drv - drv_close\n")); - if (padapter->pwrctrlpriv.bInternalAutoSuspend) { - if (padapter->pwrctrlpriv.rf_pwrstate == rf_off) - padapter->pwrctrlpriv.ps_flag = true; - } padapter->net_closed = true; if (padapter->pwrctrlpriv.rf_pwrstate == rf_on) { diff --git a/drivers/staging/rtl8723au/os_dep/usb_intf.c b/drivers/staging/rtl8723au/os_dep/usb_intf.c index f78be19..8b25c1a 100644 --- a/drivers/staging/rtl8723au/os_dep/usb_intf.c +++ b/drivers/staging/rtl8723au/os_dep/usb_intf.c @@ -314,8 +314,7 @@ static void rtw_dev_unload(struct rtw_adapter *padapter) rtl8723a_usb_intf_stop(padapter); /* s4. */ - if (!padapter->pwrctrlpriv.bInternalAutoSuspend) - flush_workqueue(padapter->cmdpriv.wq); + flush_workqueue(padapter->cmdpriv.wq); /* s5. */ if (!padapter->bSurpriseRemoved) { @@ -505,13 +504,9 @@ static int rtw_resume(struct usb_interface *pusb_intf) { struct dvobj_priv *dvobj = usb_get_intfdata(pusb_intf); struct rtw_adapter *padapter = dvobj->if1; - struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; - int ret = 0; + int ret; - if (pwrpriv->bInternalAutoSuspend) - ret = rtw_resume_process23a(padapter); - else - ret = rtw_resume_process23a(padapter); + ret = rtw_resume_process23a(padapter); return ret; } -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/48] staging: rtl8723au: struct rtw_wdev_priv: Remove some never 'true' variables
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/include/ioctl_cfg80211.h | 3 --- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 7 --- 2 files changed, 10 deletions(-) diff --git a/drivers/staging/rtl8723au/include/ioctl_cfg80211.h b/drivers/staging/rtl8723au/include/ioctl_cfg80211.h index 5fc710b..e1eaf9c 100644 --- a/drivers/staging/rtl8723au/include/ioctl_cfg80211.h +++ b/drivers/staging/rtl8723au/include/ioctl_cfg80211.h @@ -28,9 +28,6 @@ struct rtw_wdev_priv { u8 p2p_enabled; - u8 provdisc_req_issued; - - bool block; bool power_mgmt; }; diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 6b9bf16..017ea44 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -2012,12 +2012,6 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, DBG_8723A("privacy =%d, key =%p, key_len =%d, key_idx =%d\n", sme->privacy, sme->key, sme->key_len, sme->key_idx); - if (wdev_to_priv(padapter->rtw_wdev)->block) { - ret = -EBUSY; - DBG_8723A("%s wdev_priv.block is set\n", __func__); - goto exit; - } - if (_FAIL == rtw_pwr_wakeup(padapter)) { ret = -EPERM; goto exit; @@ -3406,7 +3400,6 @@ int rtw_wdev_alloc(struct rtw_adapter *padapter, struct device *dev) spin_lock_init(&pwdev_priv->scan_req_lock); pwdev_priv->p2p_enabled = false; - pwdev_priv->provdisc_req_issued = false; if (padapter->registrypriv.power_mgnt != PS_MODE_ACTIVE) pwdev_priv->power_mgmt = true; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH linux-next] imx-drm: imx-tve: remove unused variable
Commit f9b0e251dfbf 'drm: make mode_valid callback optional' left variable ret unused; remove it. This fixes the following compilation warning: drivers/staging/imx-drm/imx-tve.c: In function ‘imx_tve_connector_mode_valid’: drivers/staging/imx-drm/imx-tve.c:252:6: warning: unused variable ‘ret’ [-Wunused-variable] Signed-off-by: Vincent Stehlé Cc: Andrzej Hajda Cc: Daniel Vetter Cc: Greg Kroah-Hartman --- Hi, This can be seen with e.g. linux next-20140523 and arm allmodconfig. Best regards, V. drivers/staging/imx-drm/imx-tve.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c index 3e8b0a1..4caef2b1 100644 --- a/drivers/staging/imx-drm/imx-tve.c +++ b/drivers/staging/imx-drm/imx-tve.c @@ -249,7 +249,6 @@ static int imx_tve_connector_mode_valid(struct drm_connector *connector, { struct imx_tve *tve = con_to_tve(connector); unsigned long rate; - int ret; /* pixel clock with 2x oversampling */ rate = clk_round_rate(tve->clk, 2000UL * mode->clock) / 2000; -- 2.0.0.rc2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH linux-next] imx-drm: imx-tve: remove unused variable
On Sun, May 25, 2014 at 11:54:14PM +0200, Vincent Stehlé wrote: > Commit f9b0e251dfbf 'drm: make mode_valid callback optional' left variable ret > unused; remove it. > > This fixes the following compilation warning: > > drivers/staging/imx-drm/imx-tve.c: In function > ‘imx_tve_connector_mode_valid’: > drivers/staging/imx-drm/imx-tve.c:252:6: warning: unused variable ‘ret’ > [-Wunused-variable] It doesn't apply to my tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: Fixed a lot of checkpatch.pl warnings
On Sun, May 25, 2014 at 11:59:08AM -0700, Chaitanya Hazarey wrote: > Added a blank line after declarations in many places to fix the following > warning issued by checkpatch.pl: > > WARNING: Missing a blank line after declarations > > Lets see if this works now, this patch is prepared against Greg's staging > tree. What branch of my staging.git tree are you using? You should use the staging-next branch, this patch still doesn't apply to there :( greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 00/48] staging-next: rtl8723au: More fixes and removal of dead code
On Sun, May 25, 2014 at 10:43:00PM +0200, jes.soren...@redhat.com wrote: > From: Jes Sorensen > > Hi Greg, > > Please find attached another round of cleanups, removal of dead code, > and tidying up most of the #ifdef CONFIG_8723AU_BT_COEXIST mess. > > Notably patch 10 fixes an OOPS case if a user tries to add a monitor > interface - monitor mode still doesn't work, but at least it doesn't > wedge the kernel. This one could go for 3.15, but it's not a common > use case. Patch 10 doesn't apply to my staging-linus branch, so I can't apply it there, but feel free to send me a version if you think it should go into 3.15-final. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3] staging: lustre: lnet: klnds: Fix coding style in socklnd.c
Remove prohibited space between function name and open parenthesis to meet kernel coding style. Also fix indenting due to changes to keep readability. -since v2: None. This is the resend of v2 as v2 failed to apply Signed-off-by: Masaru Nomura --- .../staging/lustre/lnet/klnds/socklnd/socklnd.c| 242 ++-- 1 file changed, 120 insertions(+), 122 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c index 21d36ee..39b607f 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c @@ -65,15 +65,15 @@ ksocknal_ip2iface(lnet_ni_t *ni, __u32 ip) } ksock_route_t * -ksocknal_create_route (__u32 ipaddr, int port) +ksocknal_create_route(__u32 ipaddr, int port) { ksock_route_t *route; - LIBCFS_ALLOC (route, sizeof (*route)); + LIBCFS_ALLOC(route, sizeof(*route)); if (route == NULL) return (NULL); - atomic_set (&route->ksnr_refcount, 1); + atomic_set(&route->ksnr_refcount, 1); route->ksnr_peer = NULL; route->ksnr_retry_interval = 0; /* OK to connect at any time */ route->ksnr_ipaddr = ipaddr; @@ -89,27 +89,27 @@ ksocknal_create_route (__u32 ipaddr, int port) } void -ksocknal_destroy_route (ksock_route_t *route) +ksocknal_destroy_route(ksock_route_t *route) { - LASSERT (atomic_read(&route->ksnr_refcount) == 0); + LASSERT(atomic_read(&route->ksnr_refcount) == 0); if (route->ksnr_peer != NULL) ksocknal_peer_decref(route->ksnr_peer); - LIBCFS_FREE (route, sizeof (*route)); + LIBCFS_FREE(route, sizeof(*route)); } int -ksocknal_create_peer (ksock_peer_t **peerp, lnet_ni_t *ni, lnet_process_id_t id) +ksocknal_create_peer(ksock_peer_t **peerp, lnet_ni_t *ni, lnet_process_id_t id) { ksock_net_t *net = ni->ni_data; ksock_peer_t *peer; - LASSERT (id.nid != LNET_NID_ANY); - LASSERT (id.pid != LNET_PID_ANY); - LASSERT (!in_interrupt()); + LASSERT(id.nid != LNET_NID_ANY); + LASSERT(id.pid != LNET_PID_ANY); + LASSERT(!in_interrupt()); - LIBCFS_ALLOC (peer, sizeof (*peer)); + LIBCFS_ALLOC(peer, sizeof(*peer)); if (peer == NULL) return -ENOMEM; @@ -117,17 +117,17 @@ ksocknal_create_peer (ksock_peer_t **peerp, lnet_ni_t *ni, lnet_process_id_t id) peer->ksnp_ni = ni; peer->ksnp_id = id; - atomic_set (&peer->ksnp_refcount, 1); /* 1 ref for caller */ + atomic_set(&peer->ksnp_refcount, 1); /* 1 ref for caller */ peer->ksnp_closing = 0; peer->ksnp_accepting = 0; peer->ksnp_proto = NULL; peer->ksnp_last_alive = 0; peer->ksnp_zc_next_cookie = SOCKNAL_KEEPALIVE_PING + 1; - INIT_LIST_HEAD (&peer->ksnp_conns); - INIT_LIST_HEAD (&peer->ksnp_routes); - INIT_LIST_HEAD (&peer->ksnp_tx_queue); - INIT_LIST_HEAD (&peer->ksnp_zc_req_list); + INIT_LIST_HEAD(&peer->ksnp_conns); + INIT_LIST_HEAD(&peer->ksnp_routes); + INIT_LIST_HEAD(&peer->ksnp_tx_queue); + INIT_LIST_HEAD(&peer->ksnp_zc_req_list); spin_lock_init(&peer->ksnp_lock); spin_lock_bh(&net->ksnn_lock); @@ -149,21 +149,21 @@ ksocknal_create_peer (ksock_peer_t **peerp, lnet_ni_t *ni, lnet_process_id_t id) } void -ksocknal_destroy_peer (ksock_peer_t *peer) +ksocknal_destroy_peer(ksock_peer_t *peer) { ksock_net_t*net = peer->ksnp_ni->ni_data; - CDEBUG (D_NET, "peer %s %p deleted\n", - libcfs_id2str(peer->ksnp_id), peer); + CDEBUG(D_NET, "peer %s %p deleted\n", + libcfs_id2str(peer->ksnp_id), peer); - LASSERT (atomic_read (&peer->ksnp_refcount) == 0); - LASSERT (peer->ksnp_accepting == 0); - LASSERT (list_empty (&peer->ksnp_conns)); - LASSERT (list_empty (&peer->ksnp_routes)); - LASSERT (list_empty (&peer->ksnp_tx_queue)); - LASSERT (list_empty (&peer->ksnp_zc_req_list)); + LASSERT(atomic_read(&peer->ksnp_refcount) == 0); + LASSERT(peer->ksnp_accepting == 0); + LASSERT(list_empty(&peer->ksnp_conns)); + LASSERT(list_empty(&peer->ksnp_routes)); + LASSERT(list_empty(&peer->ksnp_tx_queue)); + LASSERT(list_empty(&peer->ksnp_zc_req_list)); - LIBCFS_FREE (peer, sizeof (*peer)); + LIBCFS_FREE(peer, sizeof(*peer)); /* NB a peer's connections and routes keep a reference on their peer * until they are destroyed, so we can be assured that _all_ state to @@ -175,17 +175,17 @@ ksocknal_destroy_peer (ksock_peer_t *peer) } ksock_peer_t * -ksocknal_find_peer_locked (lnet_ni_t *ni, lnet_process_id_t id) +ksocknal_find_peer_locked(lnet_ni_t *ni, lnet_process_id_t id) { struct list_head *peer_list = ksocknal_nid2peerlist(id.nid); struct list_head *tmp; ksock_peer_t
Re: [PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: Fixed a lot of checkpatch.pl warnings
Since you're redoing this one anyway, please use a more specific subject like: [PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: add blank lines regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] staging: lustre: lnet: klnds: Fix coding style in socklnd.c
On Sun, May 25, 2014 at 11:24:12PM +0100, Masaru Nomura wrote: > Remove prohibited space between function name and > open parenthesis to meet kernel coding style. > Also fix indenting due to changes to keep readability. > > -since v2: > None. This is the resend of v2 as v2 failed to apply This should be below the --- line. And it still doesn't apply :( What branch did you make it against? greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH linux-next] imx-drm: imx-tve: remove unused variable
Hi all, On Sun, 25 May 2014 15:12:35 -0700 Greg Kroah-Hartman wrote: > > On Sun, May 25, 2014 at 11:54:14PM +0200, Vincent Stehlé wrote: > > Commit f9b0e251dfbf 'drm: make mode_valid callback optional' left variable > > ret > > unused; remove it. > > > > This fixes the following compilation warning: > > > > drivers/staging/imx-drm/imx-tve.c: In function > > ‘imx_tve_connector_mode_valid’: > > drivers/staging/imx-drm/imx-tve.c:252:6: warning: unused variable ‘ret’ > > [-Wunused-variable] > > It doesn't apply to my tree :( Yeah, commit f9b0e251dfbf 'drm: make mode_valid callback optional' is in the drm tree, so this patch needs to go to Dave Airlie (cc'd). Though Daniel Vetter may want to send it on. For Dave's benefit, here is the patch again: From: Vincent Stehlé Subject: [PATCH linux-next] imx-drm: imx-tve: remove unused variable Date: Sun, 25 May 2014 23:54:14 +0200 Commit f9b0e251dfbf 'drm: make mode_valid callback optional' left variable ret unused; remove it. This fixes the following compilation warning: drivers/staging/imx-drm/imx-tve.c: In function ‘imx_tve_connector_mode_valid’: drivers/staging/imx-drm/imx-tve.c:252:6: warning: unused variable ‘ret’ [-Wunused-variable] Signed-off-by: Vincent Stehlé Cc: Andrzej Hajda Cc: Daniel Vetter Cc: Greg Kroah-Hartman --- Hi, This can be seen with e.g. linux next-20140523 and arm allmodconfig. Best regards, V. drivers/staging/imx-drm/imx-tve.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c index 3e8b0a1..4caef2b1 100644 --- a/drivers/staging/imx-drm/imx-tve.c +++ b/drivers/staging/imx-drm/imx-tve.c @@ -249,7 +249,6 @@ static int imx_tve_connector_mode_valid(struct drm_connector *connector, { struct imx_tve *tve = con_to_tve(connector); unsigned long rate; - int ret; /* pixel clock with 2x oversampling */ rate = clk_round_rate(tve->clk, 2000UL * mode->clock) / 2000; -- 2.0.0.rc2 -- Cheers, Stephen Rothwells...@canb.auug.org.au signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] staging: lustre: lnet: klnds: Fix coding style in socklnd.c
On Sun, May 25, 2014 at 11:50:03PM +0100, Masaru Nomura wrote: > > > > 2014-05-25 23:37 GMT+01:00 Greg KH : > > On Sun, May 25, 2014 at 11:24:12PM +0100, Masaru Nomura wrote: > > Remove prohibited space between function name and > > open parenthesis to meet kernel coding style. > > Also fix indenting due to changes to keep readability. > > > > -since v2: > > None. This is the resend of v2 as v2 failed to apply > > This should be below the --- line. > > > > I'm sorry for that. Will fix it. > > > And it still doesn't apply :( > > What branch did you make it against? > > > > I'm using[1] which is your staging.git (is it correct?) and downloaded it > today. So, there should not be a patch failure... :( What _branch_ of that git tree did you make it against? And please don't send html email, the mailing lists reject it. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] staging: lustre: lnet: klnds: Fix coding style in socklnd.c
> What _branch_ of that git tree did you make it against? > I did my work against commit 4b660a7f5c8099d88d1a43d8ae138965112592c7 Thank you, Masaru ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: Fixed a lot of checkpatch.pl warnings
OK sure, will do Dan. Greg, the patch has some issues, I did sync to your staging-next branch and am having issues applying it. Will send an update when i am able to do it. Thanks, Chaitanya On Sun, May 25, 2014 at 3:30 PM, Dan Carpenter wrote: > Since you're redoing this one anyway, please use a more specific subject > like: > > [PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: add blank lines > > regards, > dan carpenter > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] staging: lustre: lnet: klnds: Fix coding style in socklnd.c
On Mon, May 26, 2014 at 12:57:39AM +0100, Masaru Nomura wrote: > > What _branch_ of that git tree did you make it against? > > > > I did my work against > > commit 4b660a7f5c8099d88d1a43d8ae138965112592c7 That is a commit, not a branch. Please work against the staging-next branch, not master. master reflects Linus's tree. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: Adding blank lines
Added a blank line after declarations in many places to fix the following warning issued by checkpatch.pl: WARNING: Missing a blank line after declarations The reason why it was not applying clean against Greg's tree was that bpctl_mod.c had changed in the functions which are a part of this patch. Signed-off-by: Chaitanya Hazarey --- drivers/staging/silicom/bpctl_mod.c| 88 +++- drivers/staging/silicom/bypasslib/bypass.c |2 + 2 files changed, 88 insertions(+), 2 deletions(-) diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c index e361cde..22bf4bf 100644 --- a/drivers/staging/silicom/bpctl_mod.c +++ b/drivers/staging/silicom/bpctl_mod.c @@ -752,6 +752,7 @@ static void write_reg(struct bpctl_dev *pbpctl_dev, unsigned char value, uint32_t ctrl_ext = 0, ctrl = 0; struct bpctl_dev *pbpctl_dev_c = NULL; unsigned long flags; + if (pbpctl_dev->bp_10g9) { pbpctl_dev_c = get_status_port_fn(pbpctl_dev); if (!pbpctl_dev_c) @@ -927,6 +928,7 @@ static int read_reg(struct bpctl_dev *pbpctl_dev, unsigned char addr) #ifdef BP_SYNC_FLAG unsigned long flags; + spin_lock_irqsave(&pbpctl_dev->bypass_wr_lock, flags); #else atomic_set(&pbpctl_dev->wdt_busy, 1); @@ -1563,6 +1565,7 @@ int pulse_set_fn(struct bpctl_dev *pbpctl_dev, unsigned int counter) int zero_set_fn(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl_ext = 0, ctrl_value = 0; + if (!pbpctl_dev) return -1; @@ -1588,6 +1591,7 @@ int zero_set_fn(struct bpctl_dev *pbpctl_dev) int pulse_get2_fn(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl_ext = 0, ctrl_value = 0; + if (!pbpctl_dev) return -1; @@ -1603,6 +1607,7 @@ int pulse_get2_fn(struct bpctl_dev *pbpctl_dev) int pulse_get1_fn(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl_ext = 0, ctrl_value = 0; + if (!pbpctl_dev) return -1; @@ -1666,6 +1671,7 @@ static struct bpctl_dev *lookup_port(struct bpctl_dev *dev) { struct bpctl_dev *p; int n; + for (n = 0, p = bpctl_dev_arr; n < device_num && p->pdev; n++) { if (p->bus == dev->bus && p->slot == dev->slot @@ -1843,6 +1849,7 @@ static int bypass_off(struct bpctl_dev *pbpctl_dev) static int tap_off(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; + if ((pbpctl_dev->bp_caps & TAP_CAP) && (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER)) { write_data(pbpctl_dev, TAP_OFF); @@ -1856,6 +1863,7 @@ static int tap_off(struct bpctl_dev *pbpctl_dev) static int tap_on(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; + if ((pbpctl_dev->bp_caps & TAP_CAP) && (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER)) { write_data(pbpctl_dev, TAP_ON); @@ -1869,6 +1877,7 @@ static int tap_on(struct bpctl_dev *pbpctl_dev) static int disc_off(struct bpctl_dev *pbpctl_dev) { int ret = 0; + if ((pbpctl_dev->bp_caps & DISC_CAP) && (pbpctl_dev->bp_ext_ver >= 0x8)) { write_data(pbpctl_dev, DISC_OFF); msec_delay_bp(LATCH_DELAY); @@ -1881,6 +1890,7 @@ static int disc_off(struct bpctl_dev *pbpctl_dev) static int disc_on(struct bpctl_dev *pbpctl_dev) { int ret = 0; + if ((pbpctl_dev->bp_caps & DISC_CAP) && (pbpctl_dev->bp_ext_ver >= 0x8)) { write_data(pbpctl_dev, /*DISC_ON */ 0x85); msec_delay_bp(LATCH_DELAY); @@ -2270,6 +2280,7 @@ static int set_tx(struct bpctl_dev *pbpctl_dev, int tx_state) { int ret = 0, ctrl = 0; struct bpctl_dev *pbpctl_dev_m; + if ((is_bypass_fn(pbpctl_dev)) == 1) pbpctl_dev_m = pbpctl_dev; else @@ -2802,6 +2813,7 @@ int wdt_time_left(struct bpctl_dev *pbpctl_dev) static int wdt_timer(struct bpctl_dev *pbpctl_dev, int *time_left) { int ret = 0; + if (pbpctl_dev->bp_caps & WD_CTL_CAP) { { if (pbpctl_dev->wdt_status == WDT_STATUS_UNKNOWN) @@ -3014,6 +3026,7 @@ static int tx_status(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl = 0; struct bpctl_dev *pbpctl_dev_m; + if ((is_bypass_fn(pbpctl_dev)) == 1) pbpctl_dev_m = pbpctl_dev; else @@ -3195,6 +3208,7 @@ static int bypass_change_status(struct bpctl_dev *pbpctl_dev) static int bypass_status(struct bpctl_dev *pbpctl_dev) { u32 ctrl_ext = 0; + if (pbpctl_dev->bp_caps & BP_CAP) { struct bpctl_dev *pbpctl_dev_b = NULL; @@ -3323,6 +3337,7 @@ static int dis_bypass_cap_status(struct bpctl_dev *pbpctl_dev) static int wdt_programmed(struct bpctl_dev *pbpctl_dev, int *timeout) { int ret = 0; + if (pbpctl_dev->bp_caps & WD_CTL_CAP) { if (pbpctl_dev->bp_ext_ver >= PXG2BPI_VER) { if
Re: [PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: Adding blank lines
On Sun, May 25, 2014 at 05:36:58PM -0700, Chaitanya Hazarey wrote: > Added a blank line after declarations in many places to fix the following > warning issued by checkpatch.pl: Always wrap your lines at 72 columns, like git asks you to when you type in the commit message. > WARNING: Missing a blank line after declarations > > The reason why it was not applying clean against Greg's tree was that > bpctl_mod.c had changed in the functions which are a part of this patch. This doesn't belong as part of the changelog, right? Please resend and put it below the --- line, if you want to. Can you redo this with the changelog fixed up please? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: Adding blank lines
On its way. Chaitanya On Sun, May 25, 2014 at 5:51 PM, Greg KH wrote: > On Sun, May 25, 2014 at 05:36:58PM -0700, Chaitanya Hazarey wrote: >> Added a blank line after declarations in many places to fix the following >> warning issued by checkpatch.pl: > > Always wrap your lines at 72 columns, like git asks you to when you type > in the commit message. > >> WARNING: Missing a blank line after declarations >> >> The reason why it was not applying clean against Greg's tree was that >> bpctl_mod.c had changed in the functions which are a part of this patch. > > This doesn't belong as part of the changelog, right? Please resend and > put it below the --- line, if you want to. > > Can you redo this with the changelog fixed up please? > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: Adding blank lines
Added a blank line after declarations in many places to fix the following warning issued by checkpatch.pl: WARNING: Missing a blank line after declarations Signed-off-by: Chaitanya Hazarey --- drivers/staging/silicom/bpctl_mod.c| 88 +++- drivers/staging/silicom/bypasslib/bypass.c |2 + 2 files changed, 88 insertions(+), 2 deletions(-) diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c index e361cde..22bf4bf 100644 --- a/drivers/staging/silicom/bpctl_mod.c +++ b/drivers/staging/silicom/bpctl_mod.c @@ -752,6 +752,7 @@ static void write_reg(struct bpctl_dev *pbpctl_dev, unsigned char value, uint32_t ctrl_ext = 0, ctrl = 0; struct bpctl_dev *pbpctl_dev_c = NULL; unsigned long flags; + if (pbpctl_dev->bp_10g9) { pbpctl_dev_c = get_status_port_fn(pbpctl_dev); if (!pbpctl_dev_c) @@ -927,6 +928,7 @@ static int read_reg(struct bpctl_dev *pbpctl_dev, unsigned char addr) #ifdef BP_SYNC_FLAG unsigned long flags; + spin_lock_irqsave(&pbpctl_dev->bypass_wr_lock, flags); #else atomic_set(&pbpctl_dev->wdt_busy, 1); @@ -1563,6 +1565,7 @@ int pulse_set_fn(struct bpctl_dev *pbpctl_dev, unsigned int counter) int zero_set_fn(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl_ext = 0, ctrl_value = 0; + if (!pbpctl_dev) return -1; @@ -1588,6 +1591,7 @@ int zero_set_fn(struct bpctl_dev *pbpctl_dev) int pulse_get2_fn(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl_ext = 0, ctrl_value = 0; + if (!pbpctl_dev) return -1; @@ -1603,6 +1607,7 @@ int pulse_get2_fn(struct bpctl_dev *pbpctl_dev) int pulse_get1_fn(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl_ext = 0, ctrl_value = 0; + if (!pbpctl_dev) return -1; @@ -1666,6 +1671,7 @@ static struct bpctl_dev *lookup_port(struct bpctl_dev *dev) { struct bpctl_dev *p; int n; + for (n = 0, p = bpctl_dev_arr; n < device_num && p->pdev; n++) { if (p->bus == dev->bus && p->slot == dev->slot @@ -1843,6 +1849,7 @@ static int bypass_off(struct bpctl_dev *pbpctl_dev) static int tap_off(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; + if ((pbpctl_dev->bp_caps & TAP_CAP) && (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER)) { write_data(pbpctl_dev, TAP_OFF); @@ -1856,6 +1863,7 @@ static int tap_off(struct bpctl_dev *pbpctl_dev) static int tap_on(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; + if ((pbpctl_dev->bp_caps & TAP_CAP) && (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER)) { write_data(pbpctl_dev, TAP_ON); @@ -1869,6 +1877,7 @@ static int tap_on(struct bpctl_dev *pbpctl_dev) static int disc_off(struct bpctl_dev *pbpctl_dev) { int ret = 0; + if ((pbpctl_dev->bp_caps & DISC_CAP) && (pbpctl_dev->bp_ext_ver >= 0x8)) { write_data(pbpctl_dev, DISC_OFF); msec_delay_bp(LATCH_DELAY); @@ -1881,6 +1890,7 @@ static int disc_off(struct bpctl_dev *pbpctl_dev) static int disc_on(struct bpctl_dev *pbpctl_dev) { int ret = 0; + if ((pbpctl_dev->bp_caps & DISC_CAP) && (pbpctl_dev->bp_ext_ver >= 0x8)) { write_data(pbpctl_dev, /*DISC_ON */ 0x85); msec_delay_bp(LATCH_DELAY); @@ -2270,6 +2280,7 @@ static int set_tx(struct bpctl_dev *pbpctl_dev, int tx_state) { int ret = 0, ctrl = 0; struct bpctl_dev *pbpctl_dev_m; + if ((is_bypass_fn(pbpctl_dev)) == 1) pbpctl_dev_m = pbpctl_dev; else @@ -2802,6 +2813,7 @@ int wdt_time_left(struct bpctl_dev *pbpctl_dev) static int wdt_timer(struct bpctl_dev *pbpctl_dev, int *time_left) { int ret = 0; + if (pbpctl_dev->bp_caps & WD_CTL_CAP) { { if (pbpctl_dev->wdt_status == WDT_STATUS_UNKNOWN) @@ -3014,6 +3026,7 @@ static int tx_status(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl = 0; struct bpctl_dev *pbpctl_dev_m; + if ((is_bypass_fn(pbpctl_dev)) == 1) pbpctl_dev_m = pbpctl_dev; else @@ -3195,6 +3208,7 @@ static int bypass_change_status(struct bpctl_dev *pbpctl_dev) static int bypass_status(struct bpctl_dev *pbpctl_dev) { u32 ctrl_ext = 0; + if (pbpctl_dev->bp_caps & BP_CAP) { struct bpctl_dev *pbpctl_dev_b = NULL; @@ -3323,6 +3337,7 @@ static int dis_bypass_cap_status(struct bpctl_dev *pbpctl_dev) static int wdt_programmed(struct bpctl_dev *pbpctl_dev, int *timeout) { int ret = 0; + if (pbpctl_dev->bp_caps & WD_CTL_CAP) { if (pbpctl_dev->bp_ext_ver >= PXG2BPI_VER) { if ((read_reg(pbpctl_dev, STATUS_REG_ADDR)) & @@ -3386,6 +3401,7 @@ static int tap_flag_status(struct bpctl_dev *pbpctl_dev) static int tap_flag_stat
Re: [PATCH] Staging: Silicom: bpctl_mod.c & bypass.c: Adding blank lines
On Sun, 2014-05-25 at 21:58 -0700, Chaitanya Hazarey wrote: > Added a blank line after declarations in many places to fix > the following warning issued by checkpatch.pl: Unrelated trivial note: > diff --git a/drivers/staging/silicom/bpctl_mod.c > b/drivers/staging/silicom/bpctl_mod.c > @@ -2802,6 +2813,7 @@ int wdt_time_left(struct bpctl_dev *pbpctl_dev) > static int wdt_timer(struct bpctl_dev *pbpctl_dev, int *time_left) > { > int ret = 0; > + > if (pbpctl_dev->bp_caps & WD_CTL_CAP) { > { > if (pbpctl_dev->wdt_status == WDT_STATUS_UNKNOWN) unnecessary and ugly double brace ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel