Commit e1dcfe02 authored by Christian Lamparter's avatar Christian Lamparter

mac80211: refresh patches

Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
parent 5ef3fe61
......@@ -25,11 +25,9 @@ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index ecbe78b8027b..28e2de04834e 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -1654,13 +1654,18 @@ static void rt2800_config_wcid_attr_cipher(struct rt2x00_dev *rt2x00dev,
@@ -1654,13 +1654,18 @@ static void rt2800_config_wcid_attr_ciph
offset = MAC_IVEIV_ENTRY(key->hw_key_idx);
......
......@@ -36,11 +36,9 @@ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
index 9d158237ac67..c3eab767bc21 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
@@ -371,9 +371,6 @@ static void rt2x00lib_fill_tx_status(struct rt2x00_dev *rt2x00dev,
@@ -371,9 +371,6 @@ static void rt2x00lib_fill_tx_status(str
IEEE80211_TX_CTL_AMPDU;
tx_info->status.ampdu_len = 1;
tx_info->status.ampdu_ack_len = success ? 1 : 0;
......
......@@ -127,7 +127,7 @@
DECLARE_KFIFO_PTR(txstatus_fifo, u32);
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
@@ -1421,6 +1421,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
@@ -1418,6 +1418,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep);
......@@ -138,7 +138,7 @@
/*
* Let the driver probe the device to detect the capabilities.
*/
@@ -1564,6 +1568,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
@@ -1561,6 +1565,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
* Free the driver data.
*/
kfree(rt2x00dev->drv_data);
......
......@@ -12,7 +12,7 @@
#endif /* _RT2X00_PLATFORM_H */
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
@@ -1015,6 +1015,22 @@ static int rt2x00lib_probe_hw_modes(stru
@@ -1012,6 +1012,22 @@ static int rt2x00lib_probe_hw_modes(stru
unsigned int num_rates;
unsigned int i;
......
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
@@ -993,8 +993,13 @@ static void rt2x00lib_rate(struct ieee80
@@ -990,8 +990,13 @@ static void rt2x00lib_rate(struct ieee80
void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr)
{
......
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
@@ -1019,6 +1019,16 @@ static int rt2x00lib_probe_hw_modes(stru
@@ -1016,6 +1016,16 @@ static int rt2x00lib_probe_hw_modes(stru
struct ieee80211_rate *rates;
unsigned int num_rates;
unsigned int i;
......
......@@ -8,7 +8,7 @@
#include "rt2x00.h"
#include "rt2800lib.h"
@@ -9535,6 +9536,17 @@ static int rt2800_init_eeprom(struct rt2
@@ -9540,6 +9541,17 @@ static int rt2800_init_eeprom(struct rt2
rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC);
rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY);
......
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
@@ -1359,7 +1359,7 @@ static inline void rt2x00lib_set_if_comb
@@ -1356,7 +1356,7 @@ static inline void rt2x00lib_set_if_comb
*/
if_limit = &rt2x00dev->if_limits_ap;
if_limit->max = rt2x00dev->ops->max_ap_intf;
......
......@@ -30,7 +30,7 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
* EEPROM LNA
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -4360,6 +4360,45 @@ static void rt2800_config_channel(struct
@@ -4365,6 +4365,45 @@ static void rt2800_config_channel(struct
rt2800_iq_calibrate(rt2x00dev, rf->channel);
}
......@@ -76,7 +76,7 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
bbp = rt2800_bbp_read(rt2x00dev, 4);
rt2x00_set_field8(&bbp, BBP4_BANDWIDTH, 2 * conf_is_ht40(conf));
rt2800_bbp_write(rt2x00dev, 4, bbp);
@@ -9564,7 +9603,8 @@ static int rt2800_init_eeprom(struct rt2
@@ -9569,7 +9608,8 @@ static int rt2800_init_eeprom(struct rt2
*/
eeprom = rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1);
......@@ -86,7 +86,7 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
if (rt2x00_get_field16(eeprom,
EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352))
__set_bit(CAPABILITY_EXTERNAL_PA_TX0,
@@ -9575,6 +9615,18 @@ static int rt2800_init_eeprom(struct rt2
@@ -9580,6 +9620,18 @@ static int rt2800_init_eeprom(struct rt2
&rt2x00dev->cap_flags);
}
......
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -8426,6 +8426,58 @@ static void rt2800_init_rfcsr_5592(struc
@@ -8431,6 +8431,58 @@ static void rt2800_init_rfcsr_5592(struc
rt2800_led_open_drain_enable(rt2x00dev);
}
......@@ -59,7 +59,7 @@
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
bool set_bw, bool is_ht40)
{
@@ -9033,6 +9085,7 @@ static void rt2800_init_rfcsr_6352(struc
@@ -9038,6 +9090,7 @@ static void rt2800_init_rfcsr_6352(struc
rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00);
rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C);
......
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -8478,6 +8478,160 @@ void rt2800_rf_self_txdc_cal(struct rt2x
@@ -8483,6 +8483,160 @@ void rt2800_rf_self_txdc_cal(struct rt2x
}
EXPORT_SYMBOL_GPL(rt2800_rf_self_txdc_cal);
......@@ -161,7 +161,7 @@
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
bool set_bw, bool is_ht40)
{
@@ -9085,6 +9239,7 @@ static void rt2800_init_rfcsr_6352(struc
@@ -9090,6 +9244,7 @@ static void rt2800_init_rfcsr_6352(struc
rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00);
rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C);
......
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -8632,6 +8632,71 @@ void rt2800_r_calibration(struct rt2x00_
@@ -8637,6 +8637,71 @@ void rt2800_r_calibration(struct rt2x00_
}
EXPORT_SYMBOL_GPL(rt2800_r_calibration);
......@@ -72,7 +72,7 @@
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
bool set_bw, bool is_ht40)
{
@@ -9241,6 +9306,7 @@ static void rt2800_init_rfcsr_6352(struc
@@ -9246,6 +9311,7 @@ static void rt2800_init_rfcsr_6352(struc
rt2800_r_calibration(rt2x00dev);
rt2800_rf_self_txdc_cal(rt2x00dev);
......
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -8697,6 +8697,386 @@ void rt2800_rxdcoc_calibration(struct rt
@@ -8702,6 +8702,386 @@ void rt2800_rxdcoc_calibration(struct rt
}
EXPORT_SYMBOL_GPL(rt2800_rxdcoc_calibration);
......@@ -387,7 +387,7 @@
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
bool set_bw, bool is_ht40)
{
@@ -9309,6 +9689,7 @@ static void rt2800_init_rfcsr_6352(struc
@@ -9314,6 +9694,7 @@ static void rt2800_init_rfcsr_6352(struc
rt2800_rxdcoc_calibration(rt2x00dev);
rt2800_bw_filter_calibration(rt2x00dev, true);
rt2800_bw_filter_calibration(rt2x00dev, false);
......
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -9077,6 +9077,954 @@ restore_value:
@@ -9082,6 +9082,954 @@ restore_value:
}
EXPORT_SYMBOL_GPL(rt2800_rxiq_calibration);
......@@ -955,7 +955,7 @@
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
bool set_bw, bool is_ht40)
{
@@ -9689,6 +10637,7 @@ static void rt2800_init_rfcsr_6352(struc
@@ -9694,6 +10642,7 @@ static void rt2800_init_rfcsr_6352(struc
rt2800_rxdcoc_calibration(rt2x00dev);
rt2800_bw_filter_calibration(rt2x00dev, true);
rt2800_bw_filter_calibration(rt2x00dev, false);
......
......@@ -67,14 +67,20 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct ieee80211_hdr *hdr;
- bool enc_tailroom;
- int tail_need = 0;
+ int head_need, head_max;
+ int tail_need, tail_max;
+ bool enc_tailroom = false;
-
- hdr = (struct ieee80211_hdr *) skb->data;
- enc_tailroom = may_encrypt &&
- (sdata->crypto_tx_tailroom_needed_cnt ||
- ieee80211_is_mgmt(hdr->frame_control));
-
- if (enc_tailroom) {
- tail_need = IEEE80211_ENCRYPT_TAILROOM;
- tail_need -= skb_tailroom(skb);
- tail_need = max_t(int, tail_need, 0);
+ int head_need, head_max;
+ int tail_need, tail_max;
+ bool enc_tailroom = false;
+
+ if (sdata && !hdr_len &&
+ !(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)) {
+ hdr = (struct ieee80211_hdr *) skb->data;
......@@ -82,11 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ ieee80211_is_mgmt(hdr->frame_control));
+ hdr_len += sdata->encrypt_headroom;
+ }
- if (enc_tailroom) {
- tail_need = IEEE80211_ENCRYPT_TAILROOM;
- tail_need -= skb_tailroom(skb);
- tail_need = max_t(int, tail_need, 0);
+
+ head_need = head_max = hdr_len;
+ tail_need = tail_max = 0;
+ if (!sdata) {
......@@ -129,13 +131,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
- bool may_encrypt;
-
- may_encrypt = !(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT);
-
- headroom = local->tx_headroom;
- if (may_encrypt)
- headroom += sdata->encrypt_headroom;
- headroom -= skb_headroom(skb);
- headroom = max_t(int, 0, headroom);
-
- if (ieee80211_skb_resize(sdata, skb, headroom, may_encrypt)) {
+ if (ieee80211_skb_resize(local, sdata, skb, 0, 0)) {
ieee80211_free_txskb(&local->hw, skb);
......@@ -146,7 +148,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
skb_pull(skb, skip_header_bytes);
- head_need = hdrlen + encaps_len + meshhdrlen - skb_headroom(skb);
-
+ head_need = hdrlen + encaps_len + meshhdrlen;
- /*
- * So we need to modify the skb header and hence need a copy of
- * that. The head_need variable above doesn't, so far, include
......@@ -158,8 +161,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
- * the ever needed space. Also, if we need to reallocate it anyway,
- * make it big enough for everything we may ever need.
- */
+ head_need = hdrlen + encaps_len + meshhdrlen;
-
- if (head_need > 0 || skb_cloned(skb)) {
- head_need += sdata->encrypt_headroom;
- head_need += local->tx_headroom;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment