Loading drivers/net/wireless/wl12xx/Kconfig +0 −10 Original line number Diff line number Diff line Loading @@ -19,16 +19,6 @@ config WL12XX If you choose to build a module, it will be called wl12xx. Say N if unsure. config WL12XX_HT bool "TI wl12xx 802.11 HT support (EXPERIMENTAL)" depends on WL12XX && EXPERIMENTAL default n ---help--- This will enable 802.11 HT support in the wl12xx module. That configuration is temporary due to the code incomplete and still in testing process. config WL12XX_SPI tristate "TI wl12xx SPI support" depends on WL12XX && SPI_MASTER Loading drivers/net/wireless/wl12xx/acx.c +40 −0 Original line number Diff line number Diff line Loading @@ -1691,3 +1691,43 @@ int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl) kfree(acx); return ret; } int wl12xx_acx_config_hangover(struct wl1271 *wl) { struct wl12xx_acx_config_hangover *acx; struct conf_hangover_settings *conf = &wl->conf.hangover; int ret; wl1271_debug(DEBUG_ACX, "acx config hangover"); acx = kzalloc(sizeof(*acx), GFP_KERNEL); if (!acx) { ret = -ENOMEM; goto out; } acx->recover_time = cpu_to_le32(conf->recover_time); acx->hangover_period = conf->hangover_period; acx->dynamic_mode = conf->dynamic_mode; acx->early_termination_mode = conf->early_termination_mode; acx->max_period = conf->max_period; acx->min_period = conf->min_period; acx->increase_delta = conf->increase_delta; acx->decrease_delta = conf->decrease_delta; acx->quiet_time = conf->quiet_time; acx->increase_time = conf->increase_time; acx->window_size = acx->window_size; ret = wl1271_cmd_configure(wl, ACX_CONFIG_HANGOVER, acx, sizeof(*acx)); if (ret < 0) { wl1271_warning("acx config hangover failed: %d", ret); goto out; } out: kfree(acx); return ret; } drivers/net/wireless/wl12xx/acx.h +18 −0 Original line number Diff line number Diff line Loading @@ -1144,6 +1144,23 @@ struct wl12xx_acx_set_rate_mgmt_params { u8 padding2[2]; } __packed; struct wl12xx_acx_config_hangover { struct acx_header header; __le32 recover_time; u8 hangover_period; u8 dynamic_mode; u8 early_termination_mode; u8 max_period; u8 min_period; u8 increase_delta; u8 decrease_delta; u8 quiet_time; u8 increase_time; u8 window_size; u8 padding[2]; } __packed; enum { ACX_WAKE_UP_CONDITIONS = 0x0002, ACX_MEM_CFG = 0x0003, Loading Loading @@ -1281,5 +1298,6 @@ int wl1271_acx_config_ps(struct wl1271 *wl); int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr); int wl1271_acx_fm_coex(struct wl1271 *wl); int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl); int wl12xx_acx_config_hangover(struct wl1271 *wl); #endif /* __WL1271_ACX_H__ */ drivers/net/wireless/wl12xx/cmd.c +11 −6 Original line number Diff line number Diff line Loading @@ -895,7 +895,7 @@ int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len) struct acx_header *acx = buf; int ret; wl1271_debug(DEBUG_CMD, "cmd configure"); wl1271_debug(DEBUG_CMD, "cmd configure (%d)", id); acx->id = cpu_to_le16(id); Loading Loading @@ -1413,7 +1413,7 @@ int wl12xx_cmd_set_peer_state(struct wl1271 *wl, u8 hlid) int wl12xx_cmd_add_peer(struct wl1271 *wl, struct ieee80211_sta *sta, u8 hlid) { struct wl12xx_cmd_add_peer *cmd; int ret; int i, ret; u32 sta_rates; wl1271_debug(DEBUG_CMD, "cmd add peer %d", (int)hlid); Loading @@ -1424,15 +1424,19 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct ieee80211_sta *sta, u8 hlid) goto out; } /* currently we don't support UAPSD */ cmd->sp_len = 0; memcpy(cmd->addr, sta->addr, ETH_ALEN); cmd->bss_index = WL1271_AP_BSS_INDEX; cmd->aid = sta->aid; cmd->hlid = hlid; cmd->sp_len = sta->max_sp; cmd->wmm = sta->wme ? 1 : 0; for (i = 0; i < NUM_ACCESS_CATEGORIES_COPY; i++) if (sta->wme && (sta->uapsd_queues & BIT(i))) cmd->psd_type[i] = WL1271_PSD_UPSD_TRIGGER; else cmd->psd_type[i] = WL1271_PSD_LEGACY; sta_rates = sta->supp_rates[wl->band]; if (sta->ht_cap.ht_supported) sta_rates |= sta->ht_cap.mcs.rx_mask[0] << HW_HT_RATES_OFFSET; Loading @@ -1440,7 +1444,8 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct ieee80211_sta *sta, u8 hlid) cmd->supported_rates = cpu_to_le32(wl1271_tx_enabled_rates_get(wl, sta_rates)); wl1271_debug(DEBUG_CMD, "new peer rates: 0x%x", cmd->supported_rates); wl1271_debug(DEBUG_CMD, "new peer rates=0x%x queues=0x%x", cmd->supported_rates, sta->uapsd_queues); ret = wl1271_cmd_send(wl, CMD_ADD_PEER, cmd, sizeof(*cmd), 0); if (ret < 0) { Loading drivers/net/wireless/wl12xx/cmd.h +7 −0 Original line number Diff line number Diff line Loading @@ -591,6 +591,13 @@ enum wl12xx_ssid_type { WL12XX_SSID_TYPE_ANY = 2, }; enum wl1271_psd_type { WL1271_PSD_LEGACY = 0, WL1271_PSD_UPSD_TRIGGER = 1, WL1271_PSD_LEGACY_PSPOLL = 2, WL1271_PSD_SAPSD = 3 }; struct wl12xx_cmd_add_peer { struct wl1271_cmd_header header; Loading Loading
drivers/net/wireless/wl12xx/Kconfig +0 −10 Original line number Diff line number Diff line Loading @@ -19,16 +19,6 @@ config WL12XX If you choose to build a module, it will be called wl12xx. Say N if unsure. config WL12XX_HT bool "TI wl12xx 802.11 HT support (EXPERIMENTAL)" depends on WL12XX && EXPERIMENTAL default n ---help--- This will enable 802.11 HT support in the wl12xx module. That configuration is temporary due to the code incomplete and still in testing process. config WL12XX_SPI tristate "TI wl12xx SPI support" depends on WL12XX && SPI_MASTER Loading
drivers/net/wireless/wl12xx/acx.c +40 −0 Original line number Diff line number Diff line Loading @@ -1691,3 +1691,43 @@ int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl) kfree(acx); return ret; } int wl12xx_acx_config_hangover(struct wl1271 *wl) { struct wl12xx_acx_config_hangover *acx; struct conf_hangover_settings *conf = &wl->conf.hangover; int ret; wl1271_debug(DEBUG_ACX, "acx config hangover"); acx = kzalloc(sizeof(*acx), GFP_KERNEL); if (!acx) { ret = -ENOMEM; goto out; } acx->recover_time = cpu_to_le32(conf->recover_time); acx->hangover_period = conf->hangover_period; acx->dynamic_mode = conf->dynamic_mode; acx->early_termination_mode = conf->early_termination_mode; acx->max_period = conf->max_period; acx->min_period = conf->min_period; acx->increase_delta = conf->increase_delta; acx->decrease_delta = conf->decrease_delta; acx->quiet_time = conf->quiet_time; acx->increase_time = conf->increase_time; acx->window_size = acx->window_size; ret = wl1271_cmd_configure(wl, ACX_CONFIG_HANGOVER, acx, sizeof(*acx)); if (ret < 0) { wl1271_warning("acx config hangover failed: %d", ret); goto out; } out: kfree(acx); return ret; }
drivers/net/wireless/wl12xx/acx.h +18 −0 Original line number Diff line number Diff line Loading @@ -1144,6 +1144,23 @@ struct wl12xx_acx_set_rate_mgmt_params { u8 padding2[2]; } __packed; struct wl12xx_acx_config_hangover { struct acx_header header; __le32 recover_time; u8 hangover_period; u8 dynamic_mode; u8 early_termination_mode; u8 max_period; u8 min_period; u8 increase_delta; u8 decrease_delta; u8 quiet_time; u8 increase_time; u8 window_size; u8 padding[2]; } __packed; enum { ACX_WAKE_UP_CONDITIONS = 0x0002, ACX_MEM_CFG = 0x0003, Loading Loading @@ -1281,5 +1298,6 @@ int wl1271_acx_config_ps(struct wl1271 *wl); int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr); int wl1271_acx_fm_coex(struct wl1271 *wl); int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl); int wl12xx_acx_config_hangover(struct wl1271 *wl); #endif /* __WL1271_ACX_H__ */
drivers/net/wireless/wl12xx/cmd.c +11 −6 Original line number Diff line number Diff line Loading @@ -895,7 +895,7 @@ int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len) struct acx_header *acx = buf; int ret; wl1271_debug(DEBUG_CMD, "cmd configure"); wl1271_debug(DEBUG_CMD, "cmd configure (%d)", id); acx->id = cpu_to_le16(id); Loading Loading @@ -1413,7 +1413,7 @@ int wl12xx_cmd_set_peer_state(struct wl1271 *wl, u8 hlid) int wl12xx_cmd_add_peer(struct wl1271 *wl, struct ieee80211_sta *sta, u8 hlid) { struct wl12xx_cmd_add_peer *cmd; int ret; int i, ret; u32 sta_rates; wl1271_debug(DEBUG_CMD, "cmd add peer %d", (int)hlid); Loading @@ -1424,15 +1424,19 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct ieee80211_sta *sta, u8 hlid) goto out; } /* currently we don't support UAPSD */ cmd->sp_len = 0; memcpy(cmd->addr, sta->addr, ETH_ALEN); cmd->bss_index = WL1271_AP_BSS_INDEX; cmd->aid = sta->aid; cmd->hlid = hlid; cmd->sp_len = sta->max_sp; cmd->wmm = sta->wme ? 1 : 0; for (i = 0; i < NUM_ACCESS_CATEGORIES_COPY; i++) if (sta->wme && (sta->uapsd_queues & BIT(i))) cmd->psd_type[i] = WL1271_PSD_UPSD_TRIGGER; else cmd->psd_type[i] = WL1271_PSD_LEGACY; sta_rates = sta->supp_rates[wl->band]; if (sta->ht_cap.ht_supported) sta_rates |= sta->ht_cap.mcs.rx_mask[0] << HW_HT_RATES_OFFSET; Loading @@ -1440,7 +1444,8 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct ieee80211_sta *sta, u8 hlid) cmd->supported_rates = cpu_to_le32(wl1271_tx_enabled_rates_get(wl, sta_rates)); wl1271_debug(DEBUG_CMD, "new peer rates: 0x%x", cmd->supported_rates); wl1271_debug(DEBUG_CMD, "new peer rates=0x%x queues=0x%x", cmd->supported_rates, sta->uapsd_queues); ret = wl1271_cmd_send(wl, CMD_ADD_PEER, cmd, sizeof(*cmd), 0); if (ret < 0) { Loading
drivers/net/wireless/wl12xx/cmd.h +7 −0 Original line number Diff line number Diff line Loading @@ -591,6 +591,13 @@ enum wl12xx_ssid_type { WL12XX_SSID_TYPE_ANY = 2, }; enum wl1271_psd_type { WL1271_PSD_LEGACY = 0, WL1271_PSD_UPSD_TRIGGER = 1, WL1271_PSD_LEGACY_PSPOLL = 2, WL1271_PSD_SAPSD = 3 }; struct wl12xx_cmd_add_peer { struct wl1271_cmd_header header; Loading