View | Details | Raw Unified | Return to bug 57171 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c (-34 / +100 lines)
Lines 1973-1998 void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) Link Here
1973
	}
1973
	}
1974
}
1974
}
1975
1975
1976
void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw,
1976
static void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw,
1977
				   struct ieee80211_sta *sta,
1977
					  struct ieee80211_sta *sta)
1978
				   u8 rssi_level)
1979
{
1978
{
1980
	struct rtl_priv *rtlpriv = rtl_priv(hw);
1979
	struct rtl_priv *rtlpriv = rtl_priv(hw);
1981
	struct rtl_phy *rtlphy = &(rtlpriv->phy);
1980
	struct rtl_phy *rtlphy = &(rtlpriv->phy);
1982
	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
1981
	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
1983
	u32 ratr_value = (u32) mac->basic_rates;
1982
	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
1984
	u8 *mcsrate = mac->mcs;
1983
	u32 ratr_value;
1985
	u8 ratr_index = 0;
1984
	u8 ratr_index = 0;
1986
	u8 nmode = mac->ht_enable;
1985
	u8 nmode = mac->ht_enable;
1987
	u8 mimo_ps = 1;
1986
	u8 mimo_ps = IEEE80211_SMPS_OFF;
1988
	u16 shortgi_rate = 0;
1987
	u16 shortgi_rate;
1989
	u32 tmp_ratr_value = 0;
1988
	u32 tmp_ratr_value;
1990
	u8 curtxbw_40mhz = mac->bw_40;
1989
	u8 curtxbw_40mhz = mac->bw_40;
1991
	u8 curshortgi_40mhz = mac->sgi_40;
1990
	u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ?
1992
	u8 curshortgi_20mhz = mac->sgi_20;
1991
			       1 : 0;
1992
	u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ?
1993
			       1 : 0;
1993
	enum wireless_mode wirelessmode = mac->mode;
1994
	enum wireless_mode wirelessmode = mac->mode;
1994
1995
1995
	ratr_value |= ((*(u16 *) (mcsrate))) << 12;
1996
	if (rtlhal->current_bandtype == BAND_ON_5G)
1997
		ratr_value = sta->supp_rates[1] << 4;
1998
	else
1999
		ratr_value = sta->supp_rates[0];
2000
	if (mac->opmode == NL80211_IFTYPE_ADHOC)
2001
		ratr_value = 0xfff;
2002
2003
	ratr_value |= (sta->ht_cap.mcs.rx_mask[1] << 20 |
2004
			sta->ht_cap.mcs.rx_mask[0] << 12);
1996
	switch (wirelessmode) {
2005
	switch (wirelessmode) {
1997
	case WIRELESS_MODE_B:
2006
	case WIRELESS_MODE_B:
1998
		if (ratr_value & 0x0000000c)
2007
		if (ratr_value & 0x0000000c)
Lines 2006-2012 void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw, Link Here
2006
	case WIRELESS_MODE_N_24G:
2015
	case WIRELESS_MODE_N_24G:
2007
	case WIRELESS_MODE_N_5G:
2016
	case WIRELESS_MODE_N_5G:
2008
		nmode = 1;
2017
		nmode = 1;
2009
		if (mimo_ps == 0) {
2018
		if (mimo_ps == IEEE80211_SMPS_STATIC) {
2010
			ratr_value &= 0x0007F005;
2019
			ratr_value &= 0x0007F005;
2011
		} else {
2020
		} else {
2012
			u32 ratr_mask;
2021
			u32 ratr_mask;
Lines 2016-2023 void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw, Link Here
2016
				ratr_mask = 0x000ff005;
2025
				ratr_mask = 0x000ff005;
2017
			else
2026
			else
2018
				ratr_mask = 0x0f0ff005;
2027
				ratr_mask = 0x0f0ff005;
2019
			if (curtxbw_40mhz)
2028
2020
				ratr_mask |= 0x00000010;
2021
			ratr_value &= ratr_mask;
2029
			ratr_value &= ratr_mask;
2022
		}
2030
		}
2023
		break;
2031
		break;
Lines 2026-2066 void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw, Link Here
2026
			ratr_value &= 0x000ff0ff;
2034
			ratr_value &= 0x000ff0ff;
2027
		else
2035
		else
2028
			ratr_value &= 0x0f0ff0ff;
2036
			ratr_value &= 0x0f0ff0ff;
2037
2029
		break;
2038
		break;
2030
	}
2039
	}
2040
2031
	ratr_value &= 0x0FFFFFFF;
2041
	ratr_value &= 0x0FFFFFFF;
2032
	if (nmode && ((curtxbw_40mhz && curshortgi_40mhz) ||
2042
2033
	    (!curtxbw_40mhz && curshortgi_20mhz))) {
2043
	if (nmode && ((curtxbw_40mhz &&
2044
			 curshortgi_40mhz) || (!curtxbw_40mhz &&
2045
					       curshortgi_20mhz))) {
2046
2034
		ratr_value |= 0x10000000;
2047
		ratr_value |= 0x10000000;
2035
		tmp_ratr_value = (ratr_value >> 12);
2048
		tmp_ratr_value = (ratr_value >> 12);
2049
2036
		for (shortgi_rate = 15; shortgi_rate > 0; shortgi_rate--) {
2050
		for (shortgi_rate = 15; shortgi_rate > 0; shortgi_rate--) {
2037
			if ((1 << shortgi_rate) & tmp_ratr_value)
2051
			if ((1 << shortgi_rate) & tmp_ratr_value)
2038
				break;
2052
				break;
2039
		}
2053
		}
2054
2040
		shortgi_rate = (shortgi_rate << 12) | (shortgi_rate << 8) |
2055
		shortgi_rate = (shortgi_rate << 12) | (shortgi_rate << 8) |
2041
			       (shortgi_rate << 4) | (shortgi_rate);
2056
		    (shortgi_rate << 4) | (shortgi_rate);
2042
	}
2057
	}
2058
2043
	rtl_write_dword(rtlpriv, REG_ARFR0 + ratr_index * 4, ratr_value);
2059
	rtl_write_dword(rtlpriv, REG_ARFR0 + ratr_index * 4, ratr_value);
2060
2061
	RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG, "%x\n",
2062
		 rtl_read_dword(rtlpriv, REG_ARFR0));
2044
}
2063
}
2045
2064
2046
void rtl92cu_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level)
2065
static void rtl92cu_update_hal_rate_mask(struct ieee80211_hw *hw,
2066
					 struct ieee80211_sta *sta,
2067
					 u8 rssi_level)
