Commit Graph
1508 Commits
Author SHA1 Message Date
Lorenzo BianconiandFelix Fietkau 947532099c mt76: mt7603: fix sparse warnings: warning: incorrect type in assignment (different base types)
Fix the following sparse warning in mt7603_mcu_set_eeprom:
drivers/net/wireless/mediatek/mt76/mt7603/mcu.c:376:30: sparse: warning:
incorrect type in assignment (different base types)
drivers/net/wireless/mediatek/mt76/mt7603/mcu.c:376:30: sparse:
expected unsigned short [usertype] addr
drivers/net/wireless/mediatek/mt76/mt7603/mcu.c:376:30: sparse: got
restricted __le16 [usertype]

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-04 20:04:59 +02:00
Lorenzo BianconiandFelix Fietkau 3dfc1eeffe mt76: mt7615: fix sparse warnings: incorrect type in assignment (different base types)
Fix the following sparse warning in mt7615_mcu_bss_info_ext_header:
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:728:30: sparse: sparse:
incorrect type in assignment (different base types)
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:728:30: sparse:
expected restricted __le32 [usertype] mbss_tsf_offset

Reported-by: kbuild test robot <[email protected]>
Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
Fixes: 7339fbc0caa5 ("mt7615: mcu: do not use function pointers whenever possible")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-04 20:04:32 +02:00
Lorenzo BianconiandFelix Fietkau 0c6f1a2b3c mt76: mt7615: introduce mt7615_mcu_send_ram_firmware routine
Add mt7615_mcu_send_ram_firmware routine since mt7615_load_ram runs the
same code to send ram firmware to cr4 and n9 mcus. Moreover rename
gen_dl_mode in mt7615_mcu_gen_dl_mode.
This patch does not introduce any behaviour change, it is just code
refactor.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-04 20:03:37 +02:00
Lorenzo BianconiandFelix Fietkau 2c0ccf1561 mt76: mt7615: always release sem in mt7615_load_patch
Release patch semaphore even if request_firmware fails in
mt7615_load_patch

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-04 20:03:37 +02:00
Lorenzo BianconiandFelix Fietkau 017d0ff097 mt76: mt76u: fix typo in mt76u_fill_rx_sg
Fix typo setting urb->transfer_buffer_length in mt76u_fill_rx_sg

Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer")
Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-04 20:03:00 +02:00
Stanislaw GruszkaandFelix Fietkau 5e1e5b75d6 mt76: usb: use full intermediate buffer in mt76u_copy
Instead of use several 4 bytes usb requests, use full 32 bytes buffer
to copy data to device. With the change we use less requests and copy
exact data size to the device regardless size is multiple of 4 or not.

Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-04 20:02:16 +02:00
Stanislaw GruszkaandFelix Fietkau f43b6228fa mt76: usb: remove unneeded {put,get}_unaligned
Compiler give us guaranties on variables alignment, so use
an variable as buffer when read/write registers and remove
unneeded {put,get}_unaligned.

Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-04 20:02:16 +02:00
Stanislaw GruszkaandFelix Fietkau edbe88ec7c mt76: usb: fix endian in mt76u_copy
In contrast to mt76_wr() which we use to program registers,
on mt76_wr_copy() we should not change endian of the data.

Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer")
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-04 20:02:16 +02:00
Felix Fietkau 6f9837833b mt76: mt7615: sync with mt7603 rate control changes
- Store the previous and current rate set in the driver + the TSF value
  at the time of the switch.
- Use the tx status TSF value to determine which rate set needs to be used
  as reference.
- Report only short or long GI rates for a single status event, not a mix.
- The hardware reports the last used rate index. Use it along with the
  retry count to figure out what rate was used for the first attempt.
- Use the same retry count value for all rate slots to make this calculation
  work.
- Derive the probe rate from the current rateset instead of the skb cb
- Do not wait for a status report for the probe frame before removing the
  probe rate from the rate table. Do it immediately after it was referenced
  in a tx status report.
- Use the first half of the first rate retry budget for the probe rate
  in order to avoid using too many retries on that rate
