File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
drivers/net/wireless/mediatek/mt76/mt7921 Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -171,12 +171,12 @@ mt7921_mac_init_band(struct mt7921_dev *dev, u8 band)
171
171
172
172
u8 mt7921_check_offload_capability (struct device * dev , const char * fw_wm )
173
173
{
174
- struct mt7921_fw_features * features = NULL ;
175
174
const struct mt76_connac2_fw_trailer * hdr ;
176
175
struct mt7921_realease_info * rel_info ;
177
176
const struct firmware * fw ;
178
177
int ret , i , offset = 0 ;
179
178
const u8 * data , * end ;
179
+ u8 offload_caps = 0 ;
180
180
181
181
ret = request_firmware (& fw , fw_wm , dev );
182
182
if (ret )
@@ -208,7 +208,10 @@ u8 mt7921_check_offload_capability(struct device *dev, const char *fw_wm)
208
208
data += sizeof (* rel_info );
209
209
210
210
if (rel_info -> tag == MT7921_FW_TAG_FEATURE ) {
211
+ struct mt7921_fw_features * features ;
212
+
211
213
features = (struct mt7921_fw_features * )data ;
214
+ offload_caps = features -> data ;
212
215
break ;
213
216
}
214
217
@@ -218,7 +221,7 @@ u8 mt7921_check_offload_capability(struct device *dev, const char *fw_wm)
218
221
out :
219
222
release_firmware (fw );
220
223
221
- return features ? features -> data : 0 ;
224
+ return offload_caps ;
222
225
}
223
226
EXPORT_SYMBOL_GPL (mt7921_check_offload_capability );
224
227
You can’t perform that action at this time.
0 commit comments