Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wl18xx: move to new firmware (wl18xx-fw-3.bin)

Bump the min wl18xx fw version to 8.8.0.0.13

This fw is not backward compatible with older
firmware (due to api changes), so use bump
the firmware name as well.

Some modifications were done to the driver-fw api
in order to support multiple APs.

Additionally, some of the consts (such as max stations,
max links and max RX BA sessions) were changed.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Eliad Peller and committed by
John W. Linville
028e7243 abf0b249

+25 -15
+1 -1
drivers/net/wireless/ti/wl18xx/main.c
··· 648 648 }; 649 649 650 650 /* TODO: maybe move to a new header file? */ 651 - #define WL18XX_FW_NAME "ti-connectivity/wl18xx-fw-2.bin" 651 + #define WL18XX_FW_NAME "ti-connectivity/wl18xx-fw-3.bin" 652 652 653 653 static int wl18xx_identify_chip(struct wl1271 *wl) 654 654 {
+5 -5
drivers/net/wireless/ti/wl18xx/wl18xx.h
··· 26 26 27 27 /* minimum FW required for driver */ 28 28 #define WL18XX_CHIP_VER 8 29 - #define WL18XX_IFTYPE_VER 5 29 + #define WL18XX_IFTYPE_VER 8 30 30 #define WL18XX_MAJOR_VER WLCORE_FW_VER_IGNORE 31 31 #define WL18XX_SUBTYPE_VER WLCORE_FW_VER_IGNORE 32 - #define WL18XX_MINOR_VER 39 32 + #define WL18XX_MINOR_VER 13 33 33 34 34 #define WL18XX_CMD_MAX_SIZE 740 35 35 ··· 40 40 41 41 #define WL18XX_NUM_MAC_ADDRESSES 3 42 42 43 - #define WL18XX_RX_BA_MAX_SESSIONS 5 43 + #define WL18XX_RX_BA_MAX_SESSIONS 13 44 44 45 - #define WL18XX_MAX_AP_STATIONS 8 46 - #define WL18XX_MAX_LINKS 12 45 + #define WL18XX_MAX_AP_STATIONS 10 46 + #define WL18XX_MAX_LINKS 16 47 47 48 48 struct wl18xx_priv { 49 49 /* buffer for sending commands to FW */
+3 -1
drivers/net/wireless/ti/wlcore/acx.c
··· 1591 1591 return ret; 1592 1592 } 1593 1593 1594 - int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr) 1594 + int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, 1595 + struct wl12xx_vif *wlvif, u8 *addr) 1595 1596 { 1596 1597 struct wl1271_acx_inconnection_sta *acx = NULL; 1597 1598 int ret; ··· 1604 1603 return -ENOMEM; 1605 1604 1606 1605 memcpy(acx->addr, addr, ETH_ALEN); 1606 + acx->role_id = wlvif->role_id; 1607 1607 1608 1608 ret = wl1271_cmd_configure(wl, ACX_UPDATE_INCONNECTION_STA_LIST, 1609 1609 acx, sizeof(*acx));
+4 -2
drivers/net/wireless/ti/wlcore/acx.h
··· 824 824 struct acx_header header; 825 825 826 826 u8 addr[ETH_ALEN]; 827 - u8 padding1[2]; 827 + u8 role_id; 828 + u8 padding; 828 829 } __packed; 829 830 830 831 /* ··· 1119 1118 bool enable); 1120 1119 int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl, struct wl12xx_vif *wlvif); 1121 1120 int wl12xx_acx_config_ps(struct wl1271 *wl, struct wl12xx_vif *wlvif); 1122 - int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr); 1121 + int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, 1122 + struct wl12xx_vif *wlvif, u8 *addr); 1123 1123 int wl1271_acx_fm_coex(struct wl1271 *wl); 1124 1124 int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl); 1125 1125 int wl12xx_acx_config_hangover(struct wl1271 *wl);
+4 -1
drivers/net/wireless/ti/wlcore/cmd.c
··· 1532 1532 cmd->sp_len = sta->max_sp; 1533 1533 cmd->wmm = sta->wme ? 1 : 0; 1534 1534 cmd->session_id = wl->session_ids[hlid]; 1535 + cmd->role_id = wlvif->role_id; 1535 1536 1536 1537 for (i = 0; i < NUM_ACCESS_CATEGORIES_COPY; i++) 1537 1538 if (sta->wme && (sta->uapsd_queues & BIT(i))) ··· 1569 1568 return ret; 1570 1569 } 1571 1570 1572 - int wl12xx_cmd_remove_peer(struct wl1271 *wl, u8 hlid) 1571 + int wl12xx_cmd_remove_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, 1572 + u8 hlid) 1573 1573 { 1574 1574 struct wl12xx_cmd_remove_peer *cmd; 1575 1575 int ret; ··· 1588 1586 /* We never send a deauth, mac80211 is in charge of this */ 1589 1587 cmd->reason_opcode = 0; 1590 1588 cmd->send_deauth_flag = 0; 1589 + cmd->role_id = wlvif->role_id; 1591 1590 1592 1591 ret = wl1271_cmd_send(wl, CMD_REMOVE_PEER, cmd, sizeof(*cmd), 0); 1593 1592 if (ret < 0) {
+5 -2
drivers/net/wireless/ti/wlcore/cmd.h
··· 88 88 int wl12xx_croc(struct wl1271 *wl, u8 role_id); 89 89 int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, 90 90 struct ieee80211_sta *sta, u8 hlid); 91 - int wl12xx_cmd_remove_peer(struct wl1271 *wl, u8 hlid); 91 + int wl12xx_cmd_remove_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, 92 + u8 hlid); 92 93 void wlcore_set_pending_regdomain_ch(struct wl1271 *wl, u16 channel, 93 94 enum ieee80211_band band); 94 95 int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl); ··· 595 594 u8 sp_len; 596 595 u8 wmm; 597 596 u8 session_id; 597 + u8 role_id; 598 + u8 padding[3]; 598 599 } __packed; 599 600 600 601 struct wl12xx_cmd_remove_peer { ··· 605 602 u8 hlid; 606 603 u8 reason_opcode; 607 604 u8 send_deauth_flag; 608 - u8 padding1; 605 + u8 role_id; 609 606 } __packed; 610 607 611 608 /*
+1 -1
drivers/net/wireless/ti/wlcore/main.c
··· 4765 4765 if (WARN_ON(!test_bit(id, wlvif->ap.sta_hlid_map))) 4766 4766 return -EINVAL; 4767 4767 4768 - ret = wl12xx_cmd_remove_peer(wl, wl_sta->hlid); 4768 + ret = wl12xx_cmd_remove_peer(wl, wlvif, wl_sta->hlid); 4769 4769 if (ret < 0) 4770 4770 return ret; 4771 4771
+1 -1
drivers/net/wireless/ti/wlcore/tx.c
··· 101 101 * authentication response. this way it won't get de-authed by FW 102 102 * when transmitting too soon. 103 103 */ 104 - wl1271_acx_set_inconnection_sta(wl, hdr->addr1); 104 + wl1271_acx_set_inconnection_sta(wl, wlvif, hdr->addr1); 105 105 106 106 /* 107 107 * ROC for 1 second on the AP channel for completing the connection.
+1 -1
drivers/net/wireless/ti/wlcore/wlcore_i.h
··· 65 65 * max number of links allowed by all HWs. 66 66 * this is NOT the actual max links supported by the current hw. 67 67 */ 68 - #define WLCORE_MAX_LINKS 12 68 + #define WLCORE_MAX_LINKS 16 69 69 70 70 /* the driver supports the 2.4Ghz and 5Ghz bands */ 71 71 #define WLCORE_NUM_BANDS 2