- Switch from lower rates to higher rates more conservatively
- enable hardware rate up/down selection

Signed-off-by: Felix Fietkau <[email protected]>
2019-07-03 21:46:34 +02:00
Felix Fietkau 2ae01f7e77 mt76: mt7615: reset rate index/counters on rate table update
These values must be initialized to zero, otherwise the hardware could
reuse previous values, especially the rate index

Signed-off-by: Felix Fietkau <[email protected]>
2019-07-03 21:45:10 +02:00
Felix Fietkau ae760db52a mt76: mt7615: move mt7615_mcu_set_rates to mac.c
It bypasses the MCU, so it does not belong in mcu.c
Also make mt7615_mac_tx_rate_val static

Signed-off-by: Felix Fietkau <[email protected]>
2019-07-03 21:45:10 +02:00
Felix Fietkau bc5e041793 mt76: mt7603: enable hardware rate up/down selection
Improves performance by switching away from bad rates faster

Signed-off-by: Felix Fietkau <[email protected]>
2019-07-03 21:45:10 +02:00
Lorenzo BianconiandFelix Fietkau 47fe37e22f mt76: mt7615: fall back to sw encryption for unsupported ciphers
Fix following warning falling back to sw encryption for unsupported
ciphers

WARNING: CPU: 2 PID: 1495 at backports-4.19.32-1/net/mac80211/key.c:1023
mt76_wcid_key_setup+0x68/0xbc [mt76]
CPU: 2 PID: 1495 Comm: hostapd Not tainted 4.14.131 #0
Stack : 00000000 8f0f8bc0 00000000 8007ccec 805f0000 8058ec18 00000000 00000000
	80559788 8dca79bc 8fefb10c 805c89c7 805545c8 00000001 8dca7960 53261662
	00000000 00000000 80640000 00004668 00000000 000000e9 00000007 00000000
	00000000 805d0000 00072537 00000000 80000000 00000000 805f0000 8f1e70d0
	8e8fa098 000003ff 805c0000 8f0f8bc0 00000001 802d4340 00000008 80630008
[<800108d0>] show_stack+0x58/0x100
[<8049214c>] dump_stack+0x9c/0xe0
[<80033998>] __warn+0xe0/0x138
[<80033a80>] warn_slowpath_null+0x1c/0x2c
[<8e8fa098>] mt76_wcid_key_setup+0x68/0xbc [mt76]
[<8e889930>] mt7615_eeprom_init+0x7c0/0xe14 [mt7615e]

Suggested-by: Sebastian Gottschall <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-03 10:57:58 +02:00
Felix Fietkau 3be723cad7 mt76: mt7615: clean up FWDL TXQ during/after firmware upload
Since we don't clean that tx queue from the tx tasklet, we need to do it
after the firmware upload is done. This patch also adds a cleanup step during
the upload, to help reclaim memory faster.

Fixes unprocessed queued frames eating up memory  long after the firmware
upload has already completed

Signed-off-by: Felix Fietkau <[email protected]>
2019-07-01 20:19:17 +02:00
Lorenzo BianconiandFelix Fietkau 8919516006 mt76: mt7615: add radar pattern test knob to debugfs
Introduce mt7615_mcu_rdd_send_pattern routine to trigger a radar pattern
detection. Moreover move debugfs related routines in a dedicated source
file.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-01 14:09:17 +02:00
Lorenzo BianconiandFelix Fietkau 6afc952196 mt76: mt7615: add csa support
Add Channel Switch Announcement support to mt7615 driver updating beacon
template with CSA IE received from mac80211

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-01 14:09:17 +02:00
Lorenzo BianconiandFelix Fietkau 57c600e5b9 mt76: mt7615: do not perform txcalibration before cac is complited
Delay channel calibration after Channel Availability Check. Add some
code cleanup to mt7615_mcu_set_channel

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-01 14:09:17 +02:00
Lorenzo BianconiandFelix Fietkau 901a4c7b7f mt76: mt7615: add hw dfs pattern detector support
Add hw radar detection support to mt7615 driver in order to
unlock dfs channels on 5GHz band

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-01 14:09:17 +02:00
Lorenzo BianconiandFelix Fietkau 7991dd7e25 mt76: mt7615: introduce mt7615_regd_notifier
Introduce mt7615_regd_notifier callback. This is a preliminary patch to
add radar detection support to mt7615 driver

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-01 14:09:17 +02:00
Lorenzo BianconiandFelix Fietkau e378ef1bc1 mt76: mt7615: fix sparse warnings: warning: restricted __le16 degrades to integer
Fix the following sparse warning in __mt7615_mcu_msg_send:
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:78:15: sparse: warning:
restricted __le16 degrades to integer
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:78:15: sparse: warning:
cast from restricted __le16

Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-01 14:09:17 +02:00
Felix Fietkau 9e2e0b8577 mt76: round up length on mt76_wr_copy
When beacon length is not a multiple of 4, the beacon could be sent with
the last 1-3 bytes corrupted. The skb data is guaranteed to have enough
room for reading beyond the end, because it is always followed by
skb_shared_info, so rounding up is safe.
All other callers of mt76_wr_copy have multiple-of-4 length already.