2047
{
2068
{
2048
	struct rtl_priv *rtlpriv = rtl_priv(hw);
2069
	struct rtl_priv *rtlpriv = rtl_priv(hw);
2049
	struct rtl_phy *rtlphy = &(rtlpriv->phy);
2070
	struct rtl_phy *rtlphy = &(rtlpriv->phy);
2050
	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
2071
	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
2051
	u32 ratr_bitmap = (u32) mac->basic_rates;
2072
	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
2052
	u8 *p_mcsrate = mac->mcs;
2073
	struct rtl_sta_info *sta_entry = NULL;
2053
	u8 ratr_index = 0;
2074
	u32 ratr_bitmap;
2054
	u8 curtxbw_40mhz = mac->bw_40;
2075
	u8 ratr_index;
2055
	u8 curshortgi_40mhz = mac->sgi_40;
2076
	u8 curtxbw_40mhz = (sta->bandwidth >= IEEE80211_STA_RX_BW_40) ? 1 : 0;
2056
	u8 curshortgi_20mhz = mac->sgi_20;
2077
	u8 curshortgi_40mhz = curtxbw_40mhz &&
2057
	enum wireless_mode wirelessmode = mac->mode;
2078
			      (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ?
2079
				1 : 0;
2080
	u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ?
2081
				1 : 0;
2082
	enum wireless_mode wirelessmode = 0;
2058
	bool shortgi = false;
2083
	bool shortgi = false;
2059
	u8 rate_mask[5];
2084
	u8 rate_mask[5];
2060
	u8 macid = 0;
2085
	u8 macid = 0;
2061
	u8 mimops = 1;
2086
	u8 mimo_ps = IEEE80211_SMPS_OFF;
2062
2087
2063
	ratr_bitmap |= (p_mcsrate[1] << 20) | (p_mcsrate[0] << 12);
2088
	sta_entry = (struct rtl_sta_info *) sta->drv_priv;
2089
	wirelessmode = sta_entry->wireless_mode;
2090
	if (mac->opmode == NL80211_IFTYPE_STATION ||
2091
	    mac->opmode == NL80211_IFTYPE_MESH_POINT)
2092
		curtxbw_40mhz = mac->bw_40;
2093
	else if (mac->opmode == NL80211_IFTYPE_AP ||
2094
		mac->opmode == NL80211_IFTYPE_ADHOC)
2095
		macid = sta->aid + 1;
2096
2097
	if (rtlhal->current_bandtype == BAND_ON_5G)
2098
		ratr_bitmap = sta->supp_rates[1] << 4;
2099
	else
2100
		ratr_bitmap = sta->supp_rates[0];
2101
	if (mac->opmode == NL80211_IFTYPE_ADHOC)
2102
		ratr_bitmap = 0xfff;
2103
	ratr_bitmap |= (sta->ht_cap.mcs.rx_mask[1] << 20 |
2104
			sta->ht_cap.mcs.rx_mask[0] << 12);
2064
	switch (wirelessmode) {
2105
	switch (wirelessmode) {
2065
	case WIRELESS_MODE_B:
2106
	case WIRELESS_MODE_B:
2066
		ratr_index = RATR_INX_WIRELESS_B;
2107
		ratr_index = RATR_INX_WIRELESS_B;
Lines 2071-2076 void rtl92cu_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level) Link Here
2071
		break;
2112
		break;
2072
	case WIRELESS_MODE_G:
2113
	case WIRELESS_MODE_G:
2073
		ratr_index = RATR_INX_WIRELESS_GB;
2114
		ratr_index = RATR_INX_WIRELESS_GB;
2115
2074
		if (rssi_level == 1)
2116
		if (rssi_level == 1)
2075
			ratr_bitmap &= 0x00000f00;
2117
			ratr_bitmap &= 0x00000f00;
2076
		else if (rssi_level == 2)
2118
		else if (rssi_level == 2)
Lines 2085-2091 void rtl92cu_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level) Link Here
2085
	case WIRELESS_MODE_N_24G:
2127
	case WIRELESS_MODE_N_24G:
2086
	case WIRELESS_MODE_N_5G:
2128
	case WIRELESS_MODE_N_5G:
2087
		ratr_index = RATR_INX_WIRELESS_NGB;
2129
		ratr_index = RATR_INX_WIRELESS_NGB;
2088
		if (mimops == 0) {
2130
2131
		if (mimo_ps == IEEE80211_SMPS_STATIC) {
2089
			if (rssi_level == 1)
2132
			if (rssi_level == 1)
2090
				ratr_bitmap &= 0x00070000;
2133
				ratr_bitmap &= 0x00070000;
2091
			else if (rssi_level == 2)
2134
			else if (rssi_level == 2)
Lines 2128-2135 void rtl92cu_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level) Link Here
2128
				}
2171
				}
2129
			}
2172
			}
