mirror of
https://github.com/bolucat/Archive.git
synced 2025-09-27 04:30:12 +08:00
Update On Fri May 16 20:36:41 CEST 2025
This commit is contained in:
1
.github/update.log
vendored
1
.github/update.log
vendored
@@ -1000,3 +1000,4 @@ Update On Mon May 12 20:36:32 CEST 2025
|
||||
Update On Tue May 13 20:37:30 CEST 2025
|
||||
Update On Wed May 14 20:34:49 CEST 2025
|
||||
Update On Thu May 15 20:37:42 CEST 2025
|
||||
Update On Fri May 16 20:36:33 CEST 2025
|
||||
|
@@ -30,7 +30,7 @@
|
||||
"country-code-emoji": "2.3.0",
|
||||
"country-emoji": "1.5.6",
|
||||
"dayjs": "1.11.13",
|
||||
"framer-motion": "12.11.3",
|
||||
"framer-motion": "12.11.4",
|
||||
"i18next": "25.1.3",
|
||||
"jotai": "2.12.4",
|
||||
"json-schema": "0.4.0",
|
||||
@@ -47,7 +47,7 @@
|
||||
"react-split-grid": "1.0.4",
|
||||
"react-use": "17.6.0",
|
||||
"swr": "2.3.3",
|
||||
"virtua": "0.41.0",
|
||||
"virtua": "0.41.2",
|
||||
"vite-bundle-visualizer": "1.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@@ -23,7 +23,7 @@
|
||||
"@vitejs/plugin-react": "4.4.1",
|
||||
"ahooks": "3.8.4",
|
||||
"d3": "7.9.0",
|
||||
"framer-motion": "12.11.3",
|
||||
"framer-motion": "12.11.4",
|
||||
"react": "19.1.0",
|
||||
"react-dom": "19.1.0",
|
||||
"react-error-boundary": "6.0.0",
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"manifest_version": 1,
|
||||
"latest": {
|
||||
"mihomo": "v1.19.8",
|
||||
"mihomo_alpha": "alpha-f91a586",
|
||||
"mihomo_alpha": "alpha-bb8c47d",
|
||||
"clash_rs": "v0.7.7",
|
||||
"clash_premium": "2023-09-05-gdcc8d87",
|
||||
"clash_rs_alpha": "0.7.7-alpha+sha.72871ca"
|
||||
@@ -69,5 +69,5 @@
|
||||
"linux-armv7hf": "clash-armv7-unknown-linux-gnueabihf"
|
||||
}
|
||||
},
|
||||
"updated_at": "2025-05-13T22:21:14.958Z"
|
||||
"updated_at": "2025-05-15T22:21:00.789Z"
|
||||
}
|
||||
|
@@ -110,7 +110,7 @@
|
||||
},
|
||||
"packageManager": "pnpm@10.11.0",
|
||||
"engines": {
|
||||
"node": "22.15.0"
|
||||
"node": "22.15.1"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
|
32
clash-nyanpasu/pnpm-lock.yaml
generated
32
clash-nyanpasu/pnpm-lock.yaml
generated
@@ -266,8 +266,8 @@ importers:
|
||||
specifier: 1.11.13
|
||||
version: 1.11.13
|
||||
framer-motion:
|
||||
specifier: 12.11.3
|
||||
version: 12.11.3(@emotion/is-prop-valid@1.3.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
specifier: 12.11.4
|
||||
version: 12.11.4(@emotion/is-prop-valid@1.3.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
i18next:
|
||||
specifier: 25.1.3
|
||||
version: 25.1.3(typescript@5.8.3)
|
||||
@@ -317,8 +317,8 @@ importers:
|
||||
specifier: 2.3.3
|
||||
version: 2.3.3(react@19.1.0)
|
||||
virtua:
|
||||
specifier: 0.41.0
|
||||
version: 0.41.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(solid-js@1.9.5)
|
||||
specifier: 0.41.2
|
||||
version: 0.41.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(solid-js@1.9.5)
|
||||
vite-bundle-visualizer:
|
||||
specifier: 1.2.1
|
||||
version: 1.2.1(rollup@4.40.0)
|
||||
@@ -486,8 +486,8 @@ importers:
|
||||
specifier: 7.9.0
|
||||
version: 7.9.0
|
||||
framer-motion:
|
||||
specifier: 12.11.3
|
||||
version: 12.11.3(@emotion/is-prop-valid@1.3.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
specifier: 12.11.4
|
||||
version: 12.11.4(@emotion/is-prop-valid@1.3.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
react:
|
||||
specifier: 19.1.0
|
||||
version: 19.1.0
|
||||
@@ -4889,8 +4889,8 @@ packages:
|
||||
fraction.js@4.3.7:
|
||||
resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==}
|
||||
|
||||
framer-motion@12.11.3:
|
||||
resolution: {integrity: sha512-ksUtDFBZtrbQFt4bEMFrFgo7camhmXcLeuylKQxEYSd9czkZ4tZmFROxWczWeu51WqC2m91ifpvgGCBLd0uviQ==}
|
||||
framer-motion@12.11.4:
|
||||
resolution: {integrity: sha512-kyE5oWZCUxhDb7LtpEyyadNThJJvoE8a6bfUTBqz++zw3XxDOosPAvw1lqNhYbjOgy57YuAlJ5qG/Cx5BigiEQ==}
|
||||
peerDependencies:
|
||||
'@emotion/is-prop-valid': '*'
|
||||
react: ^18.0.0 || ^19.0.0
|
||||
@@ -6205,8 +6205,8 @@ packages:
|
||||
peerDependencies:
|
||||
monaco-editor: '>=0.36'
|
||||
|
||||
motion-dom@12.11.2:
|
||||
resolution: {integrity: sha512-wZ396XNNTI9GOkyrr80wFSbZc1JbIHSHTbLdririSbkEgahWWKmsHzsxyxqBBvuBU/iaQWVu1YCjdpXYNfo2yQ==}
|
||||
motion-dom@12.11.4:
|
||||
resolution: {integrity: sha512-1z/qYsrDjSx5QjOH8GfJ2RfFBvEzI2gdAEt2zNW+f7QkLlqjM3sQieESJr5+QtVmvD81qPANM7t97ROixKIt9Q==}
|
||||
|
||||
motion-utils@12.9.4:
|
||||
resolution: {integrity: sha512-BW3I65zeM76CMsfh3kHid9ansEJk9Qvl+K5cu4DVHKGsI52n76OJ4z2CUJUV+Mn3uEP9k1JJA3tClG0ggSrRcg==}
|
||||
@@ -8097,8 +8097,8 @@ packages:
|
||||
vfile@6.0.1:
|
||||
resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==}
|
||||
|
||||
virtua@0.41.0:
|
||||
resolution: {integrity: sha512-P8XJhPAz3mNrxAjPc+NRvD8a8+JtInKgHXuvtucThXW93U1ztUKJ2TDCAMaCPRY0CQCR465mYcOf26yQkCHWEw==}
|
||||
virtua@0.41.2:
|
||||
resolution: {integrity: sha512-48jgdeXKagXEVxalTFf1bJe/5JZq41QG9LcwDweFJwOZgOvIgoHhBR+IMZPOVd0AjtwvLOaS3O7MYNdti9c4VQ==}
|
||||
peerDependencies:
|
||||
react: '>=16.14.0'
|
||||
react-dom: '>=16.14.0'
|
||||
@@ -13254,9 +13254,9 @@ snapshots:
|
||||
|
||||
fraction.js@4.3.7: {}
|
||||
|
||||
framer-motion@12.11.3(@emotion/is-prop-valid@1.3.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0):
|
||||
framer-motion@12.11.4(@emotion/is-prop-valid@1.3.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0):
|
||||
dependencies:
|
||||
motion-dom: 12.11.2
|
||||
motion-dom: 12.11.4
|
||||
motion-utils: 12.9.4
|
||||
tslib: 2.8.1
|
||||
optionalDependencies:
|
||||
@@ -14693,7 +14693,7 @@ snapshots:
|
||||
vscode-uri: 3.0.8
|
||||
yaml: 2.7.0
|
||||
|
||||
motion-dom@12.11.2:
|
||||
motion-dom@12.11.4:
|
||||
dependencies:
|
||||
motion-utils: 12.9.4
|
||||
|
||||
@@ -16713,7 +16713,7 @@ snapshots:
|
||||
unist-util-stringify-position: 4.0.0
|
||||
vfile-message: 4.0.2
|
||||
|
||||
virtua@0.41.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(solid-js@1.9.5):
|
||||
virtua@0.41.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(solid-js@1.9.5):
|
||||
optionalDependencies:
|
||||
react: 19.1.0
|
||||
react-dom: 19.1.0(react@19.1.0)
|
||||
|
@@ -65,6 +65,10 @@
|
||||
- Mihomo 内核默认日志等级为 warn
|
||||
- Clash Verge Rev 应用默认日志等级为 warn
|
||||
- 重构了原来的 IP 信息请求重试机制,采用轮询检测,解决了 Network Error 和超时问题
|
||||
- 对轮询检测机制进行了优化,引入洗牌算法来增强随机性。
|
||||
- 对获取系统信息的流程进行了优化,并添加了去重检测机制,确保剔除重复的信息
|
||||
- 优化窗口状态初始化逻辑和添加缺失的权限设置
|
||||
- 异步化配置:优化端口查找和配置保存逻辑
|
||||
|
||||
## v2.2.3
|
||||
|
||||
|
@@ -17,6 +17,7 @@
|
||||
"autostart:allow-enable",
|
||||
"autostart:allow-disable",
|
||||
"autostart:allow-is-enabled",
|
||||
"core:window:allow-set-theme"
|
||||
"core:window:allow-set-theme",
|
||||
"window-state:default"
|
||||
]
|
||||
}
|
||||
|
@@ -137,12 +137,24 @@ pub fn run() {
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.plugin(tauri_plugin_deep_link::init())
|
||||
.plugin(
|
||||
tauri_plugin_window_state::Builder::default()
|
||||
.with_state_flags(tauri_plugin_window_state::StateFlags::all())
|
||||
.build(),
|
||||
)
|
||||
.setup(|app| {
|
||||
#[cfg(desktop)]
|
||||
{
|
||||
if let Err(e) = app.handle().plugin(
|
||||
tauri_plugin_window_state::Builder::default()
|
||||
.with_state_flags(tauri_plugin_window_state::StateFlags::all())
|
||||
.build(),
|
||||
) {
|
||||
logging!(
|
||||
error,
|
||||
Type::Setup,
|
||||
true,
|
||||
"Failed to initialize tauri-plugin-window-state: {}",
|
||||
e
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
logging!(info, Type::Setup, true, "开始应用初始化...");
|
||||
#[cfg(any(target_os = "linux", all(debug_assertions, windows)))]
|
||||
{
|
||||
|
@@ -11,14 +11,13 @@ use anyhow::{bail, Result};
|
||||
use once_cell::sync::OnceCell;
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use percent_encoding::percent_decode_str;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_yaml::Mapping;
|
||||
use std::{
|
||||
net::TcpListener,
|
||||
sync::Arc,
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
use tauri::{AppHandle, Emitter, Manager};
|
||||
use tokio::net::TcpListener;
|
||||
|
||||
use tauri::Url;
|
||||
//#[cfg(not(target_os = "linux"))]
|
||||
@@ -65,13 +64,6 @@ impl Default for UiReadyState {
|
||||
// 获取UI就绪状态细节
|
||||
static UI_READY_STATE: OnceCell<Arc<UiReadyState>> = OnceCell::new();
|
||||
|
||||
// 定义窗口状态结构体
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
struct WindowState {
|
||||
width: Option<u32>,
|
||||
height: Option<u32>,
|
||||
}
|
||||
|
||||
fn get_window_creating_lock() -> &'static Mutex<(bool, Instant)> {
|
||||
WINDOW_CREATING.get_or_init(|| Mutex::new((false, Instant::now())))
|
||||
}
|
||||
@@ -131,8 +123,8 @@ pub fn reset_ui_ready() {
|
||||
logging!(info, Type::Window, true, "UI就绪状态已重置");
|
||||
}
|
||||
|
||||
pub fn find_unused_port() -> Result<u16> {
|
||||
match TcpListener::bind("127.0.0.1:0") {
|
||||
pub async fn find_unused_port() -> Result<u16> {
|
||||
match TcpListener::bind("127.0.0.1:0").await {
|
||||
Ok(listener) => {
|
||||
let port = listener.local_addr()?.port();
|
||||
Ok(port)
|
||||
@@ -164,7 +156,15 @@ pub async fn resolve_setup_async(app_handle: &AppHandle) {
|
||||
|
||||
logging_error!(Type::Setup, true, init::startup_script().await);
|
||||
|
||||
logging_error!(Type::System, true, resolve_random_port_config());
|
||||
if let Err(err) = resolve_random_port_config().await {
|
||||
logging!(
|
||||
error,
|
||||
Type::System,
|
||||
true,
|
||||
"Failed to resolve random port config: {}",
|
||||
err
|
||||
);
|
||||
}
|
||||
|
||||
logging!(trace, Type::Config, true, "初始化配置...");
|
||||
logging_error!(Type::Config, true, Config::init_config().await);
|
||||
@@ -302,8 +302,8 @@ pub fn create_window(is_show: bool) -> bool {
|
||||
.visible(false)
|
||||
.build()
|
||||
{
|
||||
Ok(_) => {
|
||||
logging!(info, Type::Window, true, "主窗口创建成功");
|
||||
Ok(newly_created_window) => {
|
||||
logging!(debug, Type::Window, true, "主窗口实例创建成功");
|
||||
|
||||
*creating = (false, Instant::now());
|
||||
|
||||
@@ -311,82 +311,117 @@ pub fn create_window(is_show: bool) -> bool {
|
||||
|
||||
AsyncHandler::spawn(move || async move {
|
||||
handle::Handle::global().mark_startup_completed();
|
||||
logging!(info, Type::Window, true, "标记启动完成");
|
||||
logging!(
|
||||
debug,
|
||||
Type::Window,
|
||||
true,
|
||||
"异步窗口任务开始 (启动已标记完成)"
|
||||
);
|
||||
|
||||
if let Some(app_handle) = handle::Handle::global().app_handle() {
|
||||
if let Some(window) = app_handle.get_webview_window("main") {
|
||||
let _ = window.emit("verge://startup-completed", ());
|
||||
logging!(info, Type::Window, true, "已发送启动完成事件");
|
||||
#[cfg(target_os = "macos")]
|
||||
let _ = newly_created_window.set_decorations(false);
|
||||
|
||||
if is_show {
|
||||
let window_clone = window.clone();
|
||||
if is_show {
|
||||
let window_clone = newly_created_window.clone();
|
||||
|
||||
let timeout_seconds =
|
||||
if crate::module::lightweight::is_in_lightweight_mode() {
|
||||
2
|
||||
} else {
|
||||
5
|
||||
};
|
||||
// Attempt to show and focus the window first.
|
||||
let _ = window_clone.show();
|
||||
let _ = window_clone.set_focus();
|
||||
logging!(debug, Type::Window, true, "窗口已尝试显示和聚焦");
|
||||
|
||||
tokio::time::sleep(Duration::from_millis(100)).await; // Crucial delay
|
||||
|
||||
logging!(
|
||||
debug,
|
||||
Type::Window,
|
||||
true,
|
||||
"延时后,尝试发送 verge://startup-completed 事件"
|
||||
);
|
||||
if let Err(e) = newly_created_window.emit("verge://startup-completed", ()) {
|
||||
logging!(
|
||||
error,
|
||||
Type::Window,
|
||||
true,
|
||||
"发送 verge://startup-completed 事件失败: {}",
|
||||
e
|
||||
);
|
||||
} else {
|
||||
logging!(
|
||||
info,
|
||||
Type::Window,
|
||||
true,
|
||||
"已发送 verge://startup-completed 事件"
|
||||
);
|
||||
}
|
||||
|
||||
let timeout_seconds = if crate::module::lightweight::is_in_lightweight_mode() {
|
||||
2
|
||||
} else {
|
||||
5
|
||||
};
|
||||
|
||||
logging!(
|
||||
info,
|
||||
Type::Window,
|
||||
true,
|
||||
"等待UI就绪 (最多{}秒)...",
|
||||
timeout_seconds
|
||||
);
|
||||
|
||||
let wait_result =
|
||||
tokio::time::timeout(Duration::from_secs(timeout_seconds), async {
|
||||
while !*get_ui_ready().read() {
|
||||
tokio::time::sleep(Duration::from_millis(100)).await;
|
||||
}
|
||||
})
|
||||
.await;
|
||||
|
||||
match wait_result {
|
||||
Ok(_) => {
|
||||
logging!(info, Type::Window, true, "UI就绪");
|
||||
}
|
||||
Err(_) => {
|
||||
logging!(
|
||||
info,
|
||||
warn,
|
||||
Type::Window,
|
||||
true,
|
||||
"等待UI就绪,最多{}秒",
|
||||
"等待UI就绪超时({}秒),强制标记就绪",
|
||||
timeout_seconds
|
||||
);
|
||||
|
||||
let wait_result =
|
||||
tokio::time::timeout(Duration::from_secs(timeout_seconds), async {
|
||||
let mut check_count = 0;
|
||||
while !*get_ui_ready().read() {
|
||||
check_count += 1;
|
||||
if check_count % 10 == 0 {
|
||||
let state = get_ui_ready_state();
|
||||
let stage = *state.stage.read();
|
||||
logging!(
|
||||
info,
|
||||
Type::Window,
|
||||
true,
|
||||
"等待UI就绪中... 当前阶段: {:?}, 已等待: {}ms",
|
||||
stage,
|
||||
check_count * 100
|
||||
);
|
||||
}
|
||||
tokio::time::sleep(Duration::from_millis(100)).await;
|
||||
}
|
||||
})
|
||||
.await;
|
||||
|
||||
match wait_result {
|
||||
Ok(_) => {
|
||||
logging!(info, Type::Window, true, "UI就绪,显示窗口");
|
||||
}
|
||||
Err(_) => {
|
||||
logging!(
|
||||
warn,
|
||||
Type::Window,
|
||||
true,
|
||||
"等待UI就绪超时({}秒),强制显示窗口",
|
||||
timeout_seconds
|
||||
);
|
||||
|
||||
*get_ui_ready().write() = true;
|
||||
}
|
||||
}
|
||||
|
||||
let _ = window_clone.show();
|
||||
let _ = window_clone.set_focus();
|
||||
|
||||
logging!(info, Type::Window, true, "窗口创建和显示流程已完成");
|
||||
*get_ui_ready().write() = true;
|
||||
}
|
||||
}
|
||||
logging!(info, Type::Window, true, "窗口显示流程完成");
|
||||
} else {
|
||||
logging!(
|
||||
debug,
|
||||
Type::Window,
|
||||
true,
|
||||
"is_show为false,窗口保持隐藏。尝试发送启动事件。"
|
||||
);
|
||||
if let Err(e) = newly_created_window.emit("verge://startup-completed", ()) {
|
||||
logging!(
|
||||
warn,
|
||||
Type::Window,
|
||||
true,
|
||||
"发送 verge://startup-completed 事件失败 (is_show=false, 窗口隐藏): {}",
|
||||
e
|
||||
);
|
||||
} else {
|
||||
logging!(
|
||||
debug,
|
||||
Type::Window,
|
||||
true,
|
||||
"已发送 verge://startup-completed 事件 (is_show=false, 窗口隐藏)"
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
true
|
||||
}
|
||||
Err(e) => {
|
||||
logging!(error, Type::Window, true, "Failed to create window: {}", e);
|
||||
logging!(error, Type::Window, true, "主窗口构建失败: {}", e);
|
||||
*creating = (false, Instant::now()); // Reset the creating state if window creation failed
|
||||
false
|
||||
}
|
||||
}
|
||||
@@ -452,7 +487,7 @@ pub async fn resolve_scheme(param: String) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn resolve_random_port_config() -> Result<()> {
|
||||
async fn resolve_random_port_config() -> Result<()> {
|
||||
let verge_config = Config::verge();
|
||||
let clash_config = Config::clash();
|
||||
let enable_random_port = verge_config.latest().enable_random_port.unwrap_or(false);
|
||||
@@ -463,21 +498,34 @@ fn resolve_random_port_config() -> Result<()> {
|
||||
.unwrap_or(clash_config.data().get_mixed_port());
|
||||
|
||||
let port = if enable_random_port {
|
||||
find_unused_port().unwrap_or(default_port)
|
||||
find_unused_port().await.unwrap_or(default_port)
|
||||
} else {
|
||||
default_port
|
||||
};
|
||||
|
||||
verge_config.data().patch_config(IVerge {
|
||||
verge_mixed_port: Some(port),
|
||||
..IVerge::default()
|
||||
});
|
||||
verge_config.data().save_file()?;
|
||||
let port_to_save = port;
|
||||
|
||||
tokio::task::spawn_blocking(move || {
|
||||
let verge_config_accessor = Config::verge();
|
||||
let mut verge_data = verge_config_accessor.data();
|
||||
verge_data.patch_config(IVerge {
|
||||
verge_mixed_port: Some(port_to_save),
|
||||
..IVerge::default()
|
||||
});
|
||||
verge_data.save_file()
|
||||
})
|
||||
.await??; // First ? for spawn_blocking error, second for save_file Result
|
||||
|
||||
tokio::task::spawn_blocking(move || {
|
||||
let clash_config_accessor = Config::clash(); // Extend lifetime of the accessor
|
||||
let mut clash_data = clash_config_accessor.data(); // Access within blocking task, made mutable
|
||||
let mut mapping = Mapping::new();
|
||||
mapping.insert("mixed-port".into(), port_to_save.into());
|
||||
clash_data.patch_config(mapping);
|
||||
clash_data.save_config()
|
||||
})
|
||||
.await??;
|
||||
|
||||
let mut mapping = Mapping::new();
|
||||
mapping.insert("mixed-port".into(), port.into());
|
||||
clash_config.data().patch_config(mapping);
|
||||
clash_config.data().save_config()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@@ -150,7 +150,7 @@ export const EnhancedTrafficGraph = memo(forwardRef<EnhancedTrafficGraphRef>(
|
||||
// 更新显示数据
|
||||
const pointsToShow = getMaxPointsByTimeRange(timeRange);
|
||||
setDisplayData(initialBuffer.slice(-pointsToShow));
|
||||
}, [MAX_BUFFER_SIZE, getMaxPointsByTimeRange, timeRange]);
|
||||
}, [MAX_BUFFER_SIZE, getMaxPointsByTimeRange]);
|
||||
// 添加数据点方法
|
||||
const appendData = useCallback((data: ITrafficItem) => {
|
||||
const safeData = {
|
||||
|
@@ -26,28 +26,34 @@ export const SystemInfoCard = () => {
|
||||
const navigate = useNavigate();
|
||||
const { isAdminMode, isSidecarMode, mutateRunningMode } = useSystemState();
|
||||
|
||||
// 系统信息状态
|
||||
const [systemState, setSystemState] = useState({
|
||||
osInfo: "",
|
||||
lastCheckUpdate: "-",
|
||||
});
|
||||
// 系统信息状态
|
||||
const [systemState, setSystemState] = useState({
|
||||
osInfo: "",
|
||||
lastCheckUpdate: "-",
|
||||
});
|
||||
|
||||
// 初始化系统信息
|
||||
useEffect(() => {
|
||||
// 获取系统信息
|
||||
getSystemInfo()
|
||||
.then((info) => {
|
||||
const lines = info.split("\n");
|
||||
if (lines.length > 0) {
|
||||
const sysName = lines[0].split(": ")[1] || "";
|
||||
const sysVersion = lines[1].split(": ")[1] || "";
|
||||
setSystemState((prev) => ({
|
||||
...prev,
|
||||
osInfo: `${sysName} ${sysVersion}`,
|
||||
}));
|
||||
// 初始化系统信息
|
||||
useEffect(() => {
|
||||
// 获取系统信息
|
||||
getSystemInfo()
|
||||
.then((info) => {
|
||||
const lines = info.split("\n");
|
||||
if (lines.length > 0) {
|
||||
const sysName = lines[0].split(": ")[1] || "";
|
||||
let sysVersion = lines[1].split(": ")[1] || "";
|
||||
|
||||
// 处理sysVersion前缀与sysName相同的情况
|
||||
if (sysName && sysVersion.toLowerCase().startsWith(sysName.toLowerCase())) {
|
||||
sysVersion = sysVersion.substring(sysName.length).trim();
|
||||
}
|
||||
})
|
||||
.catch(console.error);
|
||||
|
||||
setSystemState((prev) => ({
|
||||
...prev,
|
||||
osInfo: `${sysName} ${sysVersion}`,
|
||||
}));
|
||||
}
|
||||
})
|
||||
.catch(console.error);
|
||||
|
||||
// 获取最后检查更新时间
|
||||
const lastCheck = localStorage.getItem("last_check_update");
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import useSWR from "swr";
|
||||
import { forwardRef, useImperativeHandle, useState, useMemo } from "react";
|
||||
import { forwardRef, useImperativeHandle, useState, useMemo, useEffect } from "react";
|
||||
import { useLockFn } from "ahooks";
|
||||
import { Box, LinearProgress, Button } from "@mui/material";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -14,12 +14,11 @@ import ReactMarkdown from "react-markdown";
|
||||
import { useListen } from "@/hooks/use-listen";
|
||||
import { showNotice } from "@/services/noticeService";
|
||||
|
||||
let eventListener: UnlistenFn | null = null;
|
||||
|
||||
export const UpdateViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [open, setOpen] = useState(false);
|
||||
const [currentProgressListener, setCurrentProgressListener] = useState<UnlistenFn | null>(null);
|
||||
|
||||
const updateState = useUpdateState();
|
||||
const setUpdateState = useSetUpdateState();
|
||||
@@ -66,10 +65,12 @@ export const UpdateViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
}
|
||||
if (updateState) return;
|
||||
setUpdateState(true);
|
||||
if (eventListener !== null) {
|
||||
eventListener();
|
||||
|
||||
if (currentProgressListener) {
|
||||
currentProgressListener();
|
||||
}
|
||||
eventListener = await addListener(
|
||||
|
||||
const progressListener = await addListener(
|
||||
"tauri://update-download-progress",
|
||||
(e: Event<any>) => {
|
||||
setTotal(e.payload.contentLength);
|
||||
@@ -79,6 +80,8 @@ export const UpdateViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
});
|
||||
},
|
||||
);
|
||||
setCurrentProgressListener(() => progressListener);
|
||||
|
||||
try {
|
||||
await updateInfo.downloadAndInstall();
|
||||
await relaunch();
|
||||
@@ -86,9 +89,22 @@ export const UpdateViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
showNotice('error', err?.message || err.toString());
|
||||
} finally {
|
||||
setUpdateState(false);
|
||||
if (progressListener) {
|
||||
progressListener();
|
||||
}
|
||||
setCurrentProgressListener(null);
|
||||
}
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
if (currentProgressListener) {
|
||||
console.log("UpdateViewer unmounting, cleaning up progress listener.");
|
||||
currentProgressListener();
|
||||
}
|
||||
};
|
||||
}, [currentProgressListener]);
|
||||
|
||||
return (
|
||||
<BaseDialog
|
||||
open={open}
|
||||
|
@@ -21,8 +21,6 @@ interface Props {
|
||||
onDelete: (uid: string) => void;
|
||||
}
|
||||
|
||||
let eventListener: UnlistenFn = () => {};
|
||||
|
||||
export const TestItem = (props: Props) => {
|
||||
const { itemData, onEdit, onDelete: onDeleteItem } = props;
|
||||
const {
|
||||
@@ -42,6 +40,12 @@ export const TestItem = (props: Props) => {
|
||||
const [iconCachePath, setIconCachePath] = useState("");
|
||||
const { addListener } = useListen();
|
||||
|
||||
const onDelay = async () => {
|
||||
setDelay(-2);
|
||||
const result = await cmdTestDelay(url);
|
||||
setDelay(result);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
initIconCachePath();
|
||||
}, [icon]);
|
||||
@@ -58,12 +62,6 @@ export const TestItem = (props: Props) => {
|
||||
return url.substring(url.lastIndexOf("/") + 1);
|
||||
}
|
||||
|
||||
const onDelay = async () => {
|
||||
setDelay(-2);
|
||||
const result = await cmdTestDelay(url);
|
||||
setDelay(result);
|
||||
};
|
||||
|
||||
const onEditTest = () => {
|
||||
setAnchorEl(null);
|
||||
onEdit();
|
||||
@@ -83,16 +81,27 @@ export const TestItem = (props: Props) => {
|
||||
{ label: "Delete", handler: onDelete },
|
||||
];
|
||||
|
||||
const listenTsetEvent = async () => {
|
||||
eventListener();
|
||||
eventListener = await addListener("verge://test-all", () => {
|
||||
onDelay();
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
listenTsetEvent();
|
||||
}, [url]);
|
||||
let unlistenFn: UnlistenFn | null = null;
|
||||
|
||||
const setupListener = async () => {
|
||||
if (unlistenFn) {
|
||||
unlistenFn();
|
||||
}
|
||||
unlistenFn = await addListener("verge://test-all", () => {
|
||||
onDelay();
|
||||
});
|
||||
};
|
||||
|
||||
setupListener();
|
||||
|
||||
return () => {
|
||||
if (unlistenFn) {
|
||||
console.log(`TestItem for ${props.id} unmounting or url changed, cleaning up test-all listener.`);
|
||||
unlistenFn();
|
||||
}
|
||||
};
|
||||
}, [url, addListener, onDelay, props.id]);
|
||||
|
||||
return (
|
||||
<Box
|
||||
|
@@ -376,31 +376,97 @@ const IP_CHECK_SERVICES: ServiceConfig[] = [
|
||||
}),
|
||||
},
|
||||
{
|
||||
url: "https://ipinfo.io/json",
|
||||
mapping: (data) => {
|
||||
const [asn, ...orgParts] = (data.org || '').split(' ');
|
||||
const asnOrg = orgParts.join(' ');
|
||||
|
||||
return {
|
||||
ip: data.ip || '',
|
||||
country_code: data.country || '',
|
||||
country: data.country || '',
|
||||
region: data.region || '',
|
||||
city: data.city || '',
|
||||
organization: asnOrg || '',
|
||||
asn: asn? parseInt(asn.replace('AS', '')) : 0,
|
||||
asn_organization: asnOrg || '',
|
||||
longitude: parseFloat(data.loc?.split(',')[1] || '0'),
|
||||
latitude: parseFloat(data.loc?.split(',')[0] || '0'),
|
||||
timezone: data.timezone || '',
|
||||
};
|
||||
},
|
||||
url: "https://api.ipapi.is/",
|
||||
mapping: (data) => ({
|
||||
ip: data.ip || '',
|
||||
country_code: data.location?.country_code || '',
|
||||
country: data.location?.country || '',
|
||||
region: data.location?.state || '',
|
||||
city: data.location?.city || '',
|
||||
organization: data.asn?.org || data.company?.name || '',
|
||||
asn: data.asn?.asn || 0,
|
||||
asn_organization: data.asn?.org || '',
|
||||
longitude: data.location?.longitude || 0,
|
||||
latitude: data.location?.latitude || 0,
|
||||
timezone: data.location?.timezone || '',
|
||||
}),
|
||||
},
|
||||
{
|
||||
url: "https://ipwho.is/",
|
||||
mapping: (data) => ({
|
||||
ip: data.ip || '',
|
||||
country_code: data.country_code || '',
|
||||
country: data.country || '',
|
||||
region: data.region || '',
|
||||
city: data.city || '',
|
||||
organization: data.connection?.org || data.connection?.isp || '',
|
||||
asn: data.connection?.asn || 0,
|
||||
asn_organization: data.connection?.isp || '',
|
||||
longitude: data.longitude || 0,
|
||||
latitude: data.latitude || 0,
|
||||
timezone: data.timezone?.id || '',
|
||||
}),
|
||||
},
|
||||
];
|
||||
|
||||
// 随机打乱服务列表顺序
|
||||
// 随机性服务列表洗牌函数
|
||||
function shuffleServices() {
|
||||
return [...IP_CHECK_SERVICES].sort(() => Math.random() - 0.5);
|
||||
// 过滤无效服务并确保每个元素符合ServiceConfig接口
|
||||
const validServices = IP_CHECK_SERVICES.filter(
|
||||
(service): service is ServiceConfig =>
|
||||
service !== null &&
|
||||
service !== undefined &&
|
||||
typeof service.url === 'string' &&
|
||||
typeof service.mapping === 'function' // 添加对mapping属性的检查
|
||||
);
|
||||
|
||||
if (validServices.length === 0) {
|
||||
console.error('No valid services found in IP_CHECK_SERVICES');
|
||||
return [];
|
||||
}
|
||||
|
||||
// 使用单一Fisher-Yates洗牌算法,增强随机性
|
||||
const shuffled = [...validServices];
|
||||
const length = shuffled.length;
|
||||
|
||||
// 使用多个种子进行多次洗牌
|
||||
const seeds = [
|
||||
Math.random(),
|
||||
Date.now() / 1000,
|
||||
performance.now() / 1000
|
||||
];
|
||||
|
||||
for (const seed of seeds) {
|
||||
const prng = createPrng(seed);
|
||||
|
||||
// Fisher-Yates洗牌算法
|
||||
for (let i = length - 1; i > 0; i--) {
|
||||
const j = Math.floor(prng() * (i + 1));
|
||||
|
||||
// 使用临时变量进行交换,避免解构赋值可能的问题
|
||||
const temp = shuffled[i];
|
||||
shuffled[i] = shuffled[j];
|
||||
shuffled[j] = temp;
|
||||
}
|
||||
}
|
||||
|
||||
return shuffled;
|
||||
}
|
||||
|
||||
// 创建一个简单的随机数生成器
|
||||
function createPrng(seed: number): () => number {
|
||||
// 使用xorshift32算法
|
||||
let state = seed >>> 0;
|
||||
|
||||
// 如果种子为0,设置一个默认值
|
||||
if (state === 0) state = 123456789;
|
||||
|
||||
return function() {
|
||||
state ^= state << 13;
|
||||
state ^= state >>> 17;
|
||||
state ^= state << 5;
|
||||
return (state >>> 0) / 4294967296;
|
||||
};
|
||||
}
|
||||
|
||||
// 获取当前IP和地理位置信息
|
||||
|
@@ -10,11 +10,13 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=6.1.24
|
||||
PKG_RELEASE:=3
|
||||
# PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.58/
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
||||
PKG_HASH:=5d39aca7e34c33cb9b3e366117b2e86841b7bdd37933679d6b1e61be6b150648
|
||||
PKG_VERSION:=6.1.110-1
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v6.1.110/
|
||||
PKG_HASH:=2415bc529ca25be0aa597f9638d8b6fc4138080bbaea96881a38101896df6703
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
||||
@@ -297,19 +299,13 @@ define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
$(PKG_UNPACK)
|
||||
$(Build/Patch)
|
||||
rm -rf \
|
||||
$(PKG_BUILD_DIR)/include/linux/ssb \
|
||||
$(PKG_BUILD_DIR)/include/linux/bcma \
|
||||
$(PKG_BUILD_DIR)/include/net/bluetooth
|
||||
|
||||
rm -f \
|
||||
$(PKG_BUILD_DIR)/include/linux/cordic.h \
|
||||
$(PKG_BUILD_DIR)/include/linux/crc8.h \
|
||||
$(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h \
|
||||
$(PKG_BUILD_DIR)/include/linux/wl12xx.h \
|
||||
$(PKG_BUILD_DIR)/include/linux/mhi.h \
|
||||
$(PKG_BUILD_DIR)/include/net/ieee80211.h \
|
||||
$(PKG_BUILD_DIR)/backport-include/linux/bcm47xx_nvram.h
|
||||
$(PKG_BUILD_DIR)/include/net/rsi_91x.h \
|
||||
$(PKG_BUILD_DIR)/include/trace/events/qrtr.h \
|
||||
$(PKG_BUILD_DIR)/backport-include/linux/platform_data/brcmnand.h \
|
||||
$(PKG_BUILD_DIR)/backport-include/linux/soc/mediatek/mtk_wed.h
|
||||
|
||||
echo 'compat-wireless-$(PKG_VERSION)-$(PKG_RELEASE)-$(REVISION)' > $(PKG_BUILD_DIR)/compat_version
|
||||
endef
|
||||
@@ -325,7 +321,6 @@ endif
|
||||
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
|
||||
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
|
||||
define Build/Configure
|
||||
cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h
|
||||
cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h
|
||||
cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h
|
||||
endef
|
||||
|
@@ -245,11 +245,11 @@ config PACKAGE_B43_USE_BCMA
|
||||
This allows choosing buses that b43 should support.
|
||||
|
||||
config PACKAGE_B43_BUSES_BCMA_AND_SSB
|
||||
depends on !TARGET_bcm47xx_legacy && !TARGET_bcm47xx_mips74k && !TARGET_bcm53xx
|
||||
depends on !TARGET_bcm47xx_legacy && !TARGET_bcm47xx_mips74k && !TARGET_bcm53xx && !TARGET_bmips
|
||||
bool "BCMA and SSB"
|
||||
|
||||
config PACKAGE_B43_BUSES_BCMA
|
||||
depends on !TARGET_bcm47xx_legacy
|
||||
depends on !TARGET_bcm47xx_legacy && !TARGET_bmips_bcm6358 && !TARGET_bmips_bcm6368
|
||||
bool "BCMA only"
|
||||
|
||||
config PACKAGE_B43_BUSES_SSB
|
||||
@@ -429,10 +429,10 @@ define KernelPackage/brcmfmac/config
|
||||
|
||||
config BRCMFMAC_SDIO
|
||||
bool "Enable SDIO bus interface support"
|
||||
default y if TARGET_bcm27xx
|
||||
default y if TARGET_sunxi
|
||||
default y if TARGET_rockchip
|
||||
default y if TARGET_amlogic
|
||||
default y if TARGET_bcm27xx
|
||||
default y if TARGET_rockchip
|
||||
default y if TARGET_sunxi
|
||||
default n
|
||||
help
|
||||
Enable support for cards attached to an SDIO bus.
|
||||
|
@@ -140,14 +140,14 @@ mac80211_hostapd_setup_base() {
|
||||
[ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] &&
|
||||
append base_cfg "acs_exclude_dfs=1" "$N"
|
||||
|
||||
json_get_vars noscan ht_coex vendor_vht min_tx_power:0
|
||||
json_get_values ht_capab_list ht_capab tx_burst
|
||||
json_get_vars noscan ht_coex min_tx_power:0 tx_burst vendor_vht
|
||||
json_get_values ht_capab_list ht_capab
|
||||
json_get_values channel_list channels
|
||||
|
||||
[ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \
|
||||
channel_list="$channel"
|
||||
|
||||
[ "$min_tx_power" -gt 0 ] && append base_cfg "min_tx_power=$min_tx_power"
|
||||
[ "$min_tx_power" -gt 0 ] && append base_cfg "min_tx_power=$min_tx_power" "$N"
|
||||
|
||||
set_default noscan 0
|
||||
|
||||
@@ -205,7 +205,7 @@ mac80211_hostapd_setup_base() {
|
||||
dsss_cck_40:1
|
||||
|
||||
ht_cap_mask=0
|
||||
for cap in $(iw phy "$phy" info | grep 'Capabilities:' | cut -d: -f2); do
|
||||
for cap in $(iw phy "$phy" info | grep -E '^\s*Capabilities:' | cut -d: -f2); do
|
||||
ht_cap_mask="$(($ht_cap_mask | $cap))"
|
||||
done
|
||||
|
||||
@@ -271,6 +271,7 @@ mac80211_hostapd_setup_base() {
|
||||
case "$channel" in
|
||||
36|40|44|48|52|56|60|64) idx=50;;
|
||||
100|104|108|112|116|120|124|128) idx=114;;
|
||||
149|153|157|161|165|169|173|177) idx=163;;
|
||||
esac
|
||||
fi
|
||||
enable_ac=1
|
||||
@@ -329,6 +330,11 @@ mac80211_hostapd_setup_base() {
|
||||
[ "$rx_stbc" -lt "$cap_rx_stbc" ] && cap_rx_stbc="$rx_stbc"
|
||||
vht_cap="$(( ($vht_cap & ~(0x700)) | ($cap_rx_stbc << 8) ))"
|
||||
|
||||
[ "$vht_oper_chwidth" -lt 2 ] && {
|
||||
vht160=0
|
||||
short_gi_160=0
|
||||
}
|
||||
|
||||
mac80211_add_capabilities vht_capab $vht_cap \
|
||||
RXLDPC:0x10::$rxldpc \
|
||||
SHORT-GI-80:0x20::$short_gi_80 \
|
||||
@@ -425,9 +431,9 @@ mac80211_hostapd_setup_base() {
|
||||
he_bss_color:128 \
|
||||
he_bss_color_enabled:1
|
||||
|
||||
he_phy_cap=$(iw phy "$phy" info | sed -n '/HE Iftypes: AP/,$p' | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1)
|
||||
he_phy_cap=$(iw phy "$phy" info | sed -n '/HE Iftypes: .*AP/,$p' | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1)
|
||||
he_phy_cap=${he_phy_cap:2}
|
||||
he_mac_cap=$(iw phy "$phy" info | sed -n '/HE Iftypes: AP/,$p' | awk -F "[()]" '/HE MAC Capabilities/ { print $2 }' | head -1)
|
||||
he_mac_cap=$(iw phy "$phy" info | sed -n '/HE Iftypes: .*AP/,$p' | awk -F "[()]" '/HE MAC Capabilities/ { print $2 }' | head -1)
|
||||
he_mac_cap=${he_mac_cap:2}
|
||||
|
||||
append base_cfg "ieee80211ax=1" "$N"
|
||||
@@ -440,7 +446,6 @@ mac80211_hostapd_setup_base() {
|
||||
he_su_beamformer:${he_phy_cap:6:2}:0x80:$he_su_beamformer \
|
||||
he_su_beamformee:${he_phy_cap:8:2}:0x1:$he_su_beamformee \
|
||||
he_mu_beamformer:${he_phy_cap:8:2}:0x2:$he_mu_beamformer \
|
||||
he_spr_psr_enabled:${he_phy_cap:14:2}:0x1:$he_spr_psr_enabled \
|
||||
he_twt_required:${he_mac_cap:0:2}:0x6:$he_twt_required
|
||||
|
||||
if [ "$he_bss_color_enabled" -gt 0 ]; then
|
||||
@@ -449,6 +454,7 @@ mac80211_hostapd_setup_base() {
|
||||
append base_cfg "he_spr_non_srg_obss_pd_max_offset=$he_spr_non_srg_obss_pd_max_offset" "$N"
|
||||
he_spr_sr_control=$((he_spr_sr_control | (1 << 2)))
|
||||
}
|
||||
[ "$he_spr_psr_enabled" -gt 0 ] && he_spr_psr_enabled=$((0x${he_phy_cap:14:2} & 0x1))
|
||||
[ "$he_spr_psr_enabled" -gt 0 ] || he_spr_sr_control=$((he_spr_sr_control | (1 << 0)))
|
||||
append base_cfg "he_spr_sr_control=$he_spr_sr_control" "$N"
|
||||
else
|
||||
|
@@ -14,7 +14,7 @@
|
||||
CFLAGS_trace.o := -I$(src)
|
||||
--- a/drivers/net/wireless/ath/ath.h
|
||||
+++ b/drivers/net/wireless/ath/ath.h
|
||||
@@ -317,14 +317,7 @@ void _ath_dbg(struct ath_common *common,
|
||||
@@ -321,14 +321,7 @@ void _ath_dbg(struct ath_common *common,
|
||||
#endif /* CPTCFG_ATH_DEBUG */
|
||||
|
||||
/** Returns string describing opmode, or NULL if unknown mode. */
|
||||
|
@@ -82,7 +82,7 @@
|
||||
help
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -102,6 +102,7 @@ ADM8211=
|
||||
@@ -94,6 +94,7 @@ ADM8211=
|
||||
ATH_COMMON=
|
||||
WLAN_VENDOR_ATH=
|
||||
ATH_DEBUG=
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -3370,6 +3370,8 @@ void regulatory_hint_country_ie(struct w
|
||||
@@ -3373,6 +3373,8 @@ void regulatory_hint_country_ie(struct w
|
||||
enum environment_cap env = ENVIRON_ANY;
|
||||
struct regulatory_request *request = NULL, *lr;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* IE len must be evenly divisible by 2 */
|
||||
if (country_ie_len & 0x01)
|
||||
return;
|
||||
@@ -3621,6 +3623,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
@@ -3624,6 +3626,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
|
||||
void regulatory_hint_disconnect(void)
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
@@ -86,6 +86,12 @@ config ATH10K_TRACING
|
||||
@@ -87,6 +87,12 @@ config ATH10K_TRACING
|
||||
help
|
||||
Select this to ath10k use tracing infrastructure.
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -161,6 +161,7 @@ ATH10K_SNOC=
|
||||
@@ -153,6 +153,7 @@ ATH10K_SNOC=
|
||||
ATH10K_DEBUG=
|
||||
ATH10K_DEBUGFS=
|
||||
ATH10K_SPECTRAL=
|
||||
|
@@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -3516,6 +3516,17 @@ int ath10k_core_register(struct ath10k *
|
||||
@@ -3510,6 +3510,17 @@ int ath10k_core_register(struct ath10k *
|
||||
|
||||
queue_work(ar->workqueue, &ar->register_work);
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -9909,6 +9909,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
@@ -9918,6 +9918,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
int ath10k_mac_register(struct ath10k *ar)
|
||||
{
|
||||
static const u32 cipher_suites[] = {
|
||||
@@ -10267,6 +10282,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10276,6 +10291,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
|
@@ -85,7 +85,7 @@ v13:
|
||||
create mode 100644 drivers/net/wireless/ath/ath10k/leds.h
|
||||
--- a/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
@@ -71,6 +71,16 @@ config ATH10K_DEBUGFS
|
||||
@@ -72,6 +72,16 @@ config ATH10K_DEBUGFS
|
||||
|
||||
If unsure, say Y to make it easier to debug problems.
|
||||
|
||||
@@ -114,7 +114,7 @@ v13:
|
||||
ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -162,6 +162,7 @@ ATH10K_DEBUG=
|
||||
@@ -154,6 +154,7 @@ ATH10K_DEBUG=
|
||||
ATH10K_DEBUGFS=
|
||||
ATH10K_SPECTRAL=
|
||||
ATH10K_THERMAL=
|
||||
@@ -172,7 +172,7 @@ v13:
|
||||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -3231,6 +3237,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
@@ -3225,6 +3231,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
goto err_hif_stop;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ v13:
|
||||
return 0;
|
||||
|
||||
err_hif_stop:
|
||||
@@ -3489,9 +3499,18 @@ static void ath10k_core_register_work(st
|
||||
@@ -3483,9 +3493,18 @@ static void ath10k_core_register_work(st
|
||||
goto err_spectral_destroy;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ v13:
|
||||
err_spectral_destroy:
|
||||
ath10k_spectral_destroy(ar);
|
||||
err_debug_destroy:
|
||||
@@ -3538,6 +3557,8 @@ void ath10k_core_unregister(struct ath10
|
||||
@@ -3532,6 +3551,8 @@ void ath10k_core_unregister(struct ath10
|
||||
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
||||
return;
|
||||
|
||||
@@ -221,7 +221,7 @@ v13:
|
||||
|
||||
#include "htt.h"
|
||||
#include "htc.h"
|
||||
@@ -1253,6 +1254,13 @@ struct ath10k {
|
||||
@@ -1256,6 +1257,13 @@ struct ath10k {
|
||||
} testmode;
|
||||
|
||||
struct {
|
||||
@@ -237,7 +237,7 @@ v13:
|
||||
u32 fw_crash_counter;
|
||||
--- a/drivers/net/wireless/ath/ath10k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/hw.h
|
||||
@@ -519,6 +519,7 @@ struct ath10k_hw_params {
|
||||
@@ -520,6 +520,7 @@ struct ath10k_hw_params {
|
||||
const char *name;
|
||||
u32 patch_load_addr;
|
||||
int uart_pin;
|
||||
@@ -456,7 +456,7 @@ v13:
|
||||
{
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
|
||||
@@ -4594,6 +4594,8 @@ static const struct wmi_ops wmi_tlv_ops
|
||||
@@ -4598,6 +4598,8 @@ static const struct wmi_ops wmi_tlv_ops
|
||||
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
|
||||
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
|
||||
.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
|
||||
@@ -467,7 +467,7 @@ v13:
|
||||
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
@@ -7472,6 +7472,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
||||
@@ -7492,6 +7492,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
||||
return skb;
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ v13:
|
||||
static struct sk_buff *
|
||||
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
|
||||
enum wmi_sta_ps_mode psmode)
|
||||
@@ -9160,6 +9203,9 @@ static const struct wmi_ops wmi_ops = {
|
||||
@@ -9180,6 +9223,9 @@ static const struct wmi_ops wmi_ops = {
|
||||
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
|
||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||
@@ -527,7 +527,7 @@ v13:
|
||||
/* .gen_bcn_tmpl not implemented */
|
||||
/* .gen_prb_tmpl not implemented */
|
||||
/* .gen_p2p_go_bcn_ie not implemented */
|
||||
@@ -9230,6 +9276,8 @@ static const struct wmi_ops wmi_10_1_ops
|
||||
@@ -9250,6 +9296,8 @@ static const struct wmi_ops wmi_10_1_ops
|
||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||
@@ -536,7 +536,7 @@ v13:
|
||||
/* .gen_bcn_tmpl not implemented */
|
||||
/* .gen_prb_tmpl not implemented */
|
||||
/* .gen_p2p_go_bcn_ie not implemented */
|
||||
@@ -9302,6 +9350,8 @@ static const struct wmi_ops wmi_10_2_ops
|
||||
@@ -9322,6 +9370,8 @@ static const struct wmi_ops wmi_10_2_ops
|
||||
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
|
||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||
@@ -545,7 +545,7 @@ v13:
|
||||
/* .gen_pdev_enable_adaptive_cca not implemented */
|
||||
};
|
||||
|
||||
@@ -9373,6 +9423,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
||||
@@ -9393,6 +9443,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
||||
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
|
||||
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
|
||||
.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
|
||||
@@ -554,7 +554,7 @@ v13:
|
||||
/* .gen_bcn_tmpl not implemented */
|
||||
/* .gen_prb_tmpl not implemented */
|
||||
/* .gen_p2p_go_bcn_ie not implemented */
|
||||
@@ -9454,6 +9506,8 @@ static const struct wmi_ops wmi_10_4_ops
|
||||
@@ -9474,6 +9526,8 @@ static const struct wmi_ops wmi_10_4_ops
|
||||
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
|
||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
|
||||
|
@@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
||||
@@ -1309,6 +1309,10 @@ struct ath10k {
|
||||
@@ -1312,6 +1312,10 @@ struct ath10k {
|
||||
s32 tx_power_2g_limit;
|
||||
s32 tx_power_5g_limit;
|
||||
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
if (ret)
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -10284,7 +10284,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10293,7 +10293,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
@@ -26,7 +26,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
#include <linux/property.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/ctype.h>
|
||||
@@ -3407,6 +3408,8 @@ static int ath10k_core_probe_fw(struct a
|
||||
@@ -3401,6 +3402,8 @@ static int ath10k_core_probe_fw(struct a
|
||||
|
||||
device_get_mac_address(ar->dev, ar->mac_addr);
|
||||
|
||||
|
@@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -10081,7 +10081,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10089,7 +10089,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
|
||||
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
|
||||
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -5034,6 +5034,7 @@ static void ath10k_mac_setup_ht_vht_cap(
|
||||
@@ -5036,6 +5036,7 @@ static void ath10k_mac_setup_ht_vht_cap(
|
||||
if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) {
|
||||
band = &ar->mac.sbands[NL80211_BAND_2GHZ];
|
||||
band->ht_cap = ht_cap;
|
@@ -35,7 +35,7 @@ Link: https://lore.kernel.org/r/20220923170235.18873-1-quic_adisi@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -1641,7 +1641,7 @@ static void ath11k_update_11d(struct wor
|
||||
@@ -1668,7 +1668,7 @@ static void ath11k_update_11d(struct wor
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ Link: https://lore.kernel.org/r/20220923170235.18873-1-quic_adisi@quicinc.com
|
||||
{
|
||||
struct ath11k *ar;
|
||||
struct ath11k_pdev *pdev;
|
||||
@@ -1730,9 +1730,6 @@ static void ath11k_core_restart(struct w
|
||||
@@ -1757,9 +1757,6 @@ static void ath11k_core_restart(struct w
|
||||
struct ath11k_base *ab = container_of(work, struct ath11k_base, restart_work);
|
||||
int ret;
|
||||
|
||||
@@ -66,7 +66,7 @@ Link: https://lore.kernel.org/r/20220923170235.18873-1-quic_adisi@quicinc.com
|
||||
const char *filename);
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -3164,6 +3164,9 @@ static void ath11k_qmi_driver_event_work
|
||||
@@ -3169,6 +3169,9 @@ static void ath11k_qmi_driver_event_work
|
||||
case ATH11K_QMI_EVENT_SERVER_EXIT:
|
||||
set_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags);
|
||||
set_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags);
|
||||
|
@@ -20,7 +20,7 @@ Link: https://lore.kernel.org/r/20221006005842.8599-1-quic_periyasa@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6421,18 +6421,16 @@ static int ath11k_mac_op_add_interface(s
|
||||
@@ -6425,18 +6425,16 @@ static int ath11k_mac_op_add_interface(s
|
||||
|
||||
ath11k_dp_vdev_tx_attach(ar, arvif);
|
||||
|
||||
@@ -42,7 +42,7 @@ Link: https://lore.kernel.org/r/20221006005842.8599-1-quic_periyasa@quicinc.com
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
|
||||
return 0;
|
||||
@@ -6457,7 +6455,6 @@ err_vdev_del:
|
||||
@@ -6461,7 +6459,6 @@ err_vdev_del:
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
|
||||
err:
|
||||
|
@@ -43,7 +43,7 @@ Link: https://lore.kernel.org/r/20221007051130.6067-1-quic_mpubbise@quicinc.com
|
||||
|
||||
static const u32 ath11k_smps_map[] = {
|
||||
[WLAN_HT_CAP_SM_PS_STATIC] = WMI_PEER_SMPS_STATIC,
|
||||
@@ -3612,6 +3615,7 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
@@ -3609,6 +3612,7 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
struct scan_req_params arg;
|
||||
int ret = 0;
|
||||
int i;
|
||||
@@ -51,7 +51,7 @@ Link: https://lore.kernel.org/r/20221007051130.6067-1-quic_mpubbise@quicinc.com
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
@@ -3681,6 +3685,26 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
@@ -3678,6 +3682,26 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
ether_addr_copy(arg.mac_mask.addr, req->mac_addr_mask);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ Link: https://lore.kernel.org/r/20221007051130.6067-1-quic_mpubbise@quicinc.com
|
||||
ret = ath11k_start_scan(ar, &arg);
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to start hw scan: %d\n", ret);
|
||||
@@ -3689,10 +3713,8 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
@@ -3686,10 +3710,8 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ Link: https://lore.kernel.org/r/20221007051130.6067-1-quic_mpubbise@quicinc.com
|
||||
|
||||
exit:
|
||||
kfree(arg.chan_list);
|
||||
@@ -9060,6 +9082,9 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9072,6 +9094,9 @@ static int __ath11k_mac_register(struct
|
||||
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP);
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6233,6 +6233,40 @@ void ath11k_mac_11d_scan_stop_all(struct
|
||||
@@ -6237,6 +6237,40 @@ void ath11k_mac_11d_scan_stop_all(struct
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
@@ -6468,10 +6502,7 @@ err_peer_del:
|
||||
@@ -6472,10 +6506,7 @@ err_peer_del:
|
||||
}
|
||||
|
||||
err_vdev_del:
|
||||
@@ -74,7 +74,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
list_del(&arvif->list);
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
@@ -6499,7 +6530,6 @@ static void ath11k_mac_op_remove_interfa
|
||||
@@ -6503,7 +6534,6 @@ static void ath11k_mac_op_remove_interfa
|
||||
struct ath11k *ar = hw->priv;
|
||||
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
@@ -82,7 +82,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
@@ -6520,29 +6550,13 @@ static void ath11k_mac_op_remove_interfa
|
||||
@@ -6524,29 +6554,13 @@ static void ath11k_mac_op_remove_interfa
|
||||
arvif->vdev_id, ret);
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ Link: https://lore.kernel.org/r/20221014155054.11471-1-quic_nmaran@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -1677,6 +1677,10 @@ void ath11k_core_pre_reconfigure_recover
|
||||
@@ -1704,6 +1704,10 @@ void ath11k_core_pre_reconfigure_recover
|
||||
ath11k_mac_tx_mgmt_pending_free, ar);
|
||||
idr_destroy(&ar->txmgmt_idr);
|
||||
wake_up(&ar->txmgmt_empty_waitq);
|
||||
|
@@ -1,42 +0,0 @@
|
||||
From dd1c2322694522f674c874f5fa02ac5ae39135dd Mon Sep 17 00:00:00 2001
|
||||
From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
|
||||
Date: Mon, 31 Oct 2022 12:43:41 +0100
|
||||
Subject: [PATCH] wifi: ath11k: synchronize
|
||||
ath11k_mac_he_gi_to_nl80211_he_gi()'s return type
|
||||
|
||||
ath11k_mac_he_gi_to_nl80211_he_gi() generates a valid warning with gcc-13:
|
||||
drivers/net/wireless/ath/ath11k/mac.c:321:20: error: conflicting types for 'ath11k_mac_he_gi_to_nl80211_he_gi' due to enum/integer mismatch; have 'enum nl80211_he_gi(u8)'
|
||||
drivers/net/wireless/ath/ath11k/mac.h:166:5: note: previous declaration of 'ath11k_mac_he_gi_to_nl80211_he_gi' with type 'u32(u8)'
|
||||
|
||||
I.e. the type of the return value ath11k_mac_he_gi_to_nl80211_he_gi() in
|
||||
the declaration is u32, while the definition spells enum nl80211_he_gi.
|
||||
Synchronize them to the latter.
|
||||
|
||||
Cc: Martin Liska <mliska@suse.cz>
|
||||
Cc: Kalle Valo <kvalo@kernel.org>
|
||||
Cc: "David S. Miller" <davem@davemloft.net>
|
||||
Cc: Eric Dumazet <edumazet@google.com>
|
||||
Cc: Jakub Kicinski <kuba@kernel.org>
|
||||
Cc: Paolo Abeni <pabeni@redhat.com>
|
||||
Cc: ath11k@lists.infradead.org
|
||||
Cc: linux-wireless@vger.kernel.org
|
||||
Cc: netdev@vger.kernel.org
|
||||
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
|
||||
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20221031114341.10377-1-jirislaby@kernel.org
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/mac.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.h
|
||||
@@ -163,7 +163,7 @@ void ath11k_mac_drain_tx(struct ath11k *
|
||||
void ath11k_mac_peer_cleanup_all(struct ath11k *ar);
|
||||
int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx);
|
||||
u8 ath11k_mac_bw_to_mac80211_bw(u8 bw);
|
||||
-u32 ath11k_mac_he_gi_to_nl80211_he_gi(u8 sgi);
|
||||
+enum nl80211_he_gi ath11k_mac_he_gi_to_nl80211_he_gi(u8 sgi);
|
||||
enum nl80211_he_ru_alloc ath11k_mac_phy_he_ru_to_nl80211_he_ru_alloc(u16 ru_phy);
|
||||
enum nl80211_he_ru_alloc ath11k_mac_he_ru_tones_to_nl80211_he_ru_alloc(u16 ru_tones);
|
||||
enum ath11k_supported_bw ath11k_mac_mac80211_bw_to_ath11k_bw(enum rate_info_bw bw);
|
@@ -96,7 +96,7 @@ Link: https://lore.kernel.org/r/20221104085403.11025-1-quic_youghand@quicinc.com
|
||||
struct ath11k_hw_ops {
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -8010,6 +8010,7 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
@@ -8014,6 +8014,7 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
struct ath11k *ar = hw->priv;
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
int recovery_count;
|
||||
@@ -104,7 +104,7 @@ Link: https://lore.kernel.org/r/20221104085403.11025-1-quic_youghand@quicinc.com
|
||||
|
||||
if (reconfig_type != IEEE80211_RECONFIG_TYPE_RESTART)
|
||||
return;
|
||||
@@ -8045,6 +8046,12 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
@@ -8049,6 +8050,12 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "reset success\n");
|
||||
}
|
||||
}
|
||||
|
@@ -81,7 +81,7 @@ Link: https://lore.kernel.org/r/20221122132152.17771-5-quic_kathirve@quicinc.com
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1142,10 +1154,26 @@ static int ath11k_ahb_probe(struct platf
|
||||
@@ -1148,10 +1160,26 @@ static int ath11k_ahb_probe(struct platf
|
||||
goto err_core_free;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ Link: https://lore.kernel.org/r/20221122132152.17771-5-quic_kathirve@quicinc.com
|
||||
ret = ath11k_ahb_setup_resources(ab);
|
||||
if (ret)
|
||||
goto err_core_free;
|
||||
@@ -1236,6 +1264,10 @@ static void ath11k_ahb_free_resources(st
|
||||
@@ -1242,6 +1270,10 @@ static void ath11k_ahb_free_resources(st
|
||||
ath11k_ahb_release_smp2p_handle(ab);
|
||||
ath11k_ahb_fw_resource_deinit(ab);
|
||||
ath11k_ce_free_pipes(ab);
|
||||
@@ -340,7 +340,7 @@ Link: https://lore.kernel.org/r/20221122132152.17771-5-quic_kathirve@quicinc.com
|
||||
extern const struct ath11k_hw_hal_params ath11k_hw_hal_params_wcn6750;
|
||||
--- a/drivers/net/wireless/ath/ath11k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pci.c
|
||||
@@ -543,6 +543,8 @@ static int ath11k_pci_claim(struct ath11
|
||||
@@ -547,6 +547,8 @@ static int ath11k_pci_claim(struct ath11
|
||||
goto clear_master;
|
||||
}
|
||||
|
||||
|
@@ -23,7 +23,7 @@ Link: https://lore.kernel.org/r/20221205192125.13533-1-quic_kathirve@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -3612,7 +3612,7 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
@@ -3609,7 +3609,7 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
struct ath11k *ar = hw->priv;
|
||||
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
|
||||
struct cfg80211_scan_request *req = &hw_req->req;
|
||||
@@ -32,7 +32,7 @@ Link: https://lore.kernel.org/r/20221205192125.13533-1-quic_kathirve@quicinc.com
|
||||
int ret = 0;
|
||||
int i;
|
||||
u32 scan_timeout;
|
||||
@@ -3640,72 +3640,78 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
@@ -3637,72 +3637,78 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
if (ret)
|
||||
goto exit;
|
||||
|
||||
@@ -143,7 +143,7 @@ Link: https://lore.kernel.org/r/20221205192125.13533-1-quic_kathirve@quicinc.com
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to start hw scan: %d\n", ret);
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
@@ -3717,10 +3723,11 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
@@ -3714,10 +3720,11 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
msecs_to_jiffies(scan_timeout));
|
||||
|
||||
exit:
|
||||
|
@@ -116,7 +116,7 @@ Link: https://lore.kernel.org/r/20221220044435.10506-1-quic_rajkbhag@quicinc.com
|
||||
struct ath11k_hw_ops {
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -3110,7 +3110,7 @@ static void ath11k_mac_op_bss_info_chang
|
||||
@@ -3107,7 +3107,7 @@ static void ath11k_mac_op_bss_info_chang
|
||||
u16 bitrate;
|
||||
int ret = 0;
|
||||
u8 rateidx;
|
||||
@@ -125,7 +125,7 @@ Link: https://lore.kernel.org/r/20221220044435.10506-1-quic_rajkbhag@quicinc.com
|
||||
u32 ipv4_cnt;
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
@@ -3412,6 +3412,20 @@ static void ath11k_mac_op_bss_info_chang
|
||||
@@ -3409,6 +3409,20 @@ static void ath11k_mac_op_bss_info_chang
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ Link: https://lore.kernel.org/r/20221220044435.10506-1-quic_rajkbhag@quicinc.com
|
||||
if (changed & BSS_CHANGED_FILS_DISCOVERY ||
|
||||
changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP)
|
||||
ath11k_mac_fils_discovery(arvif, info);
|
||||
@@ -9113,6 +9127,10 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9125,6 +9139,10 @@ static int __ath11k_mac_register(struct
|
||||
wiphy_ext_feature_set(ar->hw->wiphy,
|
||||
NL80211_EXT_FEATURE_SET_SCAN_DWELL);
|
||||
|
||||
|
@@ -82,7 +82,7 @@ Link: https://lore.kernel.org/r/20230113063209.7256-1-quic_rajkbhag@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
@@ -1157,12 +1157,16 @@ static int ath11k_ahb_probe(struct platf
|
||||
@@ -1163,12 +1163,16 @@ static int ath11k_ahb_probe(struct platf
|
||||
goto err_core_free;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ Link: https://lore.kernel.org/r/20230113063209.7256-1-quic_rajkbhag@quicinc.com
|
||||
if (ab->hw_params.ce_remap) {
|
||||
const struct ce_remap *ce_remap = ab->hw_params.ce_remap;
|
||||
/* ce register space is moved out of wcss unlike ipq8074 or ipq6018
|
||||
@@ -1177,10 +1181,6 @@ static int ath11k_ahb_probe(struct platf
|
||||
@@ -1183,10 +1187,6 @@ static int ath11k_ahb_probe(struct platf
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -16,7 +16,7 @@ Link: https://lore.kernel.org/r/20230217030031.4021289-1-yangyingliang@huawei.co
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
@@ -1174,7 +1174,7 @@ static int ath11k_ahb_probe(struct platf
|
||||
@@ -1180,7 +1180,7 @@ static int ath11k_ahb_probe(struct platf
|
||||
* to a new space for accessing them.
|
||||
*/
|
||||
ab->mem_ce = ioremap(ce_remap->base, ce_remap->size);
|
||||
|
@@ -1,50 +0,0 @@
|
||||
From f117276638b7600b981b3fe28550823cfbe1ef23 Mon Sep 17 00:00:00 2001
|
||||
From: Douglas Anderson <dianders@chromium.org>
|
||||
Date: Wed, 1 Feb 2023 08:54:42 -0800
|
||||
Subject: [PATCH] wifi: ath11k: Use platform_get_irq() to get the interrupt
|
||||
|
||||
As of commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ
|
||||
resource from DT core"), we need to use platform_get_irq() instead of
|
||||
platform_get_resource() to get our IRQs because
|
||||
platform_get_resource() simply won't get them anymore.
|
||||
|
||||
This was already fixed in several other Atheros WiFi drivers,
|
||||
apparently in response to Zeal Robot reports. An example of another
|
||||
fix is commit 9503a1fc123d ("ath9k: Use platform_get_irq() to get the
|
||||
interrupt"). ath11k seems to have been missed in this effort, though.
|
||||
|
||||
Without this change, WiFi wasn't coming up on my Qualcomm sc7280-based
|
||||
hardware. Specifically, "platform_get_resource(pdev, IORESOURCE_IRQ,
|
||||
i)" was failing even for i=0.
|
||||
|
||||
Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
|
||||
|
||||
Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
|
||||
Fixes: 00402f49d26f ("ath11k: Add support for WCN6750 device")
|
||||
Signed-off-by: Douglas Anderson <dianders@chromium.org>
|
||||
Tested-by: Jun Yu <junyuu@chromium.org>
|
||||
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230201084131.v2.1.I69cf3d56c97098287fe3a70084ee515098390b70@changeid
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/ahb.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
@@ -874,11 +874,11 @@ static int ath11k_ahb_setup_msi_resource
|
||||
ab->pci.msi.ep_base_data = int_prop + 32;
|
||||
|
||||
for (i = 0; i < ab->pci.msi.config->total_vectors; i++) {
|
||||
- res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
|
||||
- if (!res)
|
||||
- return -ENODEV;
|
||||
+ ret = platform_get_irq(pdev, i);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
|
||||
- ab->pci.msi.irqs[i] = res->start;
|
||||
+ ab->pci.msi.irqs[i] = ret;
|
||||
}
|
||||
|
||||
set_bit(ATH11K_FLAG_MULTI_MSI_VECTORS, &ab->dev_flags);
|
@@ -1,53 +0,0 @@
|
||||
From 60b7d62ba8cdbd073997bff0f1cdae8d844002c0 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Thu, 9 Feb 2023 23:26:22 +0100
|
||||
Subject: [PATCH] wifi: ath11k: fix SAC bug on peer addition with sta band
|
||||
migration
|
||||
|
||||
Fix sleep in atomic context warning detected by Smatch static checker
|
||||
analyzer.
|
||||
|
||||
Following the locking pattern for peer_rhash_add lock tbl_mtx_lock mutex
|
||||
always even if sta is not transitioning to another band.
|
||||
This is peer_add function and a more secure locking should not cause
|
||||
performance regression.
|
||||
|
||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Fixes: d673cb6fe6c0 ("wifi: ath11k: fix peer addition/deletion error on sta band migration")
|
||||
Reported-by: Dan Carpenter <error27@gmail.com>
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230209222622.1751-1-ansuelsmth@gmail.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/peer.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/peer.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/peer.c
|
||||
@@ -382,22 +382,23 @@ int ath11k_peer_create(struct ath11k *ar
|
||||
return -ENOBUFS;
|
||||
}
|
||||
|
||||
+ mutex_lock(&ar->ab->tbl_mtx_lock);
|
||||
spin_lock_bh(&ar->ab->base_lock);
|
||||
peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr);
|
||||
if (peer) {
|
||||
if (peer->vdev_id == param->vdev_id) {
|
||||
spin_unlock_bh(&ar->ab->base_lock);
|
||||
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Assume sta is transitioning to another band.
|
||||
* Remove here the peer from rhash.
|
||||
*/
|
||||
- mutex_lock(&ar->ab->tbl_mtx_lock);
|
||||
ath11k_peer_rhash_delete(ar->ab, peer);
|
||||
- mutex_unlock(&ar->ab->tbl_mtx_lock);
|
||||
}
|
||||
spin_unlock_bh(&ar->ab->base_lock);
|
||||
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
|
||||
|
||||
ret = ath11k_wmi_send_peer_create_cmd(ar, param);
|
||||
if (ret) {
|
@@ -32,7 +32,7 @@ Link: https://lore.kernel.org/r/20230201183201.14431-1-len.brown@intel.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pci.c
|
||||
@@ -998,7 +998,7 @@ static __maybe_unused int ath11k_pci_pm_
|
||||
@@ -1004,7 +1004,7 @@ static __maybe_unused int ath11k_pci_pm_
|
||||
if (ret)
|
||||
ath11k_warn(ab, "failed to resume core: %d\n", ret);
|
||||
|
||||
|
@@ -21,7 +21,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -2699,6 +2699,117 @@ static int ath11k_setup_peer_smps(struct
|
||||
@@ -2696,6 +2696,117 @@ static int ath11k_setup_peer_smps(struct
|
||||
ath11k_smps_map[smps]);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
static void ath11k_bss_assoc(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf)
|
||||
@@ -2709,6 +2820,7 @@ static void ath11k_bss_assoc(struct ieee
|
||||
@@ -2706,6 +2817,7 @@ static void ath11k_bss_assoc(struct ieee
|
||||
struct ieee80211_sta *ap_sta;
|
||||
struct ath11k_peer *peer;
|
||||
bool is_auth = false;
|
||||
@@ -147,7 +147,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
int ret;
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
@@ -2726,6 +2838,9 @@ static void ath11k_bss_assoc(struct ieee
|
||||
@@ -2723,6 +2835,9 @@ static void ath11k_bss_assoc(struct ieee
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
ath11k_peer_assoc_prepare(ar, vif, ap_sta, &peer_arg, false);
|
||||
|
||||
rcu_read_unlock();
|
||||
@@ -2753,6 +2868,12 @@ static void ath11k_bss_assoc(struct ieee
|
||||
@@ -2750,6 +2865,12 @@ static void ath11k_bss_assoc(struct ieee
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
WARN_ON(arvif->is_up);
|
||||
|
||||
arvif->aid = vif->cfg.aid;
|
||||
@@ -3202,6 +3323,8 @@ static void ath11k_mac_op_bss_info_chang
|
||||
@@ -3199,6 +3320,8 @@ static void ath11k_mac_op_bss_info_chang
|
||||
ether_addr_copy(arvif->bssid, info->bssid);
|
||||
|
||||
if (changed & BSS_CHANGED_BEACON_ENABLED) {
|
||||
@@ -179,7 +179,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
ath11k_control_beaconing(arvif, info);
|
||||
|
||||
if (arvif->is_up && vif->bss_conf.he_support &&
|
||||
@@ -5392,6 +5515,10 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
@@ -5388,6 +5511,10 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
|
||||
he_cap_elem->mac_cap_info[1] &=
|
||||
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK;
|
||||
@@ -190,7 +190,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
|
||||
he_cap_elem->phy_cap_info[5] &=
|
||||
~IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK;
|
||||
@@ -6026,69 +6153,6 @@ ath11k_mac_setup_vdev_create_params(stru
|
||||
@@ -6030,69 +6157,6 @@ ath11k_mac_setup_vdev_create_params(stru
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
static void ath11k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
@@ -6757,7 +6821,6 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
@@ -6761,7 +6825,6 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
struct wmi_vdev_start_req_arg arg = {};
|
||||
const struct cfg80211_chan_def *chandef = &ctx->def;
|
||||
@@ -268,7 +268,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
int ret = 0;
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
@@ -6798,15 +6861,6 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
@@ -6802,15 +6865,6 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
spin_lock_bh(&ab->base_lock);
|
||||
arg.regdomain = ar->ab->dfs_region;
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
|
@@ -17,7 +17,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-4-git-send-email-quic_msinada@q
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -5483,6 +5483,27 @@ static __le16 ath11k_mac_setup_he_6ghz_c
|
||||
@@ -5479,6 +5479,27 @@ static __le16 ath11k_mac_setup_he_6ghz_c
|
||||
return cpu_to_le16(bcap->he_6ghz_capa);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-4-git-send-email-quic_msinada@q
|
||||
static int ath11k_mac_copy_he_cap(struct ath11k *ar,
|
||||
struct ath11k_pdev_cap *cap,
|
||||
struct ieee80211_sband_iftype_data *data,
|
||||
@@ -5544,18 +5565,7 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
@@ -5540,18 +5561,7 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-5-git-send-email-quic_msinada@q
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -5488,20 +5488,36 @@ static void ath11k_mac_set_hemcsmap(stru
|
||||
@@ -5484,20 +5484,36 @@ static void ath11k_mac_set_hemcsmap(stru
|
||||
struct ieee80211_sta_he_cap *he_cap,
|
||||
int band)
|
||||
{
|
||||
|
@@ -36,7 +36,7 @@ Link: https://lore.kernel.org/r/20221219053844.4084486-1-quic_mkenna@quicinc.com
|
||||
static int ath11k_hw_mac_id_to_pdev_id_ipq8074(struct ath11k_hw_params *hw,
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -9174,6 +9174,11 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9186,6 +9186,11 @@ static int __ath11k_mac_register(struct
|
||||
goto err_free_if_combs;
|
||||
}
|
||||
|
||||
|
@@ -568,7 +568,7 @@ Link: https://lore.kernel.org/r/20230110121024.14051-3-quic_adisi@quicinc.com
|
||||
kfree(reg_info);
|
||||
}
|
||||
return ret;
|
||||
@@ -8054,7 +8437,10 @@ static void ath11k_wmi_tlv_op_rx(struct
|
||||
@@ -8070,7 +8453,10 @@ static void ath11k_wmi_tlv_op_rx(struct
|
||||
ath11k_service_ready_ext2_event(ab, skb);
|
||||
break;
|
||||
case WMI_REG_CHAN_LIST_CC_EVENTID:
|
||||
|
@@ -1,79 +0,0 @@
|
||||
From 5a78ac33e3cb8822da64dd1af196e83664b332b0 Mon Sep 17 00:00:00 2001
|
||||
From: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
||||
Date: Thu, 9 Mar 2023 15:23:08 +0530
|
||||
Subject: [PATCH] wifi: ath11k: fix deinitialization of firmware resources
|
||||
|
||||
Currently, in ath11k_ahb_fw_resources_init(), iommu domain
|
||||
mapping is done only for the chipsets having fixed firmware
|
||||
memory. Also, for such chipsets, mapping is done only if it
|
||||
does not have TrustZone support.
|
||||
|
||||
During deinitialization, only if TrustZone support is not there,
|
||||
iommu is unmapped back. However, for non fixed firmware memory
|
||||
chipsets, TrustZone support is not there and this makes the
|
||||
condition check to true and it tries to unmap the memory which
|
||||
was not mapped during initialization.
|
||||
|
||||
This leads to the following trace -
|
||||
|
||||
[ 83.198790] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
|
||||
[ 83.259537] Modules linked in: ath11k_ahb ath11k qmi_helpers
|
||||
.. snip ..
|
||||
[ 83.280286] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
|
||||
[ 83.287228] pc : __iommu_unmap+0x30/0x140
|
||||
[ 83.293907] lr : iommu_unmap+0x5c/0xa4
|
||||
[ 83.298072] sp : ffff80000b3abad0
|
||||
.. snip ..
|
||||
[ 83.369175] Call trace:
|
||||
[ 83.376282] __iommu_unmap+0x30/0x140
|
||||
[ 83.378541] iommu_unmap+0x5c/0xa4
|
||||
[ 83.382360] ath11k_ahb_fw_resource_deinit.part.12+0x2c/0xac [ath11k_ahb]
|
||||
[ 83.385666] ath11k_ahb_free_resources+0x140/0x17c [ath11k_ahb]
|
||||
[ 83.392521] ath11k_ahb_shutdown+0x34/0x40 [ath11k_ahb]
|
||||
[ 83.398248] platform_shutdown+0x20/0x2c
|
||||
[ 83.403455] device_shutdown+0x16c/0x1c4
|
||||
[ 83.407621] kernel_restart_prepare+0x34/0x3c
|
||||
[ 83.411529] kernel_restart+0x14/0x74
|
||||
[ 83.415781] __do_sys_reboot+0x1c4/0x22c
|
||||
[ 83.419427] __arm64_sys_reboot+0x1c/0x24
|
||||
[ 83.423420] invoke_syscall+0x44/0xfc
|
||||
[ 83.427326] el0_svc_common.constprop.3+0xac/0xe8
|
||||
[ 83.430974] do_el0_svc+0xa0/0xa8
|
||||
[ 83.435659] el0_svc+0x1c/0x44
|
||||
[ 83.438957] el0t_64_sync_handler+0x60/0x144
|
||||
[ 83.441910] el0t_64_sync+0x15c/0x160
|
||||
[ 83.446343] Code: aa0103f4 f9400001 f90027a1 d2800001 (f94006a0)
|
||||
[ 83.449903] ---[ end trace 0000000000000000 ]---
|
||||
|
||||
This can be reproduced by probing an AHB chipset which is not
|
||||
having a fixed memory region. During reboot (or rmmod) trace
|
||||
can be seen.
|
||||
|
||||
Fix this issue by adding a condition check on firmware fixed memory
|
||||
hw_param as done in the counter initialization function.
|
||||
|
||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Fixes: f9eec4947add ("ath11k: Add support for targets without trustzone")
|
||||
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230309095308.24937-1-quic_adisi@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/ahb.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
@@ -1078,6 +1078,12 @@ static int ath11k_ahb_fw_resource_deinit
|
||||
struct iommu_domain *iommu;
|
||||
size_t unmapped_size;
|
||||
|
||||
+ /* Chipsets not requiring MSA would have not initialized
|
||||
+ * MSA resources, return success in such cases.
|
||||
+ */
|
||||
+ if (!ab->hw_params.fixed_fw_mem)
|
||||
+ return 0;
|
||||
+
|
||||
if (ab_ahb->fw.use_tz)
|
||||
return 0;
|
||||
|
@@ -65,7 +65,7 @@ Link: https://lore.kernel.org/r/20230309164434.32660-1-quic_hprem@quicinc.com
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3029,39 +3006,51 @@ static int ath11k_dp_rx_reap_mon_status_
|
||||
@@ -3037,39 +3014,51 @@ static int ath11k_dp_rx_reap_mon_status_
|
||||
|
||||
spin_lock_bh(&rx_ring->idr_lock);
|
||||
skb = idr_find(&rx_ring->bufs_idr, buf_id);
|
||||
|
@@ -47,7 +47,7 @@ Link: https://lore.kernel.org/r/20230323060913.10097-1-quic_mpubbise@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -3819,8 +3819,29 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
@@ -3816,8 +3816,29 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@@ -97,7 +97,7 @@ Link: https://lore.kernel.org/r/20230317072034.8217-1-quic_gjothira@quicinc.com
|
||||
struct ath11k_hw_ops {
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -3538,7 +3538,7 @@ static void ath11k_mac_op_bss_info_chang
|
||||
@@ -3535,7 +3535,7 @@ static void ath11k_mac_op_bss_info_chang
|
||||
|
||||
if (changed & BSS_CHANGED_FTM_RESPONDER &&
|
||||
arvif->ftm_responder != info->ftm_responder &&
|
||||
@@ -106,7 +106,7 @@ Link: https://lore.kernel.org/r/20230317072034.8217-1-quic_gjothira@quicinc.com
|
||||
(vif->type == NL80211_IFTYPE_AP ||
|
||||
vif->type == NL80211_IFTYPE_MESH_POINT)) {
|
||||
arvif->ftm_responder = info->ftm_responder;
|
||||
@@ -9234,7 +9234,7 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9246,7 +9246,7 @@ static int __ath11k_mac_register(struct
|
||||
wiphy_ext_feature_set(ar->hw->wiphy,
|
||||
NL80211_EXT_FEATURE_SET_SCAN_DWELL);
|
||||
|
||||
|
@@ -1,43 +0,0 @@
|
||||
From 756a7f90878f0866fd2fe167ef37e90b47326b96 Mon Sep 17 00:00:00 2001
|
||||
From: P Praneesh <quic_ppranees@quicinc.com>
|
||||
Date: Fri, 24 Mar 2023 16:57:01 +0200
|
||||
Subject: [PATCH] wifi: ath11k: fix writing to unintended memory region
|
||||
|
||||
While initializing spectral, the magic value is getting written to the
|
||||
invalid memory address leading to random boot-up crash. This occurs
|
||||
due to the incorrect index increment in ath11k_dbring_fill_magic_value
|
||||
function. Fix it by replacing the existing logic with memset32 to ensure
|
||||
there is no invalid memory access.
|
||||
|
||||
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01838-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Fixes: d3d358efc553 ("ath11k: add spectral/CFR buffer validation support")
|
||||
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230321052900.16895-1-quic_ppranees@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/dbring.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dbring.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dbring.c
|
||||
@@ -26,13 +26,13 @@ int ath11k_dbring_validate_buffer(struct
|
||||
static void ath11k_dbring_fill_magic_value(struct ath11k *ar,
|
||||
void *buffer, u32 size)
|
||||
{
|
||||
- u32 *temp;
|
||||
- int idx;
|
||||
+ /* memset32 function fills buffer payload with the ATH11K_DB_MAGIC_VALUE
|
||||
+ * and the variable size is expected to be the number of u32 values
|
||||
+ * to be stored, not the number of bytes.
|
||||
+ */
|
||||
+ size = size / sizeof(u32);
|
||||
|
||||
- size = size >> 2;
|
||||
-
|
||||
- for (idx = 0, temp = buffer; idx < size; idx++, temp++)
|
||||
- *temp++ = ATH11K_DB_MAGIC_VALUE;
|
||||
+ memset32(buffer, ATH11K_DB_MAGIC_VALUE, size);
|
||||
}
|
||||
|
||||
static int ath11k_dbring_bufs_replenish(struct ath11k *ar,
|
@@ -30,7 +30,7 @@ Link: https://lore.kernel.org/r/20230315161817.29627-1-quic_mpubbise@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -3755,6 +3755,18 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
@@ -3752,6 +3752,18 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
int i;
|
||||
u32 scan_timeout;
|
||||
|
||||
|
@@ -30,7 +30,7 @@ Link: https://lore.kernel.org/r/20230323112613.7550-1-cai.huoqing@linux.dev
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pci.c
|
||||
@@ -540,7 +540,7 @@ static int ath11k_pci_claim(struct ath11
|
||||
@@ -544,7 +544,7 @@ static int ath11k_pci_claim(struct ath11
|
||||
if (!ab->mem) {
|
||||
ath11k_err(ab, "failed to map pci bar %d\n", ATH11K_PCI_BAR_NUM);
|
||||
ret = -EIO;
|
||||
@@ -39,7 +39,7 @@ Link: https://lore.kernel.org/r/20230323112613.7550-1-cai.huoqing@linux.dev
|
||||
}
|
||||
|
||||
ab->mem_ce = ab->mem;
|
||||
@@ -548,8 +548,6 @@ static int ath11k_pci_claim(struct ath11
|
||||
@@ -552,8 +552,6 @@ static int ath11k_pci_claim(struct ath11
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot pci_mem 0x%pK\n", ab->mem);
|
||||
return 0;
|
||||
|
||||
@@ -48,7 +48,7 @@ Link: https://lore.kernel.org/r/20230323112613.7550-1-cai.huoqing@linux.dev
|
||||
release_region:
|
||||
pci_release_region(pdev, ATH11K_PCI_BAR_NUM);
|
||||
disable_device:
|
||||
@@ -565,7 +563,6 @@ static void ath11k_pci_free_region(struc
|
||||
@@ -569,7 +567,6 @@ static void ath11k_pci_free_region(struc
|
||||
|
||||
pci_iounmap(pci_dev, ab->mem);
|
||||
ab->mem = NULL;
|
||||
|
@@ -22,7 +22,7 @@ Link: https://lore.kernel.org/r/20230328071150.29645-1-quic_tamizhr@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6685,6 +6685,11 @@ static void ath11k_mac_op_remove_interfa
|
||||
@@ -6689,6 +6689,11 @@ static void ath11k_mac_op_remove_interfa
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC, "mac remove interface (vdev %d)\n",
|
||||
arvif->vdev_id);
|
||||
|
||||
|
@@ -21,7 +21,7 @@ Link: https://lore.kernel.org/r/20230330143718.19511-1-tiwai@suse.de
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pci.c
|
||||
@@ -1036,7 +1036,8 @@ module_exit(ath11k_pci_exit);
|
||||
@@ -1042,7 +1042,8 @@ module_exit(ath11k_pci_exit);
|
||||
MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN PCIe devices");
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
|
||||
|
@@ -19,7 +19,7 @@ Link: https://lore.kernel.org/r/20230405090425.1351-1-kvalo@kernel.org
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -3106,8 +3106,11 @@ int ath11k_peer_rx_frag_setup(struct ath
|
||||
@@ -3114,8 +3114,11 @@ int ath11k_peer_rx_frag_setup(struct ath
|
||||
int i;
|
||||
|
||||
tfm = crypto_alloc_shash("michael_mic", 0, 0);
|
||||
|
@@ -1,104 +0,0 @@
|
||||
From a06bfb3c9f69f303692cdae87bc0899d2ae8b2a6 Mon Sep 17 00:00:00 2001
|
||||
From: Harshitha Prem <quic_hprem@quicinc.com>
|
||||
Date: Tue, 4 Apr 2023 00:11:54 +0530
|
||||
Subject: [PATCH] wifi: ath11k: Ignore frags from uninitialized peer in dp.
|
||||
|
||||
When max virtual ap interfaces are configured in all the bands with
|
||||
ACS and hostapd restart is done every 60s, a crash is observed at
|
||||
random times.
|
||||
In this certain scenario, a fragmented packet is received for
|
||||
self peer, for which rx_tid and rx_frags are not initialized in
|
||||
datapath. While handling this fragment, crash is observed as the
|
||||
rx_frag list is uninitialised and when we walk in
|
||||
ath11k_dp_rx_h_sort_frags, skb null leads to exception.
|
||||
|
||||
To address this, before processing received fragments we check
|
||||
dp_setup_done flag is set to ensure that peer has completed its
|
||||
dp peer setup for fragment queue, else ignore processing the
|
||||
fragments.
|
||||
|
||||
Call trace:
|
||||
ath11k_dp_process_rx_err+0x550/0x1084 [ath11k]
|
||||
ath11k_dp_service_srng+0x70/0x370 [ath11k]
|
||||
0xffffffc009693a04
|
||||
__napi_poll+0x30/0xa4
|
||||
net_rx_action+0x118/0x270
|
||||
__do_softirq+0x10c/0x244
|
||||
irq_exit+0x64/0xb4
|
||||
__handle_domain_irq+0x88/0xac
|
||||
gic_handle_irq+0x74/0xbc
|
||||
el1_irq+0xf0/0x1c0
|
||||
arch_cpu_idle+0x10/0x18
|
||||
do_idle+0x104/0x248
|
||||
cpu_startup_entry+0x20/0x64
|
||||
rest_init+0xd0/0xdc
|
||||
arch_call_rest_init+0xc/0x14
|
||||
start_kernel+0x480/0x4b8
|
||||
Code: f9400281 f94066a2 91405021 b94a0023 (f9406401)
|
||||
|
||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
|
||||
Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230403184155.8670-2-quic_nmaran@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/dp.c | 4 +++-
|
||||
drivers/net/wireless/ath/ath11k/dp_rx.c | 8 ++++++++
|
||||
drivers/net/wireless/ath/ath11k/peer.h | 1 +
|
||||
3 files changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp.c
|
||||
@@ -36,6 +36,7 @@ void ath11k_dp_peer_cleanup(struct ath11
|
||||
}
|
||||
|
||||
ath11k_peer_rx_tid_cleanup(ar, peer);
|
||||
+ peer->dp_setup_done = false;
|
||||
crypto_free_shash(peer->tfm_mmic);
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
}
|
||||
@@ -72,7 +73,8 @@ int ath11k_dp_peer_setup(struct ath11k *
|
||||
ret = ath11k_peer_rx_frag_setup(ar, addr, vdev_id);
|
||||
if (ret) {
|
||||
ath11k_warn(ab, "failed to setup rx defrag context\n");
|
||||
- return ret;
|
||||
+ tid--;
|
||||
+ goto peer_clean;
|
||||
}
|
||||
|
||||
/* TODO: Setup other peer specific resource used in data path */
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -3130,6 +3130,7 @@ int ath11k_peer_rx_frag_setup(struct ath
|
||||
}
|
||||
|
||||
peer->tfm_mmic = tfm;
|
||||
+ peer->dp_setup_done = true;
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
|
||||
return 0;
|
||||
@@ -3575,6 +3576,13 @@ static int ath11k_dp_rx_frag_h_mpdu(stru
|
||||
ret = -ENOENT;
|
||||
goto out_unlock;
|
||||
}
|
||||
+ if (!peer->dp_setup_done) {
|
||||
+ ath11k_warn(ab, "The peer %pM [%d] has uninitialized datapath\n",
|
||||
+ peer->addr, peer_id);
|
||||
+ ret = -ENOENT;
|
||||
+ goto out_unlock;
|
||||
+ }
|
||||
+
|
||||
rx_tid = &peer->rx_tid[tid];
|
||||
|
||||
if ((!skb_queue_empty(&rx_tid->rx_frags) && seqno != rx_tid->cur_sn) ||
|
||||
--- a/drivers/net/wireless/ath/ath11k/peer.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/peer.h
|
||||
@@ -35,6 +35,7 @@ struct ath11k_peer {
|
||||
u16 sec_type;
|
||||
u16 sec_type_grp;
|
||||
bool is_authorized;
|
||||
+ bool dp_setup_done;
|
||||
};
|
||||
|
||||
void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id);
|
@@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/20230403184155.8670-3-quic_nmaran@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -3598,7 +3598,7 @@ static int ath11k_dp_rx_frag_h_mpdu(stru
|
||||
@@ -3606,7 +3606,7 @@ static int ath11k_dp_rx_frag_h_mpdu(stru
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
|
@@ -1,119 +0,0 @@
|
||||
From 6257c702264c44d74c6b71f0c62a7665da2dc356 Mon Sep 17 00:00:00 2001
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Date: Mon, 17 Apr 2023 13:35:02 +0300
|
||||
Subject: [PATCH] wifi: ath11k: fix tx status reporting in encap offload mode
|
||||
|
||||
ieee80211_tx_status() treats packets in 802.11 frame format and
|
||||
tries to extract sta address from packet header. When tx encap
|
||||
offload is enabled, this becomes invalid operation. Hence, switch
|
||||
to using ieee80211_tx_status_ext() after filling in station
|
||||
address for handling both 802.11 and 802.3 frames.
|
||||
|
||||
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230403195738.25367-2-quic_pradeepc@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/dp.h | 4 +++
|
||||
drivers/net/wireless/ath/ath11k/dp_tx.c | 33 ++++++++++++++++++++++++-
|
||||
drivers/net/wireless/ath/ath11k/dp_tx.h | 1 +
|
||||
3 files changed, 37 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp.h
|
||||
@@ -303,12 +303,16 @@ struct ath11k_dp {
|
||||
|
||||
#define HTT_TX_WBM_COMP_STATUS_OFFSET 8
|
||||
|
||||
+#define HTT_INVALID_PEER_ID 0xffff
|
||||
+
|
||||
/* HTT tx completion is overlaid in wbm_release_ring */
|
||||
#define HTT_TX_WBM_COMP_INFO0_STATUS GENMASK(12, 9)
|
||||
#define HTT_TX_WBM_COMP_INFO0_REINJECT_REASON GENMASK(16, 13)
|
||||
#define HTT_TX_WBM_COMP_INFO0_REINJECT_REASON GENMASK(16, 13)
|
||||
|
||||
#define HTT_TX_WBM_COMP_INFO1_ACK_RSSI GENMASK(31, 24)
|
||||
+#define HTT_TX_WBM_COMP_INFO2_SW_PEER_ID GENMASK(15, 0)
|
||||
+#define HTT_TX_WBM_COMP_INFO2_VALID BIT(21)
|
||||
|
||||
struct htt_tx_wbm_completion {
|
||||
u32 info0;
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
|
||||
@@ -316,10 +316,12 @@ ath11k_dp_tx_htt_tx_complete_buf(struct
|
||||
struct dp_tx_ring *tx_ring,
|
||||
struct ath11k_dp_htt_wbm_tx_status *ts)
|
||||
{
|
||||
+ struct ieee80211_tx_status status = { 0 };
|
||||
struct sk_buff *msdu;
|
||||
struct ieee80211_tx_info *info;
|
||||
struct ath11k_skb_cb *skb_cb;
|
||||
struct ath11k *ar;
|
||||
+ struct ath11k_peer *peer;
|
||||
|
||||
spin_lock(&tx_ring->tx_idr_lock);
|
||||
msdu = idr_remove(&tx_ring->txbuf_idr, ts->msdu_id);
|
||||
@@ -341,6 +343,11 @@ ath11k_dp_tx_htt_tx_complete_buf(struct
|
||||
|
||||
dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE);
|
||||
|
||||
+ if (!skb_cb->vif) {
|
||||
+ dev_kfree_skb_any(msdu);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
memset(&info->status, 0, sizeof(info->status));
|
||||
|
||||
if (ts->acked) {
|
||||
@@ -355,7 +362,23 @@ ath11k_dp_tx_htt_tx_complete_buf(struct
|
||||
}
|
||||
}
|
||||
|
||||
- ieee80211_tx_status(ar->hw, msdu);
|
||||
+ spin_lock_bh(&ab->base_lock);
|
||||
+ peer = ath11k_peer_find_by_id(ab, ts->peer_id);
|
||||
+ if (!peer || !peer->sta) {
|
||||
+ ath11k_dbg(ab, ATH11K_DBG_DATA,
|
||||
+ "dp_tx: failed to find the peer with peer_id %d\n",
|
||||
+ ts->peer_id);
|
||||
+ spin_unlock_bh(&ab->base_lock);
|
||||
+ dev_kfree_skb_any(msdu);
|
||||
+ return;
|
||||
+ }
|
||||
+ spin_unlock_bh(&ab->base_lock);
|
||||
+
|
||||
+ status.sta = peer->sta;
|
||||
+ status.info = info;
|
||||
+ status.skb = msdu;
|
||||
+
|
||||
+ ieee80211_tx_status_ext(ar->hw, &status);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -379,7 +402,15 @@ ath11k_dp_tx_process_htt_tx_complete(str
|
||||
ts.msdu_id = msdu_id;
|
||||
ts.ack_rssi = FIELD_GET(HTT_TX_WBM_COMP_INFO1_ACK_RSSI,
|
||||
status_desc->info1);
|
||||
+
|
||||
+ if (FIELD_GET(HTT_TX_WBM_COMP_INFO2_VALID, status_desc->info2))
|
||||
+ ts.peer_id = FIELD_GET(HTT_TX_WBM_COMP_INFO2_SW_PEER_ID,
|
||||
+ status_desc->info2);
|
||||
+ else
|
||||
+ ts.peer_id = HTT_INVALID_PEER_ID;
|
||||
+
|
||||
ath11k_dp_tx_htt_tx_complete_buf(ab, tx_ring, &ts);
|
||||
+
|
||||
break;
|
||||
case HAL_WBM_REL_HTT_TX_COMP_STATUS_REINJ:
|
||||
case HAL_WBM_REL_HTT_TX_COMP_STATUS_INSPECT:
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_tx.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.h
|
||||
@@ -13,6 +13,7 @@ struct ath11k_dp_htt_wbm_tx_status {
|
||||
u32 msdu_id;
|
||||
bool acked;
|
||||
int ack_rssi;
|
||||
+ u16 peer_id;
|
||||
};
|
||||
|
||||
void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts);
|
@@ -1,70 +0,0 @@
|
||||
From f9fff67d2d7ca6fa8066132003a3deef654c55b1 Mon Sep 17 00:00:00 2001
|
||||
From: Nagarajan Maran <quic_nmaran@quicinc.com>
|
||||
Date: Mon, 17 Apr 2023 13:35:02 +0300
|
||||
Subject: [PATCH] wifi: ath11k: Fix SKB corruption in REO destination ring
|
||||
|
||||
While running traffics for a long time, randomly an RX descriptor
|
||||
filled with value "0" from REO destination ring is received.
|
||||
This descriptor which is invalid causes the wrong SKB (SKB stored in
|
||||
the IDR lookup with buffer id "0") to be fetched which in turn
|
||||
causes SKB memory corruption issue and the same leads to crash
|
||||
after some time.
|
||||
|
||||
Changed the start id for idr allocation to "1" and the buffer id "0"
|
||||
is reserved for error validation. Introduced Sanity check to validate
|
||||
the descriptor, before processing the SKB.
|
||||
|
||||
Crash Signature :
|
||||
|
||||
Unable to handle kernel paging request at virtual address 3f004900
|
||||
PC points to "b15_dma_inv_range+0x30/0x50"
|
||||
LR points to "dma_cache_maint_page+0x8c/0x128".
|
||||
The Backtrace obtained is as follows:
|
||||
[<8031716c>] (b15_dma_inv_range) from [<80313a4c>] (dma_cache_maint_page+0x8c/0x128)
|
||||
[<80313a4c>] (dma_cache_maint_page) from [<80313b90>] (__dma_page_dev_to_cpu+0x28/0xcc)
|
||||
[<80313b90>] (__dma_page_dev_to_cpu) from [<7fb5dd68>] (ath11k_dp_process_rx+0x1e8/0x4a4 [ath11k])
|
||||
[<7fb5dd68>] (ath11k_dp_process_rx [ath11k]) from [<7fb53c20>] (ath11k_dp_service_srng+0xb0/0x2ac [ath11k])
|
||||
[<7fb53c20>] (ath11k_dp_service_srng [ath11k]) from [<7f67bba4>] (ath11k_pci_ext_grp_napi_poll+0x1c/0x78 [ath11k_pci])
|
||||
[<7f67bba4>] (ath11k_pci_ext_grp_napi_poll [ath11k_pci]) from [<807d5cf4>] (__napi_poll+0x28/0xb8)
|
||||
[<807d5cf4>] (__napi_poll) from [<807d5f28>] (net_rx_action+0xf0/0x280)
|
||||
[<807d5f28>] (net_rx_action) from [<80302148>] (__do_softirq+0xd0/0x280)
|
||||
[<80302148>] (__do_softirq) from [<80320408>] (irq_exit+0x74/0xd4)
|
||||
[<80320408>] (irq_exit) from [<803638a4>] (__handle_domain_irq+0x90/0xb4)
|
||||
[<803638a4>] (__handle_domain_irq) from [<805bedec>] (gic_handle_irq+0x58/0x90)
|
||||
[<805bedec>] (gic_handle_irq) from [<80301a78>] (__irq_svc+0x58/0x8c)
|
||||
|
||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230403191533.28114-1-quic_nmaran@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/dp_rx.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -389,10 +389,10 @@ int ath11k_dp_rxbufs_replenish(struct at
|
||||
goto fail_free_skb;
|
||||
|
||||
spin_lock_bh(&rx_ring->idr_lock);
|
||||
- buf_id = idr_alloc(&rx_ring->bufs_idr, skb, 0,
|
||||
- rx_ring->bufs_max * 3, GFP_ATOMIC);
|
||||
+ buf_id = idr_alloc(&rx_ring->bufs_idr, skb, 1,
|
||||
+ (rx_ring->bufs_max * 3) + 1, GFP_ATOMIC);
|
||||
spin_unlock_bh(&rx_ring->idr_lock);
|
||||
- if (buf_id < 0)
|
||||
+ if (buf_id <= 0)
|
||||
goto fail_dma_unmap;
|
||||
|
||||
desc = ath11k_hal_srng_src_get_next_entry(ab, srng);
|
||||
@@ -2665,6 +2665,9 @@ try_again:
|
||||
cookie);
|
||||
mac_id = FIELD_GET(DP_RXDMA_BUF_COOKIE_PDEV_ID, cookie);
|
||||
|
||||
+ if (unlikely(buf_id == 0))
|
||||
+ continue;
|
||||
+
|
||||
ar = ab->pdevs[mac_id].ar;
|
||||
rx_ring = &ar->dp.rx_refill_buf_ring;
|
||||
spin_lock_bh(&rx_ring->idr_lock);
|
@@ -24,7 +24,7 @@ Link: https://lore.kernel.org/r/1681762947-13882-1-git-send-email-quic_msinada@q
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -5585,10 +5585,6 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
@@ -5581,10 +5581,6 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
|
||||
he_cap_elem->mac_cap_info[1] &=
|
||||
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK;
|
||||
|
@@ -1,61 +0,0 @@
|
||||
From e2ceb1de2f83aafd8003f0b72dfd4b7441e97d14 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Bizon <mbizon@freebox.fr>
|
||||
Date: Fri, 21 Apr 2023 16:54:45 +0200
|
||||
Subject: [PATCH] wifi: ath11k: fix registration of 6Ghz-only phy without the
|
||||
full channel range
|
||||
|
||||
Because of what seems to be a typo, a 6Ghz-only phy for which the BDF
|
||||
does not allow the 7115Mhz channel will fail to register:
|
||||
|
||||
WARNING: CPU: 2 PID: 106 at net/wireless/core.c:907 wiphy_register+0x914/0x954
|
||||
Modules linked in: ath11k_pci sbsa_gwdt
|
||||
CPU: 2 PID: 106 Comm: kworker/u8:5 Not tainted 6.3.0-rc7-next-20230418-00549-g1e096a17625a-dirty #9
|
||||
Hardware name: Freebox V7R Board (DT)
|
||||
Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work
|
||||
pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
|
||||
pc : wiphy_register+0x914/0x954
|
||||
lr : ieee80211_register_hw+0x67c/0xc10
|
||||
sp : ffffff800b123aa0
|
||||
x29: ffffff800b123aa0 x28: 0000000000000000 x27: 0000000000000000
|
||||
x26: 0000000000000000 x25: 0000000000000006 x24: ffffffc008d51418
|
||||
x23: ffffffc008cb0838 x22: ffffff80176c2460 x21: 0000000000000168
|
||||
x20: ffffff80176c0000 x19: ffffff80176c03e0 x18: 0000000000000014
|
||||
x17: 00000000cbef338c x16: 00000000d2a26f21 x15: 00000000ad6bb85f
|
||||
x14: 0000000000000020 x13: 0000000000000020 x12: 00000000ffffffbd
|
||||
x11: 0000000000000208 x10: 00000000fffffdf7 x9 : ffffffc009394718
|
||||
x8 : ffffff80176c0528 x7 : 000000007fffffff x6 : 0000000000000006
|
||||
x5 : 0000000000000005 x4 : ffffff800b304284 x3 : ffffff800b304284
|
||||
x2 : ffffff800b304d98 x1 : 0000000000000000 x0 : 0000000000000000
|
||||
Call trace:
|
||||
wiphy_register+0x914/0x954
|
||||
ieee80211_register_hw+0x67c/0xc10
|
||||
ath11k_mac_register+0x7c4/0xe10
|
||||
ath11k_core_qmi_firmware_ready+0x1f4/0x570
|
||||
ath11k_qmi_driver_event_work+0x198/0x590
|
||||
process_one_work+0x1b8/0x328
|
||||
worker_thread+0x6c/0x414
|
||||
kthread+0x100/0x104
|
||||
ret_from_fork+0x10/0x20
|
||||
---[ end trace 0000000000000000 ]---
|
||||
ath11k_pci 0002:01:00.0: ieee80211 registration failed: -22
|
||||
ath11k_pci 0002:01:00.0: failed register the radio with mac80211: -22
|
||||
ath11k_pci 0002:01:00.0: failed to create pdev core: -22
|
||||
|
||||
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230421145445.2612280-1-mbizon@freebox.fr
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/mac.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -8892,7 +8892,7 @@ static int ath11k_mac_setup_channels_rat
|
||||
}
|
||||
|
||||
if (supported_bands & WMI_HOST_WLAN_5G_CAP) {
|
||||
- if (reg_cap->high_5ghz_chan >= ATH11K_MAX_6G_FREQ) {
|
||||
+ if (reg_cap->high_5ghz_chan >= ATH11K_MIN_6G_FREQ) {
|
||||
channels = kmemdup(ath11k_6ghz_channels,
|
||||
sizeof(ath11k_6ghz_channels), GFP_KERNEL);
|
||||
if (!channels) {
|
@@ -55,7 +55,7 @@ Link: https://lore.kernel.org/r/20230417205447.1800912-1-arnd@kernel.org
|
||||
{
|
||||
int nss;
|
||||
|
||||
@@ -1658,7 +1658,7 @@ static void ath11k_peer_assoc_h_rates(st
|
||||
@@ -1651,7 +1651,7 @@ static void ath11k_peer_assoc_h_rates(st
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -64,7 +64,7 @@ Link: https://lore.kernel.org/r/20230417205447.1800912-1-arnd@kernel.org
|
||||
{
|
||||
int nss;
|
||||
|
||||
@@ -1670,7 +1670,7 @@ ath11k_peer_assoc_h_ht_masked(const u8 h
|
||||
@@ -1663,7 +1663,7 @@ ath11k_peer_assoc_h_ht_masked(const u8 h
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -73,7 +73,7 @@ Link: https://lore.kernel.org/r/20230417205447.1800912-1-arnd@kernel.org
|
||||
{
|
||||
int nss;
|
||||
|
||||
@@ -2065,7 +2065,7 @@ static u16 ath11k_peer_assoc_h_he_limit(
|
||||
@@ -2058,7 +2058,7 @@ static u16 ath11k_peer_assoc_h_he_limit(
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@@ -56,7 +56,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-2-quic_alokad@quicinc.com
|
||||
#define ATH11K_QUEUE_LEN 4096
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -9001,19 +9001,23 @@ static int ath11k_mac_setup_iface_combin
|
||||
@@ -9013,19 +9013,23 @@ static int ath11k_mac_setup_iface_combin
|
||||
|
||||
static const u8 ath11k_if_types_ext_capa[] = {
|
||||
[0] = WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING,
|
||||
@@ -80,7 +80,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-2-quic_alokad@quicinc.com
|
||||
};
|
||||
|
||||
static const struct wiphy_iftype_ext_capab ath11k_iftypes_ext_capa[] = {
|
||||
@@ -9251,6 +9255,9 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9263,6 +9267,9 @@ static int __ath11k_mac_register(struct
|
||||
wiphy_ext_feature_set(ar->hw->wiphy,
|
||||
NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER);
|
||||
|
||||
|
@@ -23,7 +23,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6181,17 +6181,62 @@ static void ath11k_mac_op_stop(struct ie
|
||||
@@ -6185,17 +6185,62 @@ static void ath11k_mac_op_stop(struct ie
|
||||
atomic_set(&ar->num_pending_mgmt_tx, 0);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com
|
||||
|
||||
if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP) {
|
||||
params->chains[NL80211_BAND_2GHZ].tx = ar->num_tx_chains;
|
||||
@@ -6206,6 +6251,7 @@ ath11k_mac_setup_vdev_create_params(stru
|
||||
@@ -6210,6 +6255,7 @@ ath11k_mac_setup_vdev_create_params(stru
|
||||
params->chains[NL80211_BAND_6GHZ].tx = ar->num_tx_chains;
|
||||
params->chains[NL80211_BAND_6GHZ].rx = ar->num_rx_chains;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com
|
||||
}
|
||||
|
||||
static void ath11k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
|
||||
@@ -6500,7 +6546,12 @@ static int ath11k_mac_op_add_interface(s
|
||||
@@ -6504,7 +6550,12 @@ static int ath11k_mac_op_add_interface(s
|
||||
for (i = 0; i < ARRAY_SIZE(vif->hw_queue); i++)
|
||||
vif->hw_queue[i] = i % (ATH11K_HW_MAX_QUEUES - 1);
|
||||
|
||||
@@ -111,7 +111,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com
|
||||
|
||||
ret = ath11k_wmi_vdev_create(ar, vif->addr, &vdev_param);
|
||||
if (ret) {
|
||||
@@ -6905,6 +6956,17 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
@@ -6909,6 +6960,17 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
arg.pref_tx_streams = ar->num_tx_chains;
|
||||
arg.pref_rx_streams = ar->num_rx_chains;
|
||||
|
||||
|
@@ -29,7 +29,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to put up monitor vdev %i: %d\n",
|
||||
vdev_id, ret);
|
||||
@@ -1423,6 +1423,7 @@ static void ath11k_control_beaconing(str
|
||||
@@ -1416,6 +1416,7 @@ static void ath11k_control_beaconing(str
|
||||
struct ieee80211_bss_conf *info)
|
||||
{
|
||||
struct ath11k *ar = arvif->ar;
|
||||
@@ -37,7 +37,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
|
||||
int ret = 0;
|
||||
|
||||
lockdep_assert_held(&arvif->ar->conf_mutex);
|
||||
@@ -1451,8 +1452,14 @@ static void ath11k_control_beaconing(str
|
||||
@@ -1444,8 +1445,14 @@ static void ath11k_control_beaconing(str
|
||||
|
||||
ether_addr_copy(arvif->bssid, info->bssid);
|
||||
|
||||
@@ -53,7 +53,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to bring up vdev %d: %i\n",
|
||||
arvif->vdev_id, ret);
|
||||
@@ -2879,7 +2886,8 @@ static void ath11k_bss_assoc(struct ieee
|
||||
@@ -2876,7 +2883,8 @@ static void ath11k_bss_assoc(struct ieee
|
||||
arvif->aid = vif->cfg.aid;
|
||||
ether_addr_copy(arvif->bssid, bss_conf->bssid);
|
||||
|
||||
@@ -63,7 +63,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to set vdev %d up: %d\n",
|
||||
arvif->vdev_id, ret);
|
||||
@@ -7133,7 +7141,8 @@ ath11k_mac_update_vif_chan(struct ath11k
|
||||
@@ -7137,7 +7145,8 @@ ath11k_mac_update_vif_chan(struct ath11k
|
||||
int n_vifs)
|
||||
{
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
@@ -73,7 +73,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
|
||||
int ret;
|
||||
int i;
|
||||
bool monitor_vif = false;
|
||||
@@ -7187,8 +7196,15 @@ ath11k_mac_update_vif_chan(struct ath11k
|
||||
@@ -7191,8 +7200,15 @@ ath11k_mac_update_vif_chan(struct ath11k
|
||||
ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
|
||||
ret);
|
||||
|
||||
@@ -90,7 +90,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
|
||||
if (ret) {
|
||||
ath11k_warn(ab, "failed to bring vdev up %d: %d\n",
|
||||
arvif->vdev_id, ret);
|
||||
@@ -7306,7 +7322,8 @@ static int ath11k_start_vdev_delay(struc
|
||||
@@ -7310,7 +7326,8 @@ static int ath11k_start_vdev_delay(struc
|
||||
}
|
||||
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) {
|
||||
|
@@ -23,7 +23,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-6-quic_alokad@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -1351,28 +1351,14 @@ err_mon_del:
|
||||
@@ -1344,28 +1344,14 @@ err_mon_del:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-6-quic_alokad@quicinc.com
|
||||
ies += sizeof(mgmt->u.beacon);
|
||||
|
||||
if (cfg80211_find_ie(WLAN_EID_RSN, ies, (skb_tail_pointer(bcn) - ies)))
|
||||
@@ -1386,7 +1372,28 @@ static int ath11k_mac_setup_bcn_tmpl(str
|
||||
@@ -1379,7 +1365,28 @@ static int ath11k_mac_setup_bcn_tmpl(str
|
||||
arvif->wpaie_present = true;
|
||||
else
|
||||
arvif->wpaie_present = false;
|
||||
|
@@ -24,7 +24,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-7-quic_alokad@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -1351,6 +1351,84 @@ err_mon_del:
|
||||
@@ -1344,6 +1344,84 @@ err_mon_del:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-7-quic_alokad@quicinc.com
|
||||
static void ath11k_mac_set_vif_params(struct ath11k_vif *arvif,
|
||||
struct sk_buff *bcn)
|
||||
{
|
||||
@@ -1374,18 +1452,26 @@ static void ath11k_mac_set_vif_params(st
|
||||
@@ -1367,18 +1445,26 @@ static void ath11k_mac_set_vif_params(st
|
||||
arvif->wpaie_present = false;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-7-quic_alokad@quicinc.com
|
||||
|
||||
bcn = ieee80211_beacon_get_template(hw, vif, &offs, 0);
|
||||
if (!bcn) {
|
||||
@@ -1393,9 +1479,12 @@ static int ath11k_mac_setup_bcn_tmpl(str
|
||||
@@ -1386,9 +1472,12 @@ static int ath11k_mac_setup_bcn_tmpl(str
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-7-quic_alokad@quicinc.com
|
||||
kfree_skb(bcn);
|
||||
|
||||
if (ret)
|
||||
@@ -1405,6 +1494,23 @@ static int ath11k_mac_setup_bcn_tmpl(str
|
||||
@@ -1398,6 +1487,23 @@ static int ath11k_mac_setup_bcn_tmpl(str
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-8-quic_alokad@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -1452,6 +1452,60 @@ static void ath11k_mac_set_vif_params(st
|
||||
@@ -1445,6 +1445,60 @@ static void ath11k_mac_set_vif_params(st
|
||||
arvif->wpaie_present = false;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-8-quic_alokad@quicinc.com
|
||||
static int ath11k_mac_setup_bcn_tmpl_mbssid(struct ath11k_vif *arvif)
|
||||
{
|
||||
struct ath11k *ar = arvif->ar;
|
||||
@@ -1484,7 +1538,7 @@ static int ath11k_mac_setup_bcn_tmpl_mbs
|
||||
@@ -1477,7 +1531,7 @@ static int ath11k_mac_setup_bcn_tmpl_mbs
|
||||
else if (!ath11k_mac_set_nontx_vif_params(tx_arvif, arvif, bcn))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -91,7 +91,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-8-quic_alokad@quicinc.com
|
||||
kfree_skb(bcn);
|
||||
|
||||
if (ret)
|
||||
@@ -1508,6 +1562,9 @@ static int ath11k_mac_setup_bcn_tmpl(str
|
||||
@@ -1501,6 +1555,9 @@ static int ath11k_mac_setup_bcn_tmpl(str
|
||||
arvif != (void *)vif->mbssid_tx_vif->drv_priv && arvif->is_up)
|
||||
return 0;
|
||||
|
||||
|
@@ -31,7 +31,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-2-quic_mkenna@quicinc.com
|
||||
*/
|
||||
|
||||
#include <net/mac80211.h>
|
||||
@@ -4338,6 +4338,20 @@ exit:
|
||||
@@ -4334,6 +4334,20 @@ exit:
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -52,7 +52,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-2-quic_mkenna@quicinc.com
|
||||
ath11k_mac_bitrate_mask_num_vht_rates(struct ath11k *ar,
|
||||
enum nl80211_band band,
|
||||
const struct cfg80211_bitrate_mask *mask)
|
||||
@@ -7791,20 +7805,6 @@ static void ath11k_mac_op_flush(struct i
|
||||
@@ -7795,20 +7809,6 @@ static void ath11k_mac_op_flush(struct i
|
||||
ath11k_mac_flush_tx_complete(ar);
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -4480,6 +4480,54 @@ ath11k_mac_set_peer_he_fixed_rate(struct
|
||||
@@ -4476,6 +4476,54 @@ ath11k_mac_set_peer_he_fixed_rate(struct
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
static int ath11k_station_assoc(struct ath11k *ar,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
@@ -4491,7 +4539,7 @@ static int ath11k_station_assoc(struct a
|
||||
@@ -4487,7 +4535,7 @@ static int ath11k_station_assoc(struct a
|
||||
struct cfg80211_chan_def def;
|
||||
enum nl80211_band band;
|
||||
struct cfg80211_bitrate_mask *mask;
|
||||
@@ -91,7 +91,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
@@ -4519,6 +4567,7 @@ static int ath11k_station_assoc(struct a
|
||||
@@ -4515,6 +4563,7 @@ static int ath11k_station_assoc(struct a
|
||||
|
||||
num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band, mask);
|
||||
num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band, mask);
|
||||
@@ -99,7 +99,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
|
||||
/* If single VHT/HE rate is configured (by set_bitrate_mask()),
|
||||
* peer_assoc will disable VHT/HE. This is now enabled by a peer specific
|
||||
@@ -4535,6 +4584,11 @@ static int ath11k_station_assoc(struct a
|
||||
@@ -4531,6 +4580,11 @@ static int ath11k_station_assoc(struct a
|
||||
band);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -111,7 +111,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
}
|
||||
|
||||
/* Re-assoc is run only to update supported rates for given station. It
|
||||
@@ -4608,7 +4662,7 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
@@ -4604,7 +4658,7 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
const u16 *vht_mcs_mask;
|
||||
const u16 *he_mcs_mask;
|
||||
u32 changed, bw, nss, smps, bw_prev;
|
||||
@@ -120,7 +120,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
const struct cfg80211_bitrate_mask *mask;
|
||||
struct peer_assoc_params peer_arg;
|
||||
enum wmi_phy_mode peer_phymode;
|
||||
@@ -4724,6 +4778,8 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
@@ -4720,6 +4774,8 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
|
||||
if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) {
|
||||
mask = &arvif->bitrate_mask;
|
||||
@@ -129,7 +129,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band,
|
||||
mask);
|
||||
num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band,
|
||||
@@ -4746,6 +4802,9 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
@@ -4742,6 +4798,9 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
} else if (sta->deflink.he_cap.has_he && num_he_rates == 1) {
|
||||
ath11k_mac_set_peer_he_fixed_rate(arvif, sta, mask,
|
||||
band);
|
||||
|
@@ -1,127 +0,0 @@
|
||||
From 88ca89202f8e8afb5225eb5244d79cd67c15d744 Mon Sep 17 00:00:00 2001
|
||||
From: Wen Gong <quic_wgong@quicinc.com>
|
||||
Date: Fri, 26 May 2023 12:41:06 +0300
|
||||
Subject: [PATCH] wifi: ath11k: add support default regdb while searching
|
||||
board-2.bin for WCN6855
|
||||
|
||||
Sometimes board-2.bin does not have the regdb data which matched the
|
||||
parameters such as vendor, device, subsystem-vendor, subsystem-device
|
||||
and etc. Add default regdb data with 'bus=%s' into board-2.bin for
|
||||
WCN6855, then ath11k use 'bus=pci' to search regdb data in board-2.bin
|
||||
for WCN6855.
|
||||
|
||||
kernel: [ 122.515808] ath11k_pci 0000:03:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
|
||||
kernel: [ 122.517240] ath11k_pci 0000:03:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 6179564
|
||||
kernel: [ 122.517280] ath11k_pci 0000:03:00.0: failed to fetch regdb data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262 from ath11k/WCN6855/hw2.0/board-2.bin
|
||||
kernel: [ 122.517464] ath11k_pci 0000:03:00.0: boot using board name 'bus=pci'
|
||||
kernel: [ 122.518901] ath11k_pci 0000:03:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 6179564
|
||||
kernel: [ 122.518915] ath11k_pci 0000:03:00.0: board name
|
||||
kernel: [ 122.518917] ath11k_pci 0000:03:00.0: 00000000: 62 75 73 3d 70 63 69 bus=pci
|
||||
kernel: [ 122.518918] ath11k_pci 0000:03:00.0: boot found match regdb data for name 'bus=pci'
|
||||
kernel: [ 122.518920] ath11k_pci 0000:03:00.0: boot found regdb data for 'bus=pci'
|
||||
kernel: [ 122.518921] ath11k_pci 0000:03:00.0: fetched regdb
|
||||
|
||||
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
|
||||
|
||||
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230517133959.8224-1-quic_wgong@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/core.c | 53 +++++++++++++++++++-------
|
||||
1 file changed, 40 insertions(+), 13 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -961,7 +961,8 @@ int ath11k_core_check_dt(struct ath11k_b
|
||||
}
|
||||
|
||||
static int __ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
|
||||
- size_t name_len, bool with_variant)
|
||||
+ size_t name_len, bool with_variant,
|
||||
+ bool bus_type_mode)
|
||||
{
|
||||
/* strlen(',variant=') + strlen(ab->qmi.target.bdf_ext) */
|
||||
char variant[9 + ATH11K_QMI_BDF_EXT_STR_LENGTH] = { 0 };
|
||||
@@ -972,15 +973,20 @@ static int __ath11k_core_create_board_na
|
||||
|
||||
switch (ab->id.bdf_search) {
|
||||
case ATH11K_BDF_SEARCH_BUS_AND_BOARD:
|
||||
- scnprintf(name, name_len,
|
||||
- "bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x,qmi-chip-id=%d,qmi-board-id=%d%s",
|
||||
- ath11k_bus_str(ab->hif.bus),
|
||||
- ab->id.vendor, ab->id.device,
|
||||
- ab->id.subsystem_vendor,
|
||||
- ab->id.subsystem_device,
|
||||
- ab->qmi.target.chip_id,
|
||||
- ab->qmi.target.board_id,
|
||||
- variant);
|
||||
+ if (bus_type_mode)
|
||||
+ scnprintf(name, name_len,
|
||||
+ "bus=%s",
|
||||
+ ath11k_bus_str(ab->hif.bus));
|
||||
+ else
|
||||
+ scnprintf(name, name_len,
|
||||
+ "bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x,qmi-chip-id=%d,qmi-board-id=%d%s",
|
||||
+ ath11k_bus_str(ab->hif.bus),
|
||||
+ ab->id.vendor, ab->id.device,
|
||||
+ ab->id.subsystem_vendor,
|
||||
+ ab->id.subsystem_device,
|
||||
+ ab->qmi.target.chip_id,
|
||||
+ ab->qmi.target.board_id,
|
||||
+ variant);
|
||||
break;
|
||||
default:
|
||||
scnprintf(name, name_len,
|
||||
@@ -999,13 +1005,19 @@ static int __ath11k_core_create_board_na
|
||||
static int ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
|
||||
size_t name_len)
|
||||
{
|
||||
- return __ath11k_core_create_board_name(ab, name, name_len, true);
|
||||
+ return __ath11k_core_create_board_name(ab, name, name_len, true, false);
|
||||
}
|
||||
|
||||
static int ath11k_core_create_fallback_board_name(struct ath11k_base *ab, char *name,
|
||||
size_t name_len)
|
||||
{
|
||||
- return __ath11k_core_create_board_name(ab, name, name_len, false);
|
||||
+ return __ath11k_core_create_board_name(ab, name, name_len, false, false);
|
||||
+}
|
||||
+
|
||||
+static int ath11k_core_create_bus_type_board_name(struct ath11k_base *ab, char *name,
|
||||
+ size_t name_len)
|
||||
+{
|
||||
+ return __ath11k_core_create_board_name(ab, name, name_len, false, true);
|
||||
}
|
||||
|
||||
const struct firmware *ath11k_core_firmware_request(struct ath11k_base *ab,
|
||||
@@ -1309,7 +1321,7 @@ success:
|
||||
|
||||
int ath11k_core_fetch_regdb(struct ath11k_base *ab, struct ath11k_board_data *bd)
|
||||
{
|
||||
- char boardname[BOARD_NAME_SIZE];
|
||||
+ char boardname[BOARD_NAME_SIZE], default_boardname[BOARD_NAME_SIZE];
|
||||
int ret;
|
||||
|
||||
ret = ath11k_core_create_board_name(ab, boardname, BOARD_NAME_SIZE);
|
||||
@@ -1323,6 +1335,21 @@ int ath11k_core_fetch_regdb(struct ath11
|
||||
ATH11K_BD_IE_REGDB,
|
||||
ATH11K_BD_IE_REGDB_NAME,
|
||||
ATH11K_BD_IE_REGDB_DATA);
|
||||
+ if (!ret)
|
||||
+ goto exit;
|
||||
+
|
||||
+ ret = ath11k_core_create_bus_type_board_name(ab, default_boardname,
|
||||
+ BOARD_NAME_SIZE);
|
||||
+ if (ret) {
|
||||
+ ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
||||
+ "failed to create default board name for regdb: %d", ret);
|
||||
+ goto exit;
|
||||
+ }
|
||||
+
|
||||
+ ret = ath11k_core_fetch_board_data_api_n(ab, bd, default_boardname,
|
||||
+ ATH11K_BD_IE_REGDB,
|
||||
+ ATH11K_BD_IE_REGDB_NAME,
|
||||
+ ATH11K_BD_IE_REGDB_DATA);
|
||||
if (!ret)
|
||||
goto exit;
|
||||
|
@@ -226,7 +226,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-4-quic_rajkbhag@quicinc.com
|
||||
|
||||
if (pdev && pdev->pdev_id == pdev_id)
|
||||
return (pdev->ar ? pdev->ar : NULL);
|
||||
@@ -6271,6 +6274,11 @@ static int ath11k_mac_op_start(struct ie
|
||||
@@ -6275,6 +6278,11 @@ static int ath11k_mac_op_start(struct ie
|
||||
struct ath11k_pdev *pdev = ar->pdev;
|
||||
int ret;
|
||||
|
||||
@@ -238,7 +238,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-4-quic_rajkbhag@quicinc.com
|
||||
ath11k_mac_drain_tx(ar);
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
@@ -6285,6 +6293,7 @@ static int ath11k_mac_op_start(struct ie
|
||||
@@ -6289,6 +6297,7 @@ static int ath11k_mac_op_start(struct ie
|
||||
case ATH11K_STATE_RESTARTED:
|
||||
case ATH11K_STATE_WEDGED:
|
||||
case ATH11K_STATE_ON:
|
||||
@@ -257,7 +257,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-4-quic_rajkbhag@quicinc.com
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -745,6 +745,7 @@ static int ath11k_pci_probe(struct pci_d
|
||||
@@ -751,6 +751,7 @@ static int ath11k_pci_probe(struct pci_d
|
||||
ab_pci->ab = ab;
|
||||
ab_pci->pdev = pdev;
|
||||
ab->hif.ops = &ath11k_pci_hif_ops;
|
||||
@@ -767,7 +767,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-4-quic_rajkbhag@quicinc.com
|
||||
{
|
||||
const void **tb;
|
||||
int ret;
|
||||
@@ -8628,6 +8628,9 @@ static void ath11k_wmi_tlv_op_rx(struct
|
||||
@@ -8644,6 +8644,9 @@ static void ath11k_wmi_tlv_op_rx(struct
|
||||
case WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID:
|
||||
ath11k_wmi_pdev_csa_switch_count_status_event(ab, skb);
|
||||
break;
|
||||
|
@@ -30,7 +30,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-5-quic_rajkbhag@quicinc.com
|
||||
*/
|
||||
|
||||
#include <linux/elf.h>
|
||||
@@ -2460,6 +2460,14 @@ static int ath11k_qmi_load_bdf_qmi(struc
|
||||
@@ -2465,6 +2465,14 @@ static int ath11k_qmi_load_bdf_qmi(struc
|
||||
|
||||
fw_entry = ath11k_core_firmware_request(ab, ATH11K_DEFAULT_CAL_FILE);
|
||||
if (IS_ERR(fw_entry)) {
|
||||
|
@@ -1,51 +0,0 @@
|
||||
From 6aafa1c2d3e3fea2ebe84c018003f2a91722e607 Mon Sep 17 00:00:00 2001
|
||||
From: P Praneesh <quic_ppranees@quicinc.com>
|
||||
Date: Tue, 6 Jun 2023 14:41:28 +0530
|
||||
Subject: [PATCH] wifi: ath11k: fix memory leak in WMI firmware stats
|
||||
|
||||
Memory allocated for firmware pdev, vdev and beacon statistics
|
||||
are not released during rmmod.
|
||||
|
||||
Fix it by calling ath11k_fw_stats_free() function before hardware
|
||||
unregister.
|
||||
|
||||
While at it, avoid calling ath11k_fw_stats_free() while processing
|
||||
the firmware stats received in the WMI event because the local list
|
||||
is getting spliced and reinitialised and hence there are no elements
|
||||
in the list after splicing.
|
||||
|
||||
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
|
||||
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230606091128.14202-1-quic_adisi@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/mac.c | 1 +
|
||||
drivers/net/wireless/ath/ath11k/wmi.c | 5 +++++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -9792,6 +9792,7 @@ void ath11k_mac_destroy(struct ath11k_ba
|
||||
if (!ar)
|
||||
continue;
|
||||
|
||||
+ ath11k_fw_stats_free(&ar->fw_stats);
|
||||
ieee80211_free_hw(ar->hw);
|
||||
pdev->ar = NULL;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
@@ -8119,6 +8119,11 @@ complete:
|
||||
rcu_read_unlock();
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
|
||||
+ /* Since the stats's pdev, vdev and beacon list are spliced and reinitialised
|
||||
+ * at this point, no need to free the individual list.
|
||||
+ */
|
||||
+ return;
|
||||
+
|
||||
free:
|
||||
ath11k_fw_stats_free(&stats);
|
||||
}
|
@@ -1,38 +0,0 @@
|
||||
From 16e0077e14a73866e9b0f4a6bf4ad3d4a5cb0f2a Mon Sep 17 00:00:00 2001
|
||||
From: Jiasheng Jiang <jiasheng@iscas.ac.cn>
|
||||
Date: Tue, 13 Jun 2023 12:19:40 +0300
|
||||
Subject: [PATCH] wifi: ath11k: Add missing check for ioremap
|
||||
|
||||
Add check for ioremap() and return the error if it fails in order to
|
||||
guarantee the success of ioremap(), same as in
|
||||
ath11k_qmi_load_file_target_mem().
|
||||
|
||||
Fixes: 6ac04bdc5edb ("ath11k: Use reserved host DDR addresses from DT for PCI devices")
|
||||
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230608022858.27405-1-jiasheng@iscas.ac.cn
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/qmi.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -2061,6 +2061,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
ab->qmi.target_mem[idx].iaddr =
|
||||
ioremap(ab->qmi.target_mem[idx].paddr,
|
||||
ab->qmi.target_mem[i].size);
|
||||
+ if (!ab->qmi.target_mem[idx].iaddr)
|
||||
+ return -EIO;
|
||||
+
|
||||
ab->qmi.target_mem[idx].size = ab->qmi.target_mem[i].size;
|
||||
host_ddr_sz = ab->qmi.target_mem[i].size;
|
||||
ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type;
|
||||
@@ -2086,6 +2089,8 @@ static int ath11k_qmi_assign_target_mem_
|
||||
ab->qmi.target_mem[idx].iaddr =
|
||||
ioremap(ab->qmi.target_mem[idx].paddr,
|
||||
ab->qmi.target_mem[i].size);
|
||||
+ if (!ab->qmi.target_mem[idx].iaddr)
|
||||
+ return -EIO;
|
||||
} else {
|
||||
ab->qmi.target_mem[idx].paddr =
|
||||
ATH11K_QMI_CALDB_ADDRESS;
|
@@ -34,7 +34,7 @@ Link: https://lore.kernel.org/r/20230720151444.2016637-1-kvalo@kernel.org
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath11k/pcic.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pcic.c
|
||||
@@ -466,7 +466,6 @@ void ath11k_pcic_ext_irq_enable(struct a
|
||||
@@ -464,7 +464,6 @@ void ath11k_pcic_ext_irq_enable(struct a
|
||||
struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
|
||||
|
||||
if (!irq_grp->napi_enabled) {
|
||||
|
@@ -104,14 +104,14 @@ Link: https://lore.kernel.org/r/20230726141032.3061-3-quic_rajkbhag@quicinc.com
|
||||
|
||||
#define ATH11K_PCI_BAR_NUM 0
|
||||
#define ATH11K_PCI_DMA_MASK 32
|
||||
@@ -897,6 +898,7 @@ unsupported_wcn6855_soc:
|
||||
@@ -903,6 +904,7 @@ unsupported_wcn6855_soc:
|
||||
ath11k_err(ab, "failed to init core: %d\n", ret);
|
||||
goto err_irq_affinity_cleanup;
|
||||
goto err_free_irq;
|
||||
}
|
||||
+ ath11k_qmi_fwreset_from_cold_boot(ab);
|
||||
return 0;
|
||||
|
||||
err_irq_affinity_cleanup:
|
||||
err_free_irq:
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -9,6 +9,7 @@
|
||||
|
@@ -1,53 +0,0 @@
|
||||
From 400ece6c7f346b0a30867bd00b03b5b2563d4357 Mon Sep 17 00:00:00 2001
|
||||
From: Sven Eckelmann <sven@narfation.org>
|
||||
Date: Tue, 22 Aug 2023 16:42:24 +0300
|
||||
Subject: [PATCH] wifi: ath11k: Don't drop tx_status when peer cannot be found
|
||||
|
||||
When a station idles for a long time, hostapd will try to send a QoS Null
|
||||
frame to the station as "poll". NL80211_CMD_PROBE_CLIENT is used for this
|
||||
purpose. And the skb will be added to ack_status_frame - waiting for a
|
||||
completion via ieee80211_report_ack_skb().
|
||||
|
||||
But when the peer was already removed before the tx_complete arrives, the
|
||||
peer will be missing. And when using dev_kfree_skb_any (instead of going
|
||||
through mac80211), the entry will stay inside ack_status_frames. This IDR
|
||||
will therefore run full after 8K request were generated for such clients.
|
||||
At this point, the access point will then just stall and not allow any new
|
||||
clients because idr_alloc() for ack_status_frame will fail.
|
||||
|
||||
ieee80211_free_txskb() on the other hand will (when required) call
|
||||
ieee80211_report_ack_skb() and make sure that (when required) remove the
|
||||
entry from the ack_status_frame.
|
||||
|
||||
Tested-on: IPQ6018 hw1.0 WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Fixes: 6257c702264c ("wifi: ath11k: fix tx status reporting in encap offload mode")
|
||||
Fixes: 94739d45c388 ("ath11k: switch to using ieee80211_tx_status_ext()")
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230802-ath11k-ack_status_leak-v2-1-c0af729d6229@narfation.org
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/dp_tx.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
|
||||
@@ -369,7 +369,7 @@ ath11k_dp_tx_htt_tx_complete_buf(struct
|
||||
"dp_tx: failed to find the peer with peer_id %d\n",
|
||||
ts->peer_id);
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
- dev_kfree_skb_any(msdu);
|
||||
+ ieee80211_free_txskb(ar->hw, msdu);
|
||||
return;
|
||||
}
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
@@ -624,7 +624,7 @@ static void ath11k_dp_tx_complete_msdu(s
|
||||
"dp_tx: failed to find the peer with peer_id %d\n",
|
||||
ts->peer_id);
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
- dev_kfree_skb_any(msdu);
|
||||
+ ieee80211_free_txskb(ar->hw, msdu);
|
||||
return;
|
||||
}
|
||||
arsta = (struct ath11k_sta *)peer->sta->drv_priv;
|
@@ -1,103 +0,0 @@
|
||||
From 39564b475ac5a589e6c22c43a08cbd283c295d2c Mon Sep 17 00:00:00 2001
|
||||
From: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Date: Thu, 7 Sep 2023 09:56:06 +0800
|
||||
Subject: [PATCH] wifi: ath11k: fix boot failure with one MSI vector
|
||||
|
||||
Commit 5b32b6dd96633 ("ath11k: Remove core PCI references from
|
||||
PCI common code") breaks with one MSI vector because it moves
|
||||
affinity setting after IRQ request, see below log:
|
||||
|
||||
[ 1417.278835] ath11k_pci 0000:02:00.0: failed to receive control response completion, polling..
|
||||
[ 1418.302829] ath11k_pci 0000:02:00.0: Service connect timeout
|
||||
[ 1418.302833] ath11k_pci 0000:02:00.0: failed to connect to HTT: -110
|
||||
[ 1418.303669] ath11k_pci 0000:02:00.0: failed to start core: -110
|
||||
|
||||
The detail is, if do affinity request after IRQ activated,
|
||||
which is done in request_irq(), kernel caches that request and
|
||||
returns success directly. Later when a subsequent MHI interrupt is
|
||||
fired, kernel will do the real affinity setting work, as a result,
|
||||
changs the MSI vector. However at that time host has configured
|
||||
old vector to hardware, so host never receives CE or DP interrupts.
|
||||
|
||||
Fix it by setting affinity before registering MHI controller
|
||||
where host is, for the first time, doing IRQ request.
|
||||
|
||||
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
|
||||
Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
|
||||
Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-01160-QCAMSLSWPLZ-1
|
||||
|
||||
Fixes: 5b32b6dd9663 ("ath11k: Remove core PCI references from PCI common code")
|
||||
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230907015606.16297-1-quic_bqiang@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/pci.c | 24 ++++++++++++------------
|
||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pci.c
|
||||
@@ -852,10 +852,16 @@ unsupported_wcn6855_soc:
|
||||
if (ret)
|
||||
goto err_pci_disable_msi;
|
||||
|
||||
+ ret = ath11k_pci_set_irq_affinity_hint(ab_pci, cpumask_of(0));
|
||||
+ if (ret) {
|
||||
+ ath11k_err(ab, "failed to set irq affinity %d\n", ret);
|
||||
+ goto err_pci_disable_msi;
|
||||
+ }
|
||||
+
|
||||
ret = ath11k_mhi_register(ab_pci);
|
||||
if (ret) {
|
||||
ath11k_err(ab, "failed to register mhi: %d\n", ret);
|
||||
- goto err_pci_disable_msi;
|
||||
+ goto err_irq_affinity_cleanup;
|
||||
}
|
||||
|
||||
ret = ath11k_hal_srng_init(ab);
|
||||
@@ -876,12 +882,6 @@ unsupported_wcn6855_soc:
|
||||
goto err_ce_free;
|
||||
}
|
||||
|
||||
- ret = ath11k_pci_set_irq_affinity_hint(ab_pci, cpumask_of(0));
|
||||
- if (ret) {
|
||||
- ath11k_err(ab, "failed to set irq affinity %d\n", ret);
|
||||
- goto err_free_irq;
|
||||
- }
|
||||
-
|
||||
/* kernel may allocate a dummy vector before request_irq and
|
||||
* then allocate a real vector when request_irq is called.
|
||||
* So get msi_data here again to avoid spurious interrupt
|
||||
@@ -890,20 +890,17 @@ unsupported_wcn6855_soc:
|
||||
ret = ath11k_pci_config_msi_data(ab_pci);
|
||||
if (ret) {
|
||||
ath11k_err(ab, "failed to config msi_data: %d\n", ret);
|
||||
- goto err_irq_affinity_cleanup;
|
||||
+ goto err_free_irq;
|
||||
}
|
||||
|
||||
ret = ath11k_core_init(ab);
|
||||
if (ret) {
|
||||
ath11k_err(ab, "failed to init core: %d\n", ret);
|
||||
- goto err_irq_affinity_cleanup;
|
||||
+ goto err_free_irq;
|
||||
}
|
||||
ath11k_qmi_fwreset_from_cold_boot(ab);
|
||||
return 0;
|
||||
|
||||
-err_irq_affinity_cleanup:
|
||||
- ath11k_pci_set_irq_affinity_hint(ab_pci, NULL);
|
||||
-
|
||||
err_free_irq:
|
||||
ath11k_pcic_free_irq(ab);
|
||||
|
||||
@@ -916,6 +913,9 @@ err_hal_srng_deinit:
|
||||
err_mhi_unregister:
|
||||
ath11k_mhi_unregister(ab_pci);
|
||||
|
||||
+err_irq_affinity_cleanup:
|
||||
+ ath11k_pci_set_irq_affinity_hint(ab_pci, NULL);
|
||||
+
|
||||
err_pci_disable_msi:
|
||||
ath11k_pci_free_msi(ab_pci);
|
||||
|
@@ -28,7 +28,7 @@ Link: https://msgid.link/20240109021336.4143-2-quic_bqiang@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pci.c
|
||||
@@ -729,7 +729,6 @@ static int ath11k_pci_probe(struct pci_d
|
||||
@@ -735,7 +735,6 @@ static int ath11k_pci_probe(struct pci_d
|
||||
struct ath11k_base *ab;
|
||||
struct ath11k_pci *ab_pci;
|
||||
u32 soc_hw_version_major, soc_hw_version_minor, addr;
|
||||
@@ -36,7 +36,7 @@ Link: https://msgid.link/20240109021336.4143-2-quic_bqiang@quicinc.com
|
||||
int ret;
|
||||
|
||||
ab = ath11k_core_alloc(&pdev->dev, sizeof(*ab_pci), ATH11K_BUS_PCI);
|
||||
@@ -775,6 +774,12 @@ static int ath11k_pci_probe(struct pci_d
|
||||
@@ -781,6 +780,12 @@ static int ath11k_pci_probe(struct pci_d
|
||||
|
||||
switch (pci_dev->device) {
|
||||
case QCA6390_DEVICE_ID:
|
||||
@@ -49,7 +49,7 @@ Link: https://msgid.link/20240109021336.4143-2-quic_bqiang@quicinc.com
|
||||
ath11k_pci_read_hw_version(ab, &soc_hw_version_major,
|
||||
&soc_hw_version_minor);
|
||||
switch (soc_hw_version_major) {
|
||||
@@ -788,13 +793,21 @@ static int ath11k_pci_probe(struct pci_d
|
||||
@@ -794,13 +799,21 @@ static int ath11k_pci_probe(struct pci_d
|
||||
goto err_pci_free_region;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ Link: https://msgid.link/20240109021336.4143-2-quic_bqiang@quicinc.com
|
||||
ab->id.bdf_search = ATH11K_BDF_SEARCH_BUS_AND_BOARD;
|
||||
ath11k_pci_read_hw_version(ab, &soc_hw_version_major,
|
||||
&soc_hw_version_minor);
|
||||
@@ -821,7 +834,6 @@ unsupported_wcn6855_soc:
|
||||
@@ -827,7 +840,6 @@ unsupported_wcn6855_soc:
|
||||
goto err_pci_free_region;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ Link: https://msgid.link/20240109021336.4143-2-quic_bqiang@quicinc.com
|
||||
break;
|
||||
default:
|
||||
dev_err(&pdev->dev, "Unknown PCI device found: 0x%x\n",
|
||||
@@ -830,12 +842,6 @@ unsupported_wcn6855_soc:
|
||||
@@ -836,12 +848,6 @@ unsupported_wcn6855_soc:
|
||||
goto err_pci_free_region;
|
||||
}
|
||||
|
||||
|
@@ -150,7 +150,7 @@ Link: https://msgid.link/20240109021336.4143-3-quic_bqiang@quicinc.com
|
||||
static const struct pci_device_id ath11k_pci_id_table[] = {
|
||||
{ PCI_VDEVICE(QCOM, QCA6390_DEVICE_ID) },
|
||||
{ PCI_VDEVICE(QCOM, WCN6855_DEVICE_ID) },
|
||||
@@ -730,6 +732,7 @@ static int ath11k_pci_probe(struct pci_d
|
||||
@@ -736,6 +738,7 @@ static int ath11k_pci_probe(struct pci_d
|
||||
struct ath11k_pci *ab_pci;
|
||||
u32 soc_hw_version_major, soc_hw_version_minor, addr;
|
||||
int ret;
|
||||
@@ -158,7 +158,7 @@ Link: https://msgid.link/20240109021336.4143-3-quic_bqiang@quicinc.com
|
||||
|
||||
ab = ath11k_core_alloc(&pdev->dev, sizeof(*ab_pci), ATH11K_BUS_PCI);
|
||||
|
||||
@@ -820,7 +823,19 @@ static int ath11k_pci_probe(struct pci_d
|
||||
@@ -826,7 +829,19 @@ static int ath11k_pci_probe(struct pci_d
|
||||
break;
|
||||
case 0x10:
|
||||
case 0x11:
|
||||
|
@@ -56,7 +56,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
int ath11k_thermal_set_throttling(struct ath11k *ar, u32 throttle_state);
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -174,6 +174,7 @@ ATH11K_DEBUG=
|
||||
@@ -166,6 +166,7 @@ ATH11K_DEBUG=
|
||||
ATH11K_DEBUGFS=
|
||||
ATH11K_TRACING=
|
||||
ATH11K_SPECTRAL=
|
||||
|
@@ -1,29 +0,0 @@
|
||||
From 04178918e7f6b5f34dde81ec79ee8a1ccace3be3 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Mon, 17 Oct 2022 11:45:03 +0200
|
||||
Subject: [PATCH] wifi: ath11k: pci: fix compilation in 5.16 and older
|
||||
|
||||
Commit ("genirq/msi, treewide: Use a named struct for PCI/MSI attributes")
|
||||
changed the msi_desc structure a bit, however that is only available in
|
||||
kernels 5.17 and newer, so check for kernel version to allow compilation
|
||||
in 5.16 and older.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/pci.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pci.c
|
||||
@@ -461,7 +461,11 @@ static int ath11k_pci_alloc_msi(struct a
|
||||
pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_LO,
|
||||
&ab->pci.msi.addr_lo);
|
||||
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 17, 0))
|
||||
if (msi_desc->pci.msi_attrib.is_64) {
|
||||
+#else
|
||||
+ if (msi_desc->msi_attrib.is_64) {
|
||||
+#endif
|
||||
pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_HI,
|
||||
&ab->pci.msi.addr_hi);
|
||||
} else {
|
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1413,6 +1413,53 @@ void ath9k_deinit_debug(struct ath_softc
|
||||
@@ -1413,6 +1413,54 @@ void ath9k_deinit_debug(struct ath_softc
|
||||
ath9k_cmn_spectral_deinit_debug(&sc->spec_priv);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
+ } else {
|
||||
+ bytes = 2;
|
||||
+ }
|
||||
+ copy_to_user(user_buf, from, bytes);
|
||||
+ if (copy_to_user(user_buf, from, bytes))
|
||||
+ return -EFAULT;
|
||||
+ user_buf += bytes;
|
||||
+ }
|
||||
+ return *ppos - pos;
|
||||
@@ -54,7 +55,7 @@
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1432,6 +1479,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1432,6 +1480,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
ath9k_tx99_init_debug(sc);
|
||||
ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy);
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1460,6 +1460,52 @@ static const struct file_operations fops
|
||||
@@ -1461,6 +1461,52 @@ static const struct file_operations fops
|
||||
.owner = THIS_MODULE
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1481,6 +1527,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1482,6 +1528,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
|
||||
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
|
||||
&fops_eeprom);
|
||||
@@ -64,7 +64,7 @@
|
||||
debugfs_create_devm_seqfile(sc->dev, "interrupt", sc->debug.debugfs_phy,
|
||||
--- a/drivers/net/wireless/ath/ath.h
|
||||
+++ b/drivers/net/wireless/ath/ath.h
|
||||
@@ -149,6 +149,7 @@ struct ath_common {
|
||||
@@ -151,6 +151,7 @@ struct ath_common {
|
||||
int debug_mask;
|
||||
enum ath_device_state state;
|
||||
unsigned long op_flags;
|
||||
|
@@ -192,7 +192,7 @@
|
||||
#endif
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1505,6 +1505,61 @@ static const struct file_operations fops
|
||||
@@ -1506,6 +1506,61 @@ static const struct file_operations fops
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
@@ -1529,6 +1584,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1530,6 +1585,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
&fops_eeprom);
|
||||
debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
|
||||
sc, &fops_chanbw);
|
||||
|
@@ -1,15 +1,3 @@
|
||||
--- a/include/linux/ath9k_platform.h
|
||||
+++ b/include/linux/ath9k_platform.h
|
||||
@@ -46,6 +46,9 @@ struct ath9k_platform_data {
|
||||
int (*external_reset)(void);
|
||||
|
||||
bool use_eeprom;
|
||||
+
|
||||
+ int num_leds;
|
||||
+ const struct gpio_led *leds;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_ATH9K_PLATFORM_H */
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
@@ -15,6 +15,7 @@
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1561,6 +1561,50 @@ static const struct file_operations fops
|
||||
@@ -1562,6 +1562,50 @@ static const struct file_operations fops
|
||||
#endif
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1588,6 +1632,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1589,6 +1633,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
debugfs_create_file("gpio_led", S_IWUSR,
|
||||
sc->debug.debugfs_phy, sc, &fops_gpio_led);
|
||||
#endif
|
||||
@@ -125,7 +125,7 @@
|
||||
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -538,6 +538,11 @@ irqreturn_t ath_isr(int irq, void *dev)
|
||||
@@ -537,6 +537,11 @@ irqreturn_t ath_isr(int irq, void *dev)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
@@ -128,16 +128,3 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (pdata && pdata->leds && pdata->num_leds)
|
||||
for (i = 0; i < pdata->num_leds; i++) {
|
||||
--- a/include/linux/ath9k_platform.h
|
||||
+++ b/include/linux/ath9k_platform.h
|
||||
@@ -49,6 +49,10 @@ struct ath9k_platform_data {
|
||||
|
||||
int num_leds;
|
||||
const struct gpio_led *leds;
|
||||
+
|
||||
+ unsigned num_btns;
|
||||
+ const struct gpio_keys_button *btns;
|
||||
+ unsigned btn_poll_interval;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_ATH9K_PLATFORM_H */
|
||||
|
@@ -339,7 +339,7 @@
|
||||
|
||||
static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
u32 queues, bool drop);
|
||||
@@ -659,6 +660,7 @@ void ath_reset_work(struct work_struct *
|
||||
@@ -658,6 +659,7 @@ void ath_reset_work(struct work_struct *
|
||||
static int ath9k_start(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct ath_softc *sc = hw->priv;
|
||||
@@ -347,7 +347,7 @@
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
|
||||
@@ -737,6 +739,11 @@ static int ath9k_start(struct ieee80211_
|
||||
@@ -736,6 +738,11 @@ static int ath9k_start(struct ieee80211_
|
||||
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -129,6 +129,7 @@ ATH9K_WOW=
|
||||
@@ -121,6 +121,7 @@ ATH9K_WOW=
|
||||
ATH9K_RFKILL=
|
||||
ATH9K_CHANNEL_CONTEXT=
|
||||
ATH9K_PCOEM=
|
||||
|
@@ -22,7 +22,7 @@
|
||||
static int modparam_bad_frames_preempt;
|
||||
module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
|
||||
MODULE_PARM_DESC(bad_frames_preempt,
|
||||
@@ -2869,10 +2874,10 @@ static int b43_gpio_init(struct b43_wlde
|
||||
@@ -2870,10 +2875,10 @@ static int b43_gpio_init(struct b43_wlde
|
||||
u32 mask, set;
|
||||
|
||||
b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0);
|
||||
|
@@ -9,7 +9,7 @@
|
||||
antenna = b43_antenna_to_phyctl(antenna);
|
||||
ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL);
|
||||
/* We can't send beacons with short preamble. Would get PHY errors. */
|
||||
@@ -3284,8 +3284,8 @@ static int b43_chip_init(struct b43_wlde
|
||||
@@ -3285,8 +3285,8 @@ static int b43_chip_init(struct b43_wlde
|
||||
|
||||
/* Select the antennae */
|
||||
if (phy->ops->set_rx_antenna)
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
if (phy->type == B43_PHYTYPE_B) {
|
||||
value16 = b43_read16(dev, 0x005E);
|
||||
@@ -3986,7 +3986,6 @@ static int b43_op_config(struct ieee8021
|
||||
@@ -3988,7 +3988,6 @@ static int b43_op_config(struct ieee8021
|
||||
struct b43_wldev *dev = wl->current_dev;
|
||||
struct b43_phy *phy = &dev->phy;
|
||||
struct ieee80211_conf *conf = &hw->conf;
|
||||
@@ -28,7 +28,7 @@
|
||||
int err = 0;
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
@@ -4029,11 +4028,9 @@ static int b43_op_config(struct ieee8021
|
||||
@@ -4031,11 +4030,9 @@ static int b43_op_config(struct ieee8021
|
||||
}
|
||||
|
||||
/* Antennas for RX and management frame TX. */
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
if (wl->radio_enabled != phy->radio_on) {
|
||||
if (wl->radio_enabled) {
|
||||
@@ -5176,6 +5173,47 @@ static int b43_op_get_survey(struct ieee
|
||||
@@ -5178,6 +5175,47 @@ static int b43_op_get_survey(struct ieee
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
static const struct ieee80211_ops b43_hw_ops = {
|
||||
.tx = b43_op_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
@@ -5198,6 +5236,8 @@ static const struct ieee80211_ops b43_hw
|
||||
@@ -5200,6 +5238,8 @@ static const struct ieee80211_ops b43_hw
|
||||
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
|
||||
.get_survey = b43_op_get_survey,
|
||||
.rfkill_poll = b43_rfkill_poll,
|
||||
@@ -99,7 +99,7 @@
|
||||
};
|
||||
|
||||
/* Hard-reset the chip. Do not call this directly.
|
||||
@@ -5499,6 +5539,8 @@ static int b43_one_core_attach(struct b4
|
||||
@@ -5501,6 +5541,8 @@ static int b43_one_core_attach(struct b4
|
||||
if (!wldev)
|
||||
goto out;
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
wldev->use_pio = b43_modparam_pio;
|
||||
wldev->dev = dev;
|
||||
wldev->wl = wl;
|
||||
@@ -5590,6 +5632,9 @@ static struct b43_wl *b43_wireless_init(
|
||||
@@ -5592,6 +5634,9 @@ static struct b43_wl *b43_wireless_init(
|
||||
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/broadcom/b43/main.c
|
||||
+++ b/drivers/net/wireless/broadcom/b43/main.c
|
||||
@@ -2886,6 +2886,14 @@ static int b43_gpio_init(struct b43_wlde
|
||||
@@ -2887,6 +2887,14 @@ static int b43_gpio_init(struct b43_wlde
|
||||
} else if (dev->dev->chip_id == 0x5354) {
|
||||
/* Don't allow overtaking buttons GPIOs */
|
||||
set &= 0x2; /* 0x2 is LED GPIO on BCM5354 */
|
||||
|
@@ -1,64 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Mon, 8 Jun 2015 16:11:40 +0200
|
||||
Subject: [PATCH] brcmfmac: register wiphy(s) during module_init
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This is needed by OpenWrt which expects all PHYs to be created after
|
||||
module loads successfully.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
@@ -459,6 +459,7 @@ struct brcmf_fw {
|
||||
u32 curpos;
|
||||
unsigned int board_index;
|
||||
void (*done)(struct device *dev, int err, struct brcmf_fw_request *req);
|
||||
+ struct completion *completion;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_EFI
|
||||
@@ -686,6 +687,8 @@ static void brcmf_fw_request_done(const
|
||||
fwctx->req = NULL;
|
||||
}
|
||||
fwctx->done(fwctx->dev, ret, fwctx->req);
|
||||
+ if (fwctx->completion)
|
||||
+ complete(fwctx->completion);
|
||||
kfree(fwctx);
|
||||
}
|
||||
|
||||
@@ -751,6 +754,8 @@ int brcmf_fw_get_firmwares(struct device
|
||||
{
|
||||
struct brcmf_fw_item *first = &req->items[0];
|
||||
struct brcmf_fw *fwctx;
|
||||
+ struct completion completion;
|
||||
+ unsigned long time_left;
|
||||
char *alt_path = NULL;
|
||||
int ret;
|
||||
|
||||
@@ -768,6 +773,9 @@ int brcmf_fw_get_firmwares(struct device
|
||||
fwctx->dev = dev;
|
||||
fwctx->req = req;
|
||||
fwctx->done = fw_cb;
|
||||
+
|
||||
+ init_completion(&completion);
|
||||
+ fwctx->completion = &completion;
|
||||
|
||||
/* First try alternative board-specific path if any */
|
||||
if (fwctx->req->board_types[0])
|
||||
@@ -787,6 +795,12 @@ int brcmf_fw_get_firmwares(struct device
|
||||
if (ret < 0)
|
||||
brcmf_fw_request_done(NULL, fwctx);
|
||||
|
||||
+
|
||||
+ time_left = wait_for_completion_timeout(&completion,
|
||||
+ msecs_to_jiffies(5000));
|
||||
+ if (!time_left && fwctx)
|
||||
+ fwctx->completion = NULL;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
@@ -65,22 +65,26 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
+}
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
@@ -5,9 +5,16 @@
|
||||
@@ -5,9 +5,20 @@
|
||||
#ifdef CONFIG_OF
|
||||
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings);
|
||||
+#ifdef CPTCFG_BRCMFMAC_SDIO
|
||||
+struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *map_count);
|
||||
+#endif
|
||||
#else
|
||||
static void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
}
|
||||
+#ifdef CPTCFG_BRCMFMAC_SDIO
|
||||
+static struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *map_count)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+#endif
|
||||
#endif /* CONFIG_OF */
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
|
@@ -27,7 +27,7 @@
|
||||
@set -e ; test -f local-symbols || ( \
|
||||
echo "/--------------" ;\
|
||||
echo "| You shouldn't run make in the backports tree, but only in" ;\
|
||||
@@ -60,58 +62,62 @@ mrproper:
|
||||
@@ -60,57 +62,61 @@ mrproper:
|
||||
echo "| (that isn't currently running.)" ;\
|
||||
echo "\\--" ;\
|
||||
false)
|
||||
@@ -56,13 +56,12 @@
|
||||
- done \
|
||||
- ) > Kconfig.kernel ;\
|
||||
- kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \
|
||||
- kernelversion | sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\
|
||||
- kernelversion | sed 's/^\(\([3-6]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\
|
||||
- test "$$kver" != "" || echo "Kernel version parse failed!" ;\
|
||||
- test "$$kver" != "" ;\
|
||||
- kvers="$$(seq 14 39 | sed 's/^/2.6./')" ;\
|
||||
- kvers="$$kvers $$(seq 0 19 | sed 's/^/3./')" ;\
|
||||
- kvers="$$kvers $$(seq 0 20 | sed 's/^/4./')" ;\
|
||||
- kvers="$$kvers $$(seq 0 99 | sed 's/^/5./')" ;\
|
||||
- kvers="$$kvers $$(seq 0 19 | sed 's/^/5./')" ;\
|
||||
- kvers="$$kvers $$(seq 0 20 | sed 's/^/6./')" ;\
|
||||
- print=0 ;\
|
||||
- for v in $$kvers ; do \
|
||||
- if [ "$$print" = "1" ] ; then \
|
||||
@@ -113,13 +112,12 @@
|
||||
+
|
||||
+Kconfig.versions: Kconfig.kernel
|
||||
+ @kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \
|
||||
+ kernelversion | sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\
|
||||
+ kernelversion | sed 's/^\(\([3-6]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\
|
||||
+ test "$$kver" != "" || echo "Kernel version parse failed!" ;\
|
||||
+ test "$$kver" != "" ;\
|
||||
+ kvers="$$(seq 14 39 | sed 's/^/2.6./')" ;\
|
||||
+ kvers="$$kvers $$(seq 0 19 | sed 's/^/3./')" ;\
|
||||
+ kvers="$$kvers $$(seq 0 20 | sed 's/^/4./')" ;\
|
||||
+ kvers="$$kvers $$(seq 0 99 | sed 's/^/5./')" ;\
|
||||
+ kvers="$$kvers $$(seq 0 19 | sed 's/^/5./')" ;\
|
||||
+ kvers="$$kvers $$(seq 0 20 | sed 's/^/6./')" ;\
|
||||
+ print=0 ;\
|
||||
+ for v in $$kvers ; do \
|
||||
+ if [ "$$print" = "1" ] ; then \
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user