Cc: [email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-01 13:18:54 +02:00
Felix Fietkau 6cafaca722 mt7603: use READ_ONCE instead of ACCESS_ONCE
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-27 11:43:06 +02:00
Lorenzo BianconiandFelix Fietkau d680ab01cd mt76: usb: fix rx A-MSDU support
Commit f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes
for rx") breaks A-MSDU support. When A-MSDU is enable the device can
receive frames up to q->buf_size but they will be discarded in
mt76u_process_rx_entry since there is no enough room for
skb_shared_info. Fix the issue reallocating the skb and copying in the
linear area the first 128B of the received frames and in the frag_list
the remaining part

Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx")
Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-06-25 13:21:19 +02:00
Lorenzo BianconiandFelix Fietkau 3386ccf784 mt76: mt76u: get rid of {out,in}_max_packet
Remove {out,in}_max_packet from mt76_usb data structure since
they just track last usb endpoint and they are not actually used

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Lorenzo BianconiandFelix Fietkau 2dca431cd7 mt76: move nl80211_dfs_regions in mt76_dev data structure
Move dfs region field in mt76_dev data structure since it is
used by all drivers. This is a preliminary patch to add DFS support to
mt7615 driver

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Lorenzo BianconiandFelix Fietkau 0789f45e52 mt76: mt7615: remove cfg80211_chan_def from mt7615_set_channel signature
Simplify mt7615_set_channel signature removing cfg80211_chan_def
parameter since it is not actually used

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Lorenzo BianconiandFelix Fietkau 9dd1089a29 mt76: mt76u: reduce rx memory footprint
Reduce rx memory footprint allocating just one SG buffer since for the
moment we support just 3839B as maximal size of an A-MSDU.
Introduce different SG_MAX_SIZE definitions for TX and RX sides.
Moreover set q->buf_size to PAGE_SIZE even for SG case.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Ryder LeeandFelix Fietkau c37c1ca3fa mt76: mt7615: update peer's bssid when state transition occurs
This makes sure that the driver update peer's bssid when state
transition occurs.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Ryder LeeandFelix Fietkau 3750533a37 mt76: mt7615: fix incorrect settings in mesh mode
Fix wrong settings that will drop packets due to hardware's RX table
searching flow.

Fixes: f072c7ba21 ("mt76: mt7615: enable support for mesh")
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Lorenzo BianconiandFelix Fietkau 2211d93709 mt76: mt76x02u: fix sparse warnings: should it be static?
Fix following sparse warnings in mt76x02_usb_core.c

drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:29:6: warning:
symbol 'mt76x02u_tx_complete_skb' was not declared. Should it be static?
drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:37:5: warning:
symbol 'mt76x02u_skb_dma_info' was not declared. Should it be static?
drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:96:52: warning:
restricted __le16 degrades to integer
drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:74:5: warning:
symbol 'mt76x02u_tx_prepare_skb' was not declared. Should it be static?
drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:244:6: warning:
symbol 'mt76x02u_init_beacon_config' was not declared. Should it be
static?
drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:262:6: warning:
symbol 'mt76x02u_exit_beacon_config' was not declared. Should it be
static?

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Lorenzo BianconiandFelix Fietkau 160fdc05e2 mt76: mt7615: take into account extPA when configuring tx power
When TSSI calibration is disabled (which it means the device has been
equipped with an external power amplifier) we need to refer to
different eeprom fields in order to properly configure tx power

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Lorenzo BianconiandFelix Fietkau 9b67ae62d9 mt76: mt7615: init per-channel target power
Set per-channel target power as the minimum between the regulatory
tx power and the value configured in the eeprom

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Ryder LeeandFelix Fietkau 73ff45f618 mt76: mt7615: add support for per-chain signal strength reporting
Fill in RX status->chain_signal to avoid empty value.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Lorenzo BianconiandFelix Fietkau f8d0517852 mt76: mt7615: simplify mt7615_mcu_set_sta_rec routine
Move conn_type configuration directly in mt7615_mcu_set_sta_rec and
remove sta_rec_convert_vif_type since it is actually used just in
mt7615_mcu_set_sta_rec

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Felix Fietkau f476a14761 mt76x02: fix endian issue in tx status reporting patch
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 12:53:10 +02:00
Felix Fietkau d86d6efa72 mt76x0: fix RF frontend initialization for external PA
When loading EEPROM data from flash, the RF frontend settings need to be
initialized from flash data. Without this, the chip loads the wrong values
from its internal eFuse ROM.

Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 12:25:26 +02:00
Felix Fietkau 539b679660 mt7603: improve hardware rate switching configuration
Now that tx status reporting can figure out the first attempted rate, we can
make switching from lower rates to higher rates more conservative.
This reduces retries under bad link conditions and ensures that fallback
rates get more test coverage

Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 00:16:22 +02:00
Felix Fietkau 0b6520bd1c mt7603: rework and fix tx status reporting
Tx status reporting on mt7603 has a number of issues:

- the hardware can alter the first rate index, but it is not reported to
  the driver
- probing is very imprecise, because it alters the per-client rate set,
  but only considers info->status.rates for rate selection of a single probe
  packet
- short/long GI selection has limitations, which are not accurately reported
  to mac80211
- if rates are changed while packets are in flight, tx status reports for
  the old rate set might be processed based on the new selection

This led to very suboptimal rate selection with minstrel_ht.

This patch completely reworks tx status reporting to get rid of these
limitations:

- Store the previous and current rate set in the driver + the TSF value
  at the time of the switch.
- Use the tx status TSF value to determine which rate set needs to be used
  as reference.
- Report only short or long GI rates for a single status event, not a mix.
- The hardware reports the last used rate index. Use it along with the
  retry count to figure out what rate was used for the first attempt.
- Use the same retry count value for all rate slots to make this calculation
  work.
- Derive the probe rate from the current rateset instead of the skb cb
- Do not wait for a status report for the probe frame before removing the
  probe rate from the rate table. Do it immediately after it was referenced
  in a tx status report.
- Use the first half of the first rate retry budget for the probe rate
  in order to avoid using too many retries on that rate

With this patch, throughput under bad link conditions is improved
significantly, and there is a lot less rate fluctuation going on.

Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 00:03:50 +02:00
Felix Fietkau 47ddf4b722 mt76: revert support for TX_NEEDS_ALIGNED4_SKBS
This didn't bring the performance benefit that I had hoped for, so the mac80211
patch for this will not make it upstream

Signed-off-by: Felix Fietkau <[email protected]>
2019-06-24 23:56:23 +02:00
Felix Fietkau 335e8c6baf Revert "mt76: usb: fix rx A-MSDU support"
This reverts commit 2bfae5a252.
To be replaced with a fixed version

Signed-off-by: Felix Fietkau <[email protected]>
2019-06-24 23:53:37 +02:00
Felix Fietkau 0d5caead97 Revert "mt76: usb: do not always copy the first part of received frames"
This reverts commit b0335320fc.

Signed-off-by: Felix Fietkau <[email protected]>
2019-06-24 23:53:37 +02:00
Felix Fietkau 3e7fc1573c mt76x02: fix reporting of non-probing frames with tx status requested
If the first rate index is not set, pull it from the sta default rate

Signed-off-by: Felix Fietkau <[email protected]>
2019-06-12 16:40:01 +02:00
Lorenzo BianconiandFelix Fietkau b0335320fc mt76: usb: do not always copy the first part of received frames
Set usb buffer size taking into account skb_shared_info in order to
not always copy the first part of received frames if A-MSDU is enabled
for SG capable devices

Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-06-07 19:04:04 +02:00
Lorenzo BianconiandFelix Fietkau 2bfae5a252 mt76: usb: fix rx A-MSDU support
Commit f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes
for rx") breaks A-MSDU support. When A-MSDU is enable the device can
receive frames up to q->buf_size but they will be discarded in
mt76u_process_rx_entry since there is no enough room for
skb_shared_info. Fix the issue reallocating the skb and copying in the
linear area the first 128B of the received frames and in the frag_list
the remaining part.

Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx")
Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-06-07 19:03:54 +02:00
Lorenzo BianconiandFelix Fietkau 34eea1414b mt76: mt7615: remove key check in mt7615_mcu_set_wtbl_key
Do not check key pointer in mt7615_mcu_set_wtbl_key since if set_key_cmd
is SET_KEY, key will be always not NULL. This patch will address a false
positive reported by Coverity-Scan

Addresses-Coverity-ID: 1445463 ("Dereference after null check")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-07 19:00:05 +02:00
Lorenzo BianconiandFelix Fietkau 827b9ade16 mt76: mt7615: remove unused variable in mt7615_mcu_set_bcn
Remove tim_len in mt7615_mcu_set_bcn since it is not actually used
and ieee80211_beacon_get_tim checks if tim_length is NULL

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-07 19:00:05 +02:00
Ryder LeeandFelix Fietkau 28d9496205 mt76: mt7615: fix slow performance when enable encryption
Fix wrong WCID assignment and add RKV (RX Key of this entry is valid)
flag to check if peer uses the same configuration with previous
handshaking.

If the configuration is mismatch, WTBL indicates a “cipher mismatch”
to stop SEC decryption to prevent the packet from damage.

Suggested-by: YF Luo <[email protected]>
Suggested-by: Yiwei Chung <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-07 19:00:05 +02:00
Ryder LeeandFelix Fietkau f072c7ba21 mt76: mt7615: enable support for mesh
Enable NL80211_IFTYPE_MESH_POINT and update its path.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-07 19:00:05 +02:00
YueHaibingandFelix Fietkau 661c7c8e1a mt76: Remove set but not used variables 'pid' and 'final_mpdu'
Fixes gcc '-Wunused-but-set-variable' warnings:

drivers/net/wireless/mediatek/mt76/mt7603/mac.c: In function mt7603_fill_txs:
drivers/net/wireless/mediatek/mt76/mt7603/mac.c:969:5: warning: variable pid set but not used [-Wunused-but-set-variable]
drivers/net/wireless/mediatek/mt76/mt7603/mac.c:961:7: warning: variable final_mpdu set but not used [-Wunused-but-set-variable]
drivers/net/wireless/mediatek/mt76/mt7615/mac.c: In function mt7615_fill_txs:
drivers/net/wireless/mediatek/mt76/mt7615/mac.c:555:5: warning: variable pid set but not used [-Wunused-but-set-variable]
drivers/net/wireless/mediatek/mt76/mt7615/mac.c:552:19: warning: variable final_mpdu set but not used [-Wunused-but-set-variable]

They are never used, so can be removed.

Signed-off-by: YueHaibing <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-07 19:00:05 +02:00
Lorenzo BianconiandFelix Fietkau 5b9b62e0b0 mt76: move mt76_get_rate in mt76-module
Move mt7603_get_rate in mac80211.c and rename it to mt76_get_rate
since it is shared between mt7603 and mt7615 drivers

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-07 19:00:05 +02:00