2130
		}
2173
		}
2174
2131
		if ((curtxbw_40mhz && curshortgi_40mhz) ||
2175
		if ((curtxbw_40mhz && curshortgi_40mhz) ||
2132
		    (!curtxbw_40mhz && curshortgi_20mhz)) {
2176
		    (!curtxbw_40mhz && curshortgi_20mhz)) {
2177
2133
			if (macid == 0)
2178
			if (macid == 0)
2134
				shortgi = true;
2179
				shortgi = true;
2135
			else if (macid == 1)
2180
			else if (macid == 1)
Lines 2138-2158 void rtl92cu_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level) Link Here
2138
		break;
2183
		break;
2139
	default:
2184
	default:
2140
		ratr_index = RATR_INX_WIRELESS_NGB;
2185
		ratr_index = RATR_INX_WIRELESS_NGB;
2186
2141
		if (rtlphy->rf_type == RF_1T2R)
2187
		if (rtlphy->rf_type == RF_1T2R)
2142
			ratr_bitmap &= 0x000ff0ff;
2188
			ratr_bitmap &= 0x000ff0ff;
2143
		else
2189
		else
2144
			ratr_bitmap &= 0x0f0ff0ff;
2190
			ratr_bitmap &= 0x0f0ff0ff;
2145
		break;
2191
		break;
2146
	}
