netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3.18] rtlwifi: Add check for get_btc_status callback
@ 2014-10-23 16:27 Larry Finger
  2014-10-23 18:08 ` Mike Galbraith
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Larry Finger @ 2014-10-23 16:27 UTC (permalink / raw)
  To: linville-2XuSBdqkA4R54TAoqtyWWQ
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	troy_tan-kXabqFNEczNtrwSWzY7KCg, Larry Finger,
	netdev-u79uwXL29TY76Z2rM5mHXA, Murilo Opsfelder Araujo,
	Mike Galbraith, Thadeu Cascardo

Drivers that do not use the get_btc_status() callback may not define a
dummy routine. The caller needs to check before making the call.

Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
Cc: Murilo Opsfelder Araujo <mopsfelder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Mike Galbraith <umgwanakikbuti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Thadeu Cascardo <cascardo-s4Flwc3xefXVny7hquFfmQ@public.gmane.org>
---

John,

This missing statement is causing kernel crashes for several of the drivers.
This patch should be applied ASAP.

Larry
---

 drivers/net/wireless/rtlwifi/pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 667aba8..25daa87 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -1796,7 +1796,8 @@ static int rtl_pci_start(struct ieee80211_hw *hw)
 	rtl_pci_reset_trx_ring(hw);
 
 	rtlpci->driver_is_goingto_unload = false;
-	if (rtlpriv->cfg->ops->get_btc_status()) {
+	if (rtlpriv->cfg->ops->get_btc_status &&
+	    rtlpriv->cfg->ops->get_btc_status()) {
 		rtlpriv->btcoexist.btc_ops->btc_init_variables(rtlpriv);
 		rtlpriv->btcoexist.btc_ops->btc_init_hal_vars(rtlpriv);
 	}
-- 
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-10-29  1:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23 16:27 [PATCH V3.18] rtlwifi: Add check for get_btc_status callback Larry Finger
2014-10-23 18:08 ` Mike Galbraith
2014-10-23 18:23   ` Larry Finger
2014-10-24  2:09     ` Mike Galbraith
2014-10-24 16:39       ` Larry Finger
2014-10-24 18:13         ` Murilo Opsfelder Araujo
     [not found]           ` <544A96C0.8030107-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-24 19:09             ` Murilo Opsfelder Araujo
2014-10-25  2:57               ` Mike Galbraith
2014-10-23 18:26 ` Murilo Opsfelder Araujo
2014-10-29  1:43 ` Murilo Opsfelder Araujo

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).