author | Mengchun Li <mengchun.li@amlogic.com> | 2015-03-27 02:08:57 (GMT) |
---|---|---|
committer | Mengchun Li <mengchun.li@amlogic.com> | 2015-03-27 02:08:57 (GMT) |
commit | c7dbc3203819943380b04e9ffcdec09028887e22 (patch) | |
tree | aa93eed93222dc2dba90dd98f5e9959b56cfb6ef | |
parent | ef6f274531796fb67c74c12476a6097bc783e1b8 (diff) | |
download | 8723bu-c7dbc3203819943380b04e9ffcdec09028887e22.zip 8723bu-c7dbc3203819943380b04e9ffcdec09028887e22.tar.gz 8723bu-c7dbc3203819943380b04e9ffcdec09028887e22.tar.bz2 |
Fix rtl8723bu crash issue
Change-Id: I5a232090e8663a565b29eea8733271a13f43d810
-rwxr-xr-x | rtl8723BU/os_dep/linux/os_intfs.c | 17 | ||||
-rwxr-xr-x | rtl8723BU/os_dep/linux/wifi_regd.c | 13 |
2 files changed, 19 insertions, 11 deletions
diff --git a/rtl8723BU/os_dep/linux/os_intfs.c b/rtl8723BU/os_dep/linux/os_intfs.c index 379e11c..e5bd8e5 100755 --- a/rtl8723BU/os_dep/linux/os_intfs.c +++ b/rtl8723BU/os_dep/linux/os_intfs.c @@ -603,12 +603,11 @@ unsigned int rtw_classify8021d(struct sk_buff *skb) static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) - , void *accel_priv -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) - , select_queue_fallback_t fallback +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) + , void *accel_priv #endif - +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + , select_queue_fallback_t fallback #endif ) { @@ -655,9 +654,13 @@ u16 rtw_recv_select_queue(struct sk_buff *skb) #endif -static int rtw_ndev_notifier_call(struct notifier_block * nb, unsigned long state, void *ndev) +static int rtw_ndev_notifier_call(struct notifier_block * nb, unsigned long state, void *ptr) { - struct net_device *dev = ndev; +#if (LINUX_VERSION_CODE>=KERNEL_VERSION(3,11,0)) + struct net_device *dev = netdev_notifier_info_to_dev(ptr); +#else + struct net_device *dev = ptr; +#endif #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29)) if (dev->netdev_ops->ndo_do_ioctl != rtw_ioctl) diff --git a/rtl8723BU/os_dep/linux/wifi_regd.c b/rtl8723BU/os_dep/linux/wifi_regd.c index a43370a..d893741 100755 --- a/rtl8723BU/os_dep/linux/wifi_regd.c +++ b/rtl8723BU/os_dep/linux/wifi_regd.c @@ -268,10 +268,15 @@ static void _rtw_reg_apply_radar_flags(struct wiphy *wiphy) if (!_rtw_is_radar_freq(ch->center_freq)) continue; #ifdef CONFIG_DFS - if (!(ch->flags & IEEE80211_CHAN_DISABLED)) - ch->flags |= IEEE80211_CHAN_RADAR | - IEEE80211_CHAN_NO_IBSS; -#endif + if (!(ch->flags & IEEE80211_CHAN_DISABLED)) { + ch->flags |= IEEE80211_CHAN_RADAR; + #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)) + ch->flags |= (IEEE80211_CHAN_NO_IBSS|IEEE80211_CHAN_PASSIVE_SCAN); + #else + ch->flags |= IEEE80211_CHAN_NO_IR; + #endif + } +#endif //CONFIG_DFS #if 0 /* |