2192
	}
2147
	RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG, "ratr_bitmap :%x\n",
2193
	sta_entry->ratr_index = ratr_index;
2148
		 ratr_bitmap);
2194
2149
	*(u32 *)&rate_mask = ((ratr_bitmap & 0x0fffffff) |
2195
	RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG,
2150
				      ratr_index << 28);
2196
		 "ratr_bitmap :%x\n", ratr_bitmap);
2197
	*(u32 *)&rate_mask = (ratr_bitmap & 0x0fffffff) |
2198
				     (ratr_index << 28);
2151
	rate_mask[4] = macid | (shortgi ? 0x20 : 0x00) | 0x80;
2199
	rate_mask[4] = macid | (shortgi ? 0x20 : 0x00) | 0x80;
2152
	RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG,
2200
	RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG,
2153
		 "Rate_index:%x, ratr_val:%x, %5phC\n",
2201
		 "Rate_index:%x, ratr_val:%x, %5phC\n",
2154
		 ratr_index, ratr_bitmap, rate_mask);
2202
		 ratr_index, ratr_bitmap, rate_mask);
2155
	rtl92c_fill_h2c_cmd(hw, H2C_RA_MASK, 5, rate_mask);
2203
	memcpy(rtlpriv->rate_mask, rate_mask, 5);
2204
	/* rtl92c_fill_h2c_cmd() does USB I/O and will result in a
2205
	 * "scheduled while atomic" if called directly */
2206
	schedule_work(&rtlpriv->works.fill_h2c_cmd);
2207
2208
	if (macid != 0)
2209
		sta_entry->ratr_index = ratr_index;
2210
}
2211
2212
void rtl92cu_update_hal_rate_tbl(struct ieee80211_hw *hw,
2213
				 struct ieee80211_sta *sta,
2214
				 u8 rssi_level)
2215
{
2216
	struct rtl_priv *rtlpriv = rtl_priv(hw);
2217
2218
	if (rtlpriv->dm.useramask)
2219
		rtl92cu_update_hal_rate_mask(hw, sta, rssi_level);
2220
	else
2221
		rtl92cu_update_hal_rate_table(hw, sta);
2156
}
2222
}
2157
2223
2158
void rtl92cu_update_channel_access_setting(struct ieee80211_hw *hw)
2224
void rtl92cu_update_channel_access_setting(struct ieee80211_hw *hw)
(-)a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h (-4 lines)
Lines 98-107 void rtl92cu_update_interrupt_mask(struct ieee80211_hw *hw, Link Here
98
				   u32 add_msr, u32 rm_msr);
98
				   u32 add_msr, u32 rm_msr);
99
void rtl92cu_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
99
void rtl92cu_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
100
void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
100
void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
101
void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw,
102
				   struct ieee80211_sta *sta,
103
				   u8 rssi_level);
104
void rtl92cu_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level);
105
101
106
void rtl92cu_update_channel_access_setting(struct ieee80211_hw *hw);
102
void rtl92cu_update_channel_access_setting(struct ieee80211_hw *hw);
107
bool rtl92cu_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 * valid);
103
bool rtl92cu_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 * valid);
(-)a/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c (-1 / +17 lines)
Lines 289-302 void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index, Link Here
289
				macaddr = cam_const_broad;
289
				macaddr = cam_const_broad;
290
				entry_id = key_index;
290
				entry_id = key_index;
291
			} else {
291
			} else {
292
				if (mac->opmode == NL80211_IFTYPE_AP ||
293
				    mac->opmode == NL80211_IFTYPE_MESH_POINT) {
294
					entry_id = rtl_cam_get_free_entry(hw,
295
								 p_macaddr);
296
					if (entry_id >=  TOTAL_CAM_ENTRY) {
297
						RT_TRACE(rtlpriv, COMP_SEC,
298
							 DBG_EMERG,
299
							 "Can not find free hw security cam entry\n");
300
						return;
301
					}
302
				} else {
303
					entry_id = CAM_PAIRWISE_KEY_POSITION;
304
				}
305
292
				key_index = PAIRWISE_KEYIDX;
306
				key_index = PAIRWISE_KEYIDX;
293
				entry_id = CAM_PAIRWISE_KEY_POSITION;
294
				is_pairwise = true;
307
				is_pairwise = true;
295
			}
