* [PATCH] rtlwifi: rtl8192cu: Fix some beacon issue
@ 2015-02-20 14:50 Taehee Yoo
2015-02-20 16:58 ` Mike Turner
2015-04-28 16:21 ` Kalle Valo
0 siblings, 2 replies; 9+ messages in thread
From: Taehee Yoo @ 2015-02-20 14:50 UTC (permalink / raw)
To: Larry.Finger; +Cc: linux-wireless, Taehee Yoo
Sometimes rtl8192cu is not sending beacon frame.
This patch fix this issue.
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 40 +++++++++++++---------------
drivers/net/wireless/rtlwifi/rtl8192cu/mac.c | 1 +
2 files changed, 19 insertions(+), 22 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
index fe4b699..5ad5429 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
@@ -1323,39 +1323,40 @@ static int _rtl92cu_set_media_status(struct ieee80211_hw *hw,
enum led_ctl_mode ledaction = LED_CTL_NO_LINK;
bt_msr &= 0xfc;
- rtl_write_byte(rtlpriv, REG_BCN_MAX_ERR, 0xFF);
- if (type == NL80211_IFTYPE_UNSPECIFIED || type ==
- NL80211_IFTYPE_STATION) {
- _rtl92cu_stop_tx_beacon(hw);
- _rtl92cu_enable_bcn_sub_func(hw);
- } else if (type == NL80211_IFTYPE_ADHOC || type == NL80211_IFTYPE_AP) {
- _rtl92cu_resume_tx_beacon(hw);
- _rtl92cu_disable_bcn_sub_func(hw);
- } else {
- RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
- "Set HW_VAR_MEDIA_STATUS:No such media status(%x)\n",
- type);
- }
+ bt_msr |= type;
+ rtl_write_byte(rtlpriv, REG_BCN_CTRL,
+ rtl_read_byte(rtlpriv, REG_BCN_CTRL)|BIT(4));
+ rtl_write_byte(rtlpriv, MSR, bt_msr);
+ rtl_write_byte(rtlpriv, REG_DUAL_TSF_RST, BIT(0));
+
switch (type) {
case NL80211_IFTYPE_UNSPECIFIED:
- bt_msr |= MSR_NOLINK;
ledaction = LED_CTL_LINK;
+ _rtl92cu_stop_tx_beacon(hw);
+ rtl_write_byte(rtlpriv, REG_BCN_CTRL, 0x19);
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
"Set Network type to NO LINK!\n");
break;
case NL80211_IFTYPE_ADHOC:
- bt_msr |= MSR_ADHOC;
+ _rtl92cu_resume_tx_beacon(hw);
+ rtl_write_byte(rtlpriv, REG_BCN_CTRL, 0x1a);
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
"Set Network type to Ad Hoc!\n");
break;
case NL80211_IFTYPE_STATION:
- bt_msr |= MSR_INFRA;
ledaction = LED_CTL_LINK;
+ _rtl92cu_stop_tx_beacon(hw);
+ rtl_write_byte(rtlpriv, REG_BCN_CTRL, 0x19);
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
"Set Network type to STA!\n");
break;
case NL80211_IFTYPE_AP:
- bt_msr |= MSR_AP;
+ _rtl92cu_resume_tx_beacon(hw);
+ rtl_write_dword(rtlpriv, REG_BCN_CTRL, 0x12);
+ rtl_write_word(rtlpriv, REG_BCNTCFG, 0x00);
+ rtl_write_byte(rtlpriv, REG_BCN_CTRL,
+ (DIS_TSF_UDT0_NORMAL_CHIP|EN_BCN_FUNCTION
+ | EN_TXBCN_RPT|EN_MBSSID));
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
"Set Network type to AP!\n");
break;
@@ -1364,12 +1365,7 @@ static int _rtl92cu_set_media_status(struct ieee80211_hw *hw,
"Network type %d not supported!\n", type);
goto error_out;
}
- rtl_write_byte(rtlpriv, (MSR), bt_msr);
rtlpriv->cfg->ops->led_control(hw, ledaction);
- if ((bt_msr & MSR_MASK) == MSR_AP)
- rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
- else
- rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x66);
return 0;
error_out:
return 1;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c b/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
index 133e395..7a00e92 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
@@ -647,6 +647,7 @@ void rtl92c_init_beacon_parameters(struct ieee80211_hw *hw,
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
+ rtl_write_word(rtlpriv, REG_BCN_CTRL, 0x1010);
rtl_write_word(rtlpriv, REG_TBTT_PROHIBIT, 0x6404);/* ms */
rtl_write_byte(rtlpriv, REG_DRVERLYINT, DRIVER_EARLY_INT_TIME);/*ms*/
rtl_write_byte(rtlpriv, REG_BCNDMATIM, BCN_DMA_ATIME_INT_TIME);
--
2.1.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] rtlwifi: rtl8192cu: Fix some beacon issue
2015-02-20 14:50 [PATCH] rtlwifi: rtl8192cu: Fix some beacon issue Taehee Yoo
@ 2015-02-20 16:58 ` Mike Turner
2015-02-20 17:22 ` ap420073 .
[not found] ` <CAMArcTXL7Ydka54p6HvRvP=LvFo+w56YnMMrSuUo+PnAsy1TbQ@mail.gmail.com>
2015-04-28 16:21 ` Kalle Valo
1 sibling, 2 replies; 9+ messages in thread
From: Mike Turner @ 2015-02-20 16:58 UTC (permalink / raw)
To: linux-wireless
Taehee Yoo <ap420073@...> writes:
>
> Sometimes rtl8192cu is not sending beacon frame.
> This patch fix this issue.
>
> Signed-off-by: Taehee Yoo <ap420073@...>
Tried this and it doesn't help. Beacon transmission still isn't
consistent. Can hostapd have an effect on this?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] rtlwifi: rtl8192cu: Fix some beacon issue
2015-02-20 16:58 ` Mike Turner
@ 2015-02-20 17:22 ` ap420073 .
[not found] ` <CAMArcTXL7Ydka54p6HvRvP=LvFo+w56YnMMrSuUo+PnAsy1TbQ@mail.gmail.com>
1 sibling, 0 replies; 9+ messages in thread
From: ap420073 . @ 2015-02-20 17:22 UTC (permalink / raw)
To: Mike Turner; +Cc: linux-wireless@vger.kernel.org
2015-02-21 1:58 GMT+09:00 Mike Turner <miketurner.forum@gmail.com>:
>
> Taehee Yoo <ap420073@...> writes:
>
> >
> > Sometimes rtl8192cu is not sending beacon frame.
> > This patch fix this issue.
> >
> > Signed-off-by: Taehee Yoo <ap420073@...>
>
>
>
> Tried this and it doesn't help. Beacon transmission still isn't
> consistent. Can hostapd have an effect on this?
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
can you tell me hostapd options and detailed situation?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] rtlwifi: rtl8192cu: Fix some beacon issue
[not found] ` <CAMArcTXL7Ydka54p6HvRvP=LvFo+w56YnMMrSuUo+PnAsy1TbQ@mail.gmail.com>
@ 2015-02-20 17:24 ` Mike Turner
2015-02-20 18:47 ` ap420073 .
0 siblings, 1 reply; 9+ messages in thread
From: Mike Turner @ 2015-02-20 17:24 UTC (permalink / raw)
To: ap420073 .; +Cc: linux-wireless@vger.kernel.org
On Fri, Feb 20, 2015 at 5:16 PM, ap420073 . <ap420073@gmail.com> wrote:
> can you tell me hostapd options and detailed situation?
> 2015-02-21 1:58 GMT+09:00 Mike Turner : > Taehee Yoo writes: > >> >>
> Sometimes rtl8192cu is not sending beacon frame. >> This patch fix this
> issue. >> >> Signed-off-by: Taehee Yoo > > > > Tried this and it doesn't
> help. Beacon transmission still isn't > consistent. Can hostapd have an
> effect on this? > > > -- > To unsubscribe from this list: send the line
> "unsubscribe linux-wireless" in > the body of a message to
> majordomo@vger.kernel.org > More majordomo info at
> http://vger.kernel.org/majordomo-info.html
hostapd.conf file here
interface=wlan0
driver=nl80211
channel=3
hw_mode=g
preamble=1
dtim_period=2
beacon_int=100
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=0
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
supported_rates=60 90 120 180 240 360 480 540
basic_rates=60 90 120 180 240
ssid=SSID_SETUP3
max_num_sta=5
macaddr_acl=0
auth_algs=3
ieee80211d=0
uapsd_advertisement_enabled=1
wep_rekey_period=0
own_ip_addr=127.0.0.1
wpa_group_rekey=0
wpa_strict_rekey=0
wpa_gmk_rekey=0
wpa_ptk_rekey=0
#ap_table_max_size=255
#ap_table_expiration_time=60
eap_server=1
disassoc_low_ack=1
ap_max_inactivity=4294967295
#WPA settings
#WPA algorithm used (WPA2 in this case)
wpa=2
#AP password
wpa_passphrase=Ssid_WIT
#WPA key mangement type
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
#encription algorithm
rsn_pairwise=CCMP
Hostapd version 1.0
Atmel ARM at91sam9g25 CPU on custom designed hardware using D-link
DWA-121 USB WiFi adaptor.
Test using '/etc/init.d/hostapd stop' and '/etc/init.d/hostapd start'
repeatedly.
Can get multiple working cycles before a failure, and can get multiple
failed cycles before correct transmission.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] rtlwifi: rtl8192cu: Fix some beacon issue
2015-02-20 17:24 ` Mike Turner
@ 2015-02-20 18:47 ` ap420073 .
2015-02-23 14:15 ` Mike Turner
0 siblings, 1 reply; 9+ messages in thread
From: ap420073 . @ 2015-02-20 18:47 UTC (permalink / raw)
To: Mike Turner; +Cc: linux-wireless@vger.kernel.org
hostapd 2.3 has no problem but i found problem that hostapd is not
starting in hostapd 1.0.
would you like to try testing hostapd 2.3?
2015-02-21 2:24 GMT+09:00 Mike Turner <miketurner.forum@gmail.com>:
> On Fri, Feb 20, 2015 at 5:16 PM, ap420073 . <ap420073@gmail.com> wrote:
>> can you tell me hostapd options and detailed situation?
>> 2015-02-21 1:58 GMT+09:00 Mike Turner : > Taehee Yoo writes: > >> >>
>> Sometimes rtl8192cu is not sending beacon frame. >> This patch fix this
>> issue. >> >> Signed-off-by: Taehee Yoo > > > > Tried this and it doesn't
>> help. Beacon transmission still isn't > consistent. Can hostapd have an
>> effect on this? > > > -- > To unsubscribe from this list: send the line
>> "unsubscribe linux-wireless" in > the body of a message to
>> majordomo@vger.kernel.org > More majordomo info at
>> http://vger.kernel.org/majordomo-info.html
>
> hostapd.conf file here
>
> interface=wlan0
> driver=nl80211
> channel=3
> hw_mode=g
> preamble=1
> dtim_period=2
> beacon_int=100
> logger_syslog=-1
> logger_syslog_level=0
> logger_stdout=-1
> logger_stdout_level=0
> dump_file=/tmp/hostapd.dump
> ctrl_interface=/var/run/hostapd
> ctrl_interface_group=0
> supported_rates=60 90 120 180 240 360 480 540
> basic_rates=60 90 120 180 240
> ssid=SSID_SETUP3
> max_num_sta=5
> macaddr_acl=0
> auth_algs=3
> ieee80211d=0
> uapsd_advertisement_enabled=1
> wep_rekey_period=0
> own_ip_addr=127.0.0.1
> wpa_group_rekey=0
> wpa_strict_rekey=0
> wpa_gmk_rekey=0
> wpa_ptk_rekey=0
> #ap_table_max_size=255
> #ap_table_expiration_time=60
> eap_server=1
> disassoc_low_ack=1
> ap_max_inactivity=4294967295
>
> #WPA settings
> #WPA algorithm used (WPA2 in this case)
> wpa=2
> #AP password
> wpa_passphrase=Ssid_WIT
> #WPA key mangement type
> wpa_key_mgmt=WPA-PSK
> wpa_pairwise=TKIP
> #encription algorithm
> rsn_pairwise=CCMP
>
> Hostapd version 1.0
>
> Atmel ARM at91sam9g25 CPU on custom designed hardware using D-link
> DWA-121 USB WiFi adaptor.
>
> Test using '/etc/init.d/hostapd stop' and '/etc/init.d/hostapd start'
> repeatedly.
> Can get multiple working cycles before a failure, and can get multiple
> failed cycles before correct transmission.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] rtlwifi: rtl8192cu: Fix some beacon issue
2015-02-20 18:47 ` ap420073 .
@ 2015-02-23 14:15 ` Mike Turner
0 siblings, 0 replies; 9+ messages in thread
From: Mike Turner @ 2015-02-23 14:15 UTC (permalink / raw)
To: ap420073 .; +Cc: linux-wireless@vger.kernel.org
On Fri, Feb 20, 2015 at 6:47 PM, ap420073 . <ap420073@gmail.com> wrote:
> hostapd 2.3 has no problem but i found problem that hostapd is not
> starting in hostapd 1.0.
>
> would you like to try testing hostapd 2.3?
>
Unfortunately v2.3 has the some problem. After a few cycles of
/etc/init.d/hostapd stop and start it sometimes stops sending the
beacon. Further cycles may or may not start sending beacons as per my
original posts.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] rtlwifi: rtl8192cu: Fix some beacon issue
2015-02-20 14:50 [PATCH] rtlwifi: rtl8192cu: Fix some beacon issue Taehee Yoo
2015-02-20 16:58 ` Mike Turner
@ 2015-04-28 16:21 ` Kalle Valo
2015-04-28 16:40 ` Taehee Yoo
1 sibling, 1 reply; 9+ messages in thread
From: Kalle Valo @ 2015-04-28 16:21 UTC (permalink / raw)
To: Taehee Yoo, Larry.Finger; +Cc: linux-wireless
Taehee Yoo <ap420073@gmail.com> writes:
> Sometimes rtl8192cu is not sending beacon frame.
> This patch fix this issue.
>
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Larry, what do you think? Should I apply this?
https://patchwork.kernel.org/patch/5856761/
--
Kalle Valo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] rtlwifi: rtl8192cu: Fix some beacon issue
2015-04-28 16:21 ` Kalle Valo
@ 2015-04-28 16:40 ` Taehee Yoo
2015-04-29 0:53 ` Larry Finger
0 siblings, 1 reply; 9+ messages in thread
From: Taehee Yoo @ 2015-04-28 16:40 UTC (permalink / raw)
To: Kalle Valo; +Cc: Larry Finger, linux-wireless@vger.kernel.org
2015-04-29 1:21 GMT+09:00 Kalle Valo <kvalo@codeaurora.org>:
> Taehee Yoo <ap420073@gmail.com> writes:
>
>> Sometimes rtl8192cu is not sending beacon frame.
>> This patch fix this issue.
>>
>> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
>
> Larry, what do you think? Should I apply this?
>
> https://patchwork.kernel.org/patch/5856761/
>
> --
> Kalle Valo
i think that it is incomplete patch.
because it can not solve Mike's problem.
Apologize about incomplete patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] rtlwifi: rtl8192cu: Fix some beacon issue
2015-04-28 16:40 ` Taehee Yoo
@ 2015-04-29 0:53 ` Larry Finger
0 siblings, 0 replies; 9+ messages in thread
From: Larry Finger @ 2015-04-29 0:53 UTC (permalink / raw)
To: Kalle Valo; +Cc: Taehee Yoo, linux-wireless@vger.kernel.org
On 04/28/2015 11:40 AM, Taehee Yoo wrote:
> 2015-04-29 1:21 GMT+09:00 Kalle Valo <kvalo@codeaurora.org>:
>> Taehee Yoo <ap420073@gmail.com> writes:
>>
>>> Sometimes rtl8192cu is not sending beacon frame.
>>> This patch fix this issue.
>>>
>>> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
>>
>> Larry, what do you think? Should I apply this?
>>
>> https://patchwork.kernel.org/patch/5856761/
>>
>> --
>> Kalle Valo
>
>
>
> i think that it is incomplete patch.
> because it can not solve Mike's problem.
>
> Apologize about incomplete patch.
Kalle,
I have not been able to reproduce the problem, thus I could not comment as to
whether the patch actually fixed anything.
Clearly, the patch should be dropped.
Thanks,
Larry
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-04-29 0:53 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-20 14:50 [PATCH] rtlwifi: rtl8192cu: Fix some beacon issue Taehee Yoo
2015-02-20 16:58 ` Mike Turner
2015-02-20 17:22 ` ap420073 .
[not found] ` <CAMArcTXL7Ydka54p6HvRvP=LvFo+w56YnMMrSuUo+PnAsy1TbQ@mail.gmail.com>
2015-02-20 17:24 ` Mike Turner
2015-02-20 18:47 ` ap420073 .
2015-02-23 14:15 ` Mike Turner
2015-04-28 16:21 ` Kalle Valo
2015-04-28 16:40 ` Taehee Yoo
2015-04-29 0:53 ` Larry Finger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).