Loading drivers/net/wireless/wl12xx/acx.c +16 −0 Original line number Diff line number Diff line Loading @@ -777,7 +777,23 @@ int wl1271_acx_sta_rate_policies(struct wl1271 *wl) acx->rate_policy.long_retry_limit = c->long_retry_limit; acx->rate_policy.aflags = c->aflags; ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx)); if (ret < 0) { wl1271_warning("Setting of rate policies failed: %d", ret); goto out; } /* * configure one rate class for basic p2p operations. * (p2p packets should always go out with OFDM rates, even * if we are currently connected to 11b AP) */ acx->rate_policy_idx = cpu_to_le32(ACX_TX_BASIC_RATE_P2P); acx->rate_policy.enabled_rates = cpu_to_le32(CONF_TX_RATE_MASK_BASIC_P2P); acx->rate_policy.short_retry_limit = c->short_retry_limit; acx->rate_policy.long_retry_limit = c->long_retry_limit; acx->rate_policy.aflags = c->aflags; ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx)); if (ret < 0) { Loading drivers/net/wireless/wl12xx/acx.h +1 −0 Original line number Diff line number Diff line Loading @@ -656,6 +656,7 @@ struct acx_rate_class { #define ACX_TX_BASIC_RATE 0 #define ACX_TX_AP_FULL_RATE 1 #define ACX_TX_BASIC_RATE_P2P 2 #define ACX_TX_AP_MODE_MGMT_RATE 4 #define ACX_TX_AP_MODE_BCST_RATE 5 struct acx_rate_policy { Loading drivers/net/wireless/wl12xx/boot.c +2 −4 Original line number Diff line number Diff line Loading @@ -503,7 +503,8 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl) BA_SESSION_RX_CONSTRAINT_EVENT_ID | REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID | INACTIVE_STA_EVENT_ID | MAX_TX_RETRY_EVENT_ID; MAX_TX_RETRY_EVENT_ID | CHANNEL_SWITCH_COMPLETE_EVENT_ID; ret = wl1271_event_unmask(wl); if (ret < 0) { Loading Loading @@ -769,9 +770,6 @@ int wl1271_load_firmware(struct wl1271 *wl) clk |= (wl->ref_clock << 1) << 4; } if (wl->quirks & WL12XX_QUIRK_LPD_MODE) clk |= SCRATCH_ENABLE_LPD; wl1271_write32(wl, DRPW_SCRATCH_START, clk); wl1271_set_partition(wl, &part_table[PART_WORK]); Loading drivers/net/wireless/wl12xx/cmd.c +58 −5 Original line number Diff line number Diff line Loading @@ -134,11 +134,6 @@ int wl1271_cmd_general_parms(struct wl1271 *wl) /* Override the REF CLK from the NVS with the one from platform data */ gen_parms->general_params.ref_clock = wl->ref_clock; /* LPD mode enable (bits 6-7) in WL1271 AP mode only */ if (wl->quirks & WL12XX_QUIRK_LPD_MODE) gen_parms->general_params.general_settings |= GENERAL_SETTINGS_DRPW_LPD; ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), answer); if (ret < 0) { wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed"); Loading Loading @@ -1700,3 +1695,61 @@ int wl12xx_croc(struct wl1271 *wl, u8 role_id) out: return ret; } int wl12xx_cmd_channel_switch(struct wl1271 *wl, struct ieee80211_channel_switch *ch_switch) { struct wl12xx_cmd_channel_switch *cmd; int ret; wl1271_debug(DEBUG_ACX, "cmd channel switch"); cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); if (!cmd) { ret = -ENOMEM; goto out; } cmd->channel = ch_switch->channel->hw_value; cmd->switch_time = ch_switch->count; cmd->tx_suspend = ch_switch->block_tx; cmd->flush = 0; /* this value is ignored by the FW */ ret = wl1271_cmd_send(wl, CMD_CHANNEL_SWITCH, cmd, sizeof(*cmd), 0); if (ret < 0) { wl1271_error("failed to send channel switch command"); goto out_free; } out_free: kfree(cmd); out: return ret; } int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl) { struct wl12xx_cmd_stop_channel_switch *cmd; int ret; wl1271_debug(DEBUG_ACX, "cmd stop channel switch"); cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); if (!cmd) { ret = -ENOMEM; goto out; } ret = wl1271_cmd_send(wl, CMD_STOP_CHANNEL_SWICTH, cmd, sizeof(*cmd), 0); if (ret < 0) { wl1271_error("failed to stop channel switch command"); goto out_free; } out_free: kfree(cmd); out: return ret; } drivers/net/wireless/wl12xx/cmd.h +20 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ int wl12xx_cmd_remove_peer(struct wl1271 *wl, u8 hlid); int wl12xx_cmd_config_fwlog(struct wl1271 *wl); int wl12xx_cmd_start_fwlog(struct wl1271 *wl); int wl12xx_cmd_stop_fwlog(struct wl1271 *wl); int wl12xx_cmd_channel_switch(struct wl1271 *wl, struct ieee80211_channel_switch *ch_switch); int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl); enum wl1271_commands { CMD_INTERROGATE = 1, /*use this to read information elements*/ Loading Loading @@ -677,4 +680,21 @@ struct wl12xx_cmd_stop_fwlog { struct wl1271_cmd_header header; } __packed; struct wl12xx_cmd_channel_switch { struct wl1271_cmd_header header; /* The new serving channel */ u8 channel; /* Relative time of the serving channel switch in TBTT units */ u8 switch_time; /* 1: Suspend TX till switch time; 0: Do not suspend TX */ u8 tx_suspend; /* 1: Flush TX at switch time; 0: Do not flush */ u8 flush; } __packed; struct wl12xx_cmd_stop_channel_switch { struct wl1271_cmd_header header; } __packed; #endif /* __WL1271_CMD_H__ */ Loading
drivers/net/wireless/wl12xx/acx.c +16 −0 Original line number Diff line number Diff line Loading @@ -777,7 +777,23 @@ int wl1271_acx_sta_rate_policies(struct wl1271 *wl) acx->rate_policy.long_retry_limit = c->long_retry_limit; acx->rate_policy.aflags = c->aflags; ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx)); if (ret < 0) { wl1271_warning("Setting of rate policies failed: %d", ret); goto out; } /* * configure one rate class for basic p2p operations. * (p2p packets should always go out with OFDM rates, even * if we are currently connected to 11b AP) */ acx->rate_policy_idx = cpu_to_le32(ACX_TX_BASIC_RATE_P2P); acx->rate_policy.enabled_rates = cpu_to_le32(CONF_TX_RATE_MASK_BASIC_P2P); acx->rate_policy.short_retry_limit = c->short_retry_limit; acx->rate_policy.long_retry_limit = c->long_retry_limit; acx->rate_policy.aflags = c->aflags; ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx)); if (ret < 0) { Loading
drivers/net/wireless/wl12xx/acx.h +1 −0 Original line number Diff line number Diff line Loading @@ -656,6 +656,7 @@ struct acx_rate_class { #define ACX_TX_BASIC_RATE 0 #define ACX_TX_AP_FULL_RATE 1 #define ACX_TX_BASIC_RATE_P2P 2 #define ACX_TX_AP_MODE_MGMT_RATE 4 #define ACX_TX_AP_MODE_BCST_RATE 5 struct acx_rate_policy { Loading
drivers/net/wireless/wl12xx/boot.c +2 −4 Original line number Diff line number Diff line Loading @@ -503,7 +503,8 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl) BA_SESSION_RX_CONSTRAINT_EVENT_ID | REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID | INACTIVE_STA_EVENT_ID | MAX_TX_RETRY_EVENT_ID; MAX_TX_RETRY_EVENT_ID | CHANNEL_SWITCH_COMPLETE_EVENT_ID; ret = wl1271_event_unmask(wl); if (ret < 0) { Loading Loading @@ -769,9 +770,6 @@ int wl1271_load_firmware(struct wl1271 *wl) clk |= (wl->ref_clock << 1) << 4; } if (wl->quirks & WL12XX_QUIRK_LPD_MODE) clk |= SCRATCH_ENABLE_LPD; wl1271_write32(wl, DRPW_SCRATCH_START, clk); wl1271_set_partition(wl, &part_table[PART_WORK]); Loading
drivers/net/wireless/wl12xx/cmd.c +58 −5 Original line number Diff line number Diff line Loading @@ -134,11 +134,6 @@ int wl1271_cmd_general_parms(struct wl1271 *wl) /* Override the REF CLK from the NVS with the one from platform data */ gen_parms->general_params.ref_clock = wl->ref_clock; /* LPD mode enable (bits 6-7) in WL1271 AP mode only */ if (wl->quirks & WL12XX_QUIRK_LPD_MODE) gen_parms->general_params.general_settings |= GENERAL_SETTINGS_DRPW_LPD; ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), answer); if (ret < 0) { wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed"); Loading Loading @@ -1700,3 +1695,61 @@ int wl12xx_croc(struct wl1271 *wl, u8 role_id) out: return ret; } int wl12xx_cmd_channel_switch(struct wl1271 *wl, struct ieee80211_channel_switch *ch_switch) { struct wl12xx_cmd_channel_switch *cmd; int ret; wl1271_debug(DEBUG_ACX, "cmd channel switch"); cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); if (!cmd) { ret = -ENOMEM; goto out; } cmd->channel = ch_switch->channel->hw_value; cmd->switch_time = ch_switch->count; cmd->tx_suspend = ch_switch->block_tx; cmd->flush = 0; /* this value is ignored by the FW */ ret = wl1271_cmd_send(wl, CMD_CHANNEL_SWITCH, cmd, sizeof(*cmd), 0); if (ret < 0) { wl1271_error("failed to send channel switch command"); goto out_free; } out_free: kfree(cmd); out: return ret; } int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl) { struct wl12xx_cmd_stop_channel_switch *cmd; int ret; wl1271_debug(DEBUG_ACX, "cmd stop channel switch"); cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); if (!cmd) { ret = -ENOMEM; goto out; } ret = wl1271_cmd_send(wl, CMD_STOP_CHANNEL_SWICTH, cmd, sizeof(*cmd), 0); if (ret < 0) { wl1271_error("failed to stop channel switch command"); goto out_free; } out_free: kfree(cmd); out: return ret; }
drivers/net/wireless/wl12xx/cmd.h +20 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ int wl12xx_cmd_remove_peer(struct wl1271 *wl, u8 hlid); int wl12xx_cmd_config_fwlog(struct wl1271 *wl); int wl12xx_cmd_start_fwlog(struct wl1271 *wl); int wl12xx_cmd_stop_fwlog(struct wl1271 *wl); int wl12xx_cmd_channel_switch(struct wl1271 *wl, struct ieee80211_channel_switch *ch_switch); int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl); enum wl1271_commands { CMD_INTERROGATE = 1, /*use this to read information elements*/ Loading Loading @@ -677,4 +680,21 @@ struct wl12xx_cmd_stop_fwlog { struct wl1271_cmd_header header; } __packed; struct wl12xx_cmd_channel_switch { struct wl1271_cmd_header header; /* The new serving channel */ u8 channel; /* Relative time of the serving channel switch in TBTT units */ u8 switch_time; /* 1: Suspend TX till switch time; 0: Do not suspend TX */ u8 tx_suspend; /* 1: Flush TX at switch time; 0: Do not flush */ u8 flush; } __packed; struct wl12xx_cmd_stop_channel_switch { struct wl1271_cmd_header header; } __packed; #endif /* __WL1271_CMD_H__ */