308
			}
296
		}
309
		}
297
		if (rtlpriv->sec.key_len[key_index] == 0) {
310
		if (rtlpriv->sec.key_len[key_index] == 0) {
298
			RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
311
			RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
299
				 "delete one entry\n");
312
				 "delete one entry\n");
313
			if (mac->opmode == NL80211_IFTYPE_AP ||
314
			    mac->opmode == NL80211_IFTYPE_MESH_POINT)
315
				rtl_cam_del_entry(hw, p_macaddr);
300
			rtl_cam_delete_one_entry(hw, p_macaddr, entry_id);
316
			rtl_cam_delete_one_entry(hw, p_macaddr, entry_id);
301
		} else {
317
		} else {
302
			RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD,
318
			RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD,
(-)a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c (-2 / +2 lines)
Lines 106-113 static struct rtl_hal_ops rtl8192cu_hal_ops = { Link Here
106
	.update_interrupt_mask = rtl92cu_update_interrupt_mask,
106
	.update_interrupt_mask = rtl92cu_update_interrupt_mask,
107
	.get_hw_reg = rtl92cu_get_hw_reg,
107
	.get_hw_reg = rtl92cu_get_hw_reg,
108
	.set_hw_reg = rtl92cu_set_hw_reg,
108
	.set_hw_reg = rtl92cu_set_hw_reg,
109
	.update_rate_tbl = rtl92cu_update_hal_rate_table,
109
	.update_rate_tbl = rtl92cu_update_hal_rate_tbl,
110
	.update_rate_mask = rtl92cu_update_hal_rate_mask,
111
	.fill_tx_desc = rtl92cu_tx_fill_desc,
110
	.fill_tx_desc = rtl92cu_tx_fill_desc,
112
	.fill_fake_txdesc = rtl92cu_fill_fake_txdesc,
111
	.fill_fake_txdesc = rtl92cu_fill_fake_txdesc,
113
	.fill_tx_cmddesc = rtl92cu_tx_fill_cmddesc,
112
	.fill_tx_cmddesc = rtl92cu_tx_fill_cmddesc,
Lines 137-142 static struct rtl_hal_ops rtl8192cu_hal_ops = { Link Here
137
	.phy_lc_calibrate = _rtl92cu_phy_lc_calibrate,
136
	.phy_lc_calibrate = _rtl92cu_phy_lc_calibrate,
138
	.phy_set_bw_mode_callback = rtl92cu_phy_set_bw_mode_callback,
137
	.phy_set_bw_mode_callback = rtl92cu_phy_set_bw_mode_callback,
139
	.dm_dynamic_txpower = rtl92cu_dm_dynamic_txpower,
138
	.dm_dynamic_txpower = rtl92cu_dm_dynamic_txpower,
139
	.fill_h2c_cmd = rtl92c_fill_h2c_cmd,
140
};
140
};
141
141
142
static struct rtl_mod_params rtl92cu_mod_params = {
142
static struct rtl_mod_params rtl92cu_mod_params = {
(-)a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h (+3 lines)
Lines 49-53 bool rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw, Link Here
49
u32 rtl92cu_phy_query_rf_reg(struct ieee80211_hw *hw,
49
u32 rtl92cu_phy_query_rf_reg(struct ieee80211_hw *hw,
50
			    enum radio_path rfpath, u32 regaddr, u32 bitmask);
50
			    enum radio_path rfpath, u32 regaddr, u32 bitmask);
51
void rtl92cu_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
51
void rtl92cu_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
52
void rtl92cu_update_hal_rate_tbl(struct ieee80211_hw *hw,
53
				 struct ieee80211_sta *sta,
54
				 u8 rssi_level);
52
55
53
#endif
56
#endif
(-)a/drivers/net/wireless/rtlwifi/usb.c (+13 lines)
Lines 824-829 static void rtl_usb_stop(struct ieee80211_hw *hw) Link Here
824
824
825
	/* should after adapter start and interrupt enable. */
825
	/* should after adapter start and interrupt enable. */
826
	set_hal_stop(rtlhal);
826
	set_hal_stop(rtlhal);
827
	cancel_work_sync(&rtlpriv->works.fill_h2c_cmd);
827
	/* Enable software */
828
	/* Enable software */
828
	SET_USB_STOP(rtlusb);
829
	SET_USB_STOP(rtlusb);
829
	rtl_usb_deinit(hw);
830
	rtl_usb_deinit(hw);
Lines 1026-1031 static bool rtl_usb_tx_chk_waitq_insert(struct ieee80211_hw *hw, Link Here
1026
	return false;
1027
	return false;
1027
}
1028
}
1028
1029
1030
static void rtl_fill_h2c_cmd_work_callback(struct work_struct *work)
1031
{
1032
	struct rtl_works *rtlworks =
1033
	    container_of(work, struct rtl_works, fill_h2c_cmd);
1034
	struct ieee80211_hw *hw = rtlworks->hw;
1035
	struct rtl_priv *rtlpriv = rtl_priv(hw);
1036
1037
	rtlpriv->cfg->ops->fill_h2c_cmd(hw, H2C_RA_MASK, 5, rtlpriv->rate_mask);
1038
}
1039
1029
static struct rtl_intf_ops rtl_usb_ops = {
1040
static struct rtl_intf_ops rtl_usb_ops = {
1030
	.adapter_start = rtl_usb_start,
1041
	.adapter_start = rtl_usb_start,
1031
	.adapter_stop = rtl_usb_stop,
1042
	.adapter_stop = rtl_usb_stop,
Lines 1057-1062 int rtl_usb_probe(struct usb_interface *intf, Link Here
1057
1068
1058
	/* this spin lock must be initialized early */
1069
	/* this spin lock must be initialized early */
1059
	spin_lock_init(&rtlpriv->locks.usb_lock);
1070
	spin_lock_init(&rtlpriv->locks.usb_lock);
1071
	INIT_WORK(&rtlpriv->works.fill_h2c_cmd,
1072
		  rtl_fill_h2c_cmd_work_callback);
1060
1073
1061
	rtlpriv->usb_data_index = 0;
1074
	rtlpriv->usb_data_index = 0;
1062
	init_completion(&rtlpriv->firmware_loading_complete);
1075
	init_completion(&rtlpriv->firmware_loading_complete);
(-)a/drivers/net/wireless/rtlwifi/wifi.h (-1 / +4 lines)
Lines 1736-1741 struct rtl_hal_ops { Link Here
1736
	void (*bt_wifi_media_status_notify) (struct ieee80211_hw *hw,
1736
	void (*bt_wifi_media_status_notify) (struct ieee80211_hw *hw,
1737
					     bool mstate);
1737
					     bool mstate);
1738
	void (*bt_coex_off_before_lps) (struct ieee80211_hw *hw);
1738
	void (*bt_coex_off_before_lps) (struct ieee80211_hw *hw);
1739
	void (*fill_h2c_cmd) (struct ieee80211_hw *hw, u8 element_id,
1740
			      u32 cmd_len, u8 *p_cmdbuffer);
1739
};
1741
};
1740
1742
1741
struct rtl_intf_ops {
1743
struct rtl_intf_ops {
Lines 1869-1874 struct rtl_works { Link Here
1869
	struct delayed_work fwevt_wq;
1871
	struct delayed_work fwevt_wq;
1870
1872
1871
	struct work_struct lps_change_work;
1873
	struct work_struct lps_change_work;
1874
	struct work_struct fill_h2c_cmd;
1872
};
1875
};
1873
1876
1874
struct rtl_debug {
1877
struct rtl_debug {
Lines 2048-2053 struct rtl_priv { Link Here
2048
		};
2051
		};
2049
	};
2052
	};
2050
	bool enter_ps;	/* true when entering PS */
2053
	bool enter_ps;	/* true when entering PS */
2054
	u8 rate_mask[5];
2051
2055
2052
	/*This must be the last item so
2056
	/*This must be the last item so
2053
	   that it points to the data allocated
2057
	   that it points to the data allocated
2054
- 

Return to bug 57171