aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Iacob <iacobcatalin@gmail.com>2013-02-11 16:18:05 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-02-12 11:09:04 -0500
commitc88d0dc1cc0182358ce1ae6f457dace34539eb12 (patch)
tree4905ccdddbb00683566d9d9c603c27695cbd601c
parent4fe0c75eedb15af13859ef123db17fefed5af7ae (diff)
rtlwifi: Initialize rate_init member of struct rate_control_ops
This partially reverts commit 44ba973699b831414c3f8eef68ee5a7fe1208a05. rate_control_rate_init assumes the rate_init member of struct rate_control_ops is not NULL therefore not initializing it leads to an oops as soon the driver succesfully associates to an AP. The removal of rate_update from 44ba973699b831414c3f8eef68ee5a7fe1208a05 is ok because rate_update is checked for NULL before being called. Signed-off-by: Catalin Iacob <iacobcatalin@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/rtlwifi/rc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtlwifi/rc.c b/drivers/net/wireless/rtlwifi/rc.c
index 204f46c4510d..6ad8bb758961 100644
--- a/drivers/net/wireless/rtlwifi/rc.c
+++ b/drivers/net/wireless/rtlwifi/rc.c
@@ -217,6 +217,12 @@ static void rtl_tx_status(void *ppriv,
217 } 217 }
218} 218}
219 219
220static void rtl_rate_init(void *ppriv,
221 struct ieee80211_supported_band *sband,
222 struct ieee80211_sta *sta, void *priv_sta)
223{
224}
225
220static void *rtl_rate_alloc(struct ieee80211_hw *hw, 226static void *rtl_rate_alloc(struct ieee80211_hw *hw,
221 struct dentry *debugfsdir) 227 struct dentry *debugfsdir)
222{ 228{
@@ -261,6 +267,7 @@ static struct rate_control_ops rtl_rate_ops = {
261 .free = rtl_rate_free, 267 .free = rtl_rate_free,
262 .alloc_sta = rtl_rate_alloc_sta, 268 .alloc_sta = rtl_rate_alloc_sta,
263 .free_sta = rtl_rate_free_sta, 269 .free_sta = rtl_rate_free_sta,
270 .rate_init = rtl_rate_init,
264 .tx_status = rtl_tx_status, 271 .tx_status = rtl_tx_status,
265 .get_rate = rtl_get_rate, 272 .get_rate = rtl_get_rate,
266}; 273};