lantiq: remove unmaintained code
[openwrt.git] / package / kernel / mac80211 / patches / 909-wl18xx-move-to-new-firmware-wl18xx-fw-3.bin.patch
1 Bump the min wl18xx fw version to 8.8.0.0.13
2
3 This fw is not backward compatible with older
4 firmware (due to api changes), so use bump
5 the firmware name as well.
6
7 Some modifications were done to the driver-fw api
8 in order to support multiple APs.
9
10 Additionally, some of the consts (such as max stations,
11 max links and max RX BA sessions) were changed.
12
13 Signed-off-by: Arik Nemtsov <arik@wizery.com>
14 Signed-off-by: Eliad Peller <eliad@wizery.com>
15
16 ---
17 drivers/net/wireless/ti/wl18xx/main.c     |  2 +-
18  drivers/net/wireless/ti/wl18xx/wl18xx.h   | 10 +++++-----
19  drivers/net/wireless/ti/wlcore/acx.c      |  4 +++-
20  drivers/net/wireless/ti/wlcore/acx.h      |  6 ++++--
21  drivers/net/wireless/ti/wlcore/cmd.c      |  5 ++++-
22  drivers/net/wireless/ti/wlcore/cmd.h      |  7 +++++--
23  drivers/net/wireless/ti/wlcore/main.c     |  2 +-
24  drivers/net/wireless/ti/wlcore/tx.c       |  2 +-
25  drivers/net/wireless/ti/wlcore/wlcore_i.h |  2 +-
26  9 files changed, 25 insertions(+), 15 deletions(-)
27
28 --- a/drivers/net/wireless/ti/wl18xx/main.c
29 +++ b/drivers/net/wireless/ti/wl18xx/main.c
30 @@ -648,7 +648,7 @@ static const struct wl18xx_clk_cfg wl18x
31  };
32  
33  /* TODO: maybe move to a new header file? */
34 -#define WL18XX_FW_NAME "ti-connectivity/wl18xx-fw-2.bin"
35 +#define WL18XX_FW_NAME "ti-connectivity/wl18xx-fw-3.bin"
36  
37  static int wl18xx_identify_chip(struct wl1271 *wl)
38  {
39 --- a/drivers/net/wireless/ti/wl18xx/wl18xx.h
40 +++ b/drivers/net/wireless/ti/wl18xx/wl18xx.h
41 @@ -26,10 +26,10 @@
42  
43  /* minimum FW required for driver */
44  #define WL18XX_CHIP_VER                8
45 -#define WL18XX_IFTYPE_VER      5
46 +#define WL18XX_IFTYPE_VER      8
47  #define WL18XX_MAJOR_VER       WLCORE_FW_VER_IGNORE
48  #define WL18XX_SUBTYPE_VER     WLCORE_FW_VER_IGNORE
49 -#define WL18XX_MINOR_VER       39
50 +#define WL18XX_MINOR_VER       13
51  
52  #define WL18XX_CMD_MAX_SIZE          740
53  
54 @@ -40,10 +40,10 @@
55  
56  #define WL18XX_NUM_MAC_ADDRESSES 3
57  
58 -#define WL18XX_RX_BA_MAX_SESSIONS 5
59 +#define WL18XX_RX_BA_MAX_SESSIONS 13
60  
61 -#define WL18XX_MAX_AP_STATIONS 8
62 -#define WL18XX_MAX_LINKS 12
63 +#define WL18XX_MAX_AP_STATIONS 10
64 +#define WL18XX_MAX_LINKS 16
65  
66  struct wl18xx_priv {
67         /* buffer for sending commands to FW */
68 --- a/drivers/net/wireless/ti/wlcore/acx.c
69 +++ b/drivers/net/wireless/ti/wlcore/acx.c
70 @@ -1591,7 +1591,8 @@ out:
71         return ret;
72  }
73  
74 -int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr)
75 +int wl1271_acx_set_inconnection_sta(struct wl1271 *wl,
76 +                                   struct wl12xx_vif *wlvif, u8 *addr)
77  {
78         struct wl1271_acx_inconnection_sta *acx = NULL;
79         int ret;
80 @@ -1603,6 +1604,7 @@ int wl1271_acx_set_inconnection_sta(stru
81                 return -ENOMEM;
82  
83         memcpy(acx->addr, addr, ETH_ALEN);
84 +       acx->role_id = wlvif->role_id;
85  
86         ret = wl1271_cmd_configure(wl, ACX_UPDATE_INCONNECTION_STA_LIST,
87                                    acx, sizeof(*acx));
88 --- a/drivers/net/wireless/ti/wlcore/acx.h
89 +++ b/drivers/net/wireless/ti/wlcore/acx.h
90 @@ -824,7 +824,8 @@ struct wl1271_acx_inconnection_sta {
91         struct acx_header header;
92  
93         u8 addr[ETH_ALEN];
94 -       u8 padding1[2];
95 +       u8 role_id;
96 +       u8 padding;
97  } __packed;
98  
99  /*
100 @@ -1118,7 +1119,8 @@ int wl1271_acx_ps_rx_streaming(struct wl
101                                bool enable);
102  int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl, struct wl12xx_vif *wlvif);
103  int wl12xx_acx_config_ps(struct wl1271 *wl, struct wl12xx_vif *wlvif);
104 -int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr);
105 +int wl1271_acx_set_inconnection_sta(struct wl1271 *wl,
106 +                                   struct wl12xx_vif *wlvif, u8 *addr);
107  int wl1271_acx_fm_coex(struct wl1271 *wl);
108  int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl);
109  int wl12xx_acx_config_hangover(struct wl1271 *wl);
110 --- a/drivers/net/wireless/ti/wlcore/cmd.c
111 +++ b/drivers/net/wireless/ti/wlcore/cmd.c
112 @@ -1532,6 +1532,7 @@ int wl12xx_cmd_add_peer(struct wl1271 *w
113         cmd->sp_len = sta->max_sp;
114         cmd->wmm = sta->wme ? 1 : 0;
115         cmd->session_id = wl->session_ids[hlid];
116 +       cmd->role_id = wlvif->role_id;
117  
118         for (i = 0; i < NUM_ACCESS_CATEGORIES_COPY; i++)
119                 if (sta->wme && (sta->uapsd_queues & BIT(i)))
120 @@ -1568,7 +1569,8 @@ out:
121         return ret;
122  }
123  
124 -int wl12xx_cmd_remove_peer(struct wl1271 *wl, u8 hlid)
125 +int wl12xx_cmd_remove_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
126 +                          u8 hlid)
127  {
128         struct wl12xx_cmd_remove_peer *cmd;
129         int ret;
130 @@ -1586,6 +1588,7 @@ int wl12xx_cmd_remove_peer(struct wl1271
131         /* We never send a deauth, mac80211 is in charge of this */
132         cmd->reason_opcode = 0;
133         cmd->send_deauth_flag = 0;
134 +       cmd->role_id = wlvif->role_id;
135  
136         ret = wl1271_cmd_send(wl, CMD_REMOVE_PEER, cmd, sizeof(*cmd), 0);
137         if (ret < 0) {
138 --- a/drivers/net/wireless/ti/wlcore/cmd.h
139 +++ b/drivers/net/wireless/ti/wlcore/cmd.h
140 @@ -88,7 +88,8 @@ int wl12xx_roc(struct wl1271 *wl, struct
141  int wl12xx_croc(struct wl1271 *wl, u8 role_id);
142  int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
143                         struct ieee80211_sta *sta, u8 hlid);
144 -int wl12xx_cmd_remove_peer(struct wl1271 *wl, u8 hlid);
145 +int wl12xx_cmd_remove_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
146 +                          u8 hlid);
147  void wlcore_set_pending_regdomain_ch(struct wl1271 *wl, u16 channel,
148                                      enum ieee80211_band band);
149  int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl);
150 @@ -594,6 +595,8 @@ struct wl12xx_cmd_add_peer {
151         u8 sp_len;
152         u8 wmm;
153         u8 session_id;
154 +       u8 role_id;
155 +       u8 padding[3];
156  } __packed;
157  
158  struct wl12xx_cmd_remove_peer {
159 @@ -602,7 +605,7 @@ struct wl12xx_cmd_remove_peer {
160         u8 hlid;
161         u8 reason_opcode;
162         u8 send_deauth_flag;
163 -       u8 padding1;
164 +       u8 role_id;
165  } __packed;
166  
167  /*
168 --- a/drivers/net/wireless/ti/wlcore/main.c
169 +++ b/drivers/net/wireless/ti/wlcore/main.c
170 @@ -4798,7 +4798,7 @@ static int wl12xx_sta_remove(struct wl12
171         if (WARN_ON(!test_bit(id, wlvif->ap.sta_hlid_map)))
172                 return -EINVAL;
173  
174 -       ret = wl12xx_cmd_remove_peer(wl, wl_sta->hlid);
175 +       ret = wl12xx_cmd_remove_peer(wl, wlvif, wl_sta->hlid);
176         if (ret < 0)
177                 return ret;
178  
179 --- a/drivers/net/wireless/ti/wlcore/tx.c
180 +++ b/drivers/net/wireless/ti/wlcore/tx.c
181 @@ -101,7 +101,7 @@ static void wl1271_tx_ap_update_inconnec
182          * authentication response. this way it won't get de-authed by FW
183          * when transmitting too soon.
184          */
185 -       wl1271_acx_set_inconnection_sta(wl, hdr->addr1);
186 +       wl1271_acx_set_inconnection_sta(wl, wlvif, hdr->addr1);
187  
188         /*
189          * ROC for 1 second on the AP channel for completing the connection.
190 --- a/drivers/net/wireless/ti/wlcore/wlcore_i.h
191 +++ b/drivers/net/wireless/ti/wlcore/wlcore_i.h
192 @@ -65,7 +65,7 @@
193   * max number of links allowed by all HWs.
194   * this is NOT the actual max links supported by the current hw.
195   */
196 -#define WLCORE_MAX_LINKS 12
197 +#define WLCORE_MAX_LINKS 16
198  
199  /* the driver supports the 2.4Ghz and 5Ghz bands */
200  #define WLCORE_NUM_BANDS           2