Skip to content

Commit

Permalink
rtlwifi: Initialize rate_init member of struct rate_control_ops
Browse files Browse the repository at this point in the history
This partially reverts commit 44ba973.

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 44ba973
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>
  • Loading branch information
Catalin Iacob authored and John W. Linville committed Feb 12, 2013
1 parent 4fe0c75 commit c88d0dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/wireless/rtlwifi/rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ static void rtl_tx_status(void *ppriv,
}
}

static void rtl_rate_init(void *ppriv,
struct ieee80211_supported_band *sband,
struct ieee80211_sta *sta, void *priv_sta)
{
}

static void *rtl_rate_alloc(struct ieee80211_hw *hw,
struct dentry *debugfsdir)
{
Expand Down Expand Up @@ -261,6 +267,7 @@ static struct rate_control_ops rtl_rate_ops = {
.free = rtl_rate_free,
.alloc_sta = rtl_rate_alloc_sta,
.free_sta = rtl_rate_free_sta,
.rate_init = rtl_rate_init,
.tx_status = rtl_tx_status,
.get_rate = rtl_get_rate,
};
Expand Down

0 comments on commit c88d0dc

Please sign in to comment.