Merge pull request #2184 from Rmys/master

kernel-6.12.40
This commit is contained in:
Rmys
2025-07-25 17:12:25 +03:00
committed by GitHub
34 changed files with 8048 additions and 39355 deletions
@@ -1,13 +1,13 @@
SPDX-License-Identifier: GPL-2.0
aufs6.6.84 base patch
aufs6.12 base patch
diff --git a/MAINTAINERS b/MAINTAINERS
index ae4c0cec50736..2b5edd2836a7d 100644
index b878ddc99f94e..8489754030b99 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3334,6 +3334,19 @@ F: include/uapi/linux/audit.h
F: kernel/audit*
@@ -3666,6 +3666,19 @@ F: kernel/audit*
F: lib/*audit.c
K: \baudit_[a-z_0-9]\+\b
+AUFS (advanced multi layered unification filesystem) FILESYSTEM
+M: "J. R. Okajima" <hooanon05g@gmail.com>
@@ -26,10 +26,10 @@ index ae4c0cec50736..2b5edd2836a7d 100644
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
R: Dave Ertman <david.m.ertman@intel.com>
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 886c635990377..73dae3b1bd4e5 100644
index 78a7bb28defe4..479480f25a6c0 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -640,6 +640,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -661,6 +661,26 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
goto done;
}
@@ -37,6 +37,8 @@ index 886c635990377..73dae3b1bd4e5 100644
+ * for AUFS
+ * no get/put for file.
+ */
+/* Just to make the compiler silence, declare it */
+struct file *loop_backing_file(struct super_block *sb);
+struct file *loop_backing_file(struct super_block *sb)
+{
+ struct file *ret;
@@ -55,10 +57,20 @@ index 886c635990377..73dae3b1bd4e5 100644
static ssize_t loop_attr_show(struct device *dev, char *page,
diff --git a/fs/dcache.c b/fs/dcache.c
index 4030c010a7682..e2877ac9a1e6c 100644
index 0f6b16ba30d08..1ab11cad60e8c 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1350,7 +1350,7 @@ enum d_walk_ret {
@@ -1223,6 +1223,9 @@ enum d_walk_ret {
D_WALK_SKIP,
};
+/* AUFS calls d_walk(). Just to make the compiler silence, declare it */
+void d_walk(struct dentry *parent, void *data,
+ enum d_walk_ret (*enter)(void *, struct dentry *));
/**
* d_walk - walk the dentry tree
* @parent: start of walk
@@ -1231,7 +1234,7 @@ enum d_walk_ret {
*
* The @enter() callbacks are called with d_lock held.
*/
@@ -66,12 +78,12 @@ index 4030c010a7682..e2877ac9a1e6c 100644
+void d_walk(struct dentry *parent, void *data,
enum d_walk_ret (*enter)(void *, struct dentry *))
{
struct dentry *this_parent;
struct dentry *this_parent, *dentry;
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 1484f062ee65e..1e44fc9b0f704 100644
index 22dd9dcce7ecc..460791727fd9c 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -34,7 +34,7 @@
@@ -37,7 +37,7 @@
#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
@@ -80,7 +92,7 @@ index 1484f062ee65e..1e44fc9b0f704 100644
{
struct inode * inode = file_inode(filp);
int error = 0;
@@ -64,6 +64,8 @@ static int setfl(int fd, struct file * filp, unsigned int arg)
@@ -67,6 +67,8 @@ static int setfl(int fd, struct file * filp, unsigned int arg)
if (filp->f_op->check_flags)
error = filp->f_op->check_flags(arg);
@@ -90,10 +102,10 @@ index 1484f062ee65e..1e44fc9b0f704 100644
return error;
diff --git a/fs/namespace.c b/fs/namespace.c
index b4385e2413d59..c9347fc5e14a0 100644
index d26f5e6d2ca35..85739e2d64c00 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -872,6 +872,12 @@ static inline int check_mnt(struct mount *mnt)
@@ -966,6 +966,12 @@ static inline int check_mnt(struct mount *mnt)
return mnt->mnt_ns == current->nsproxy->mnt_ns;
}
@@ -107,25 +119,23 @@ index b4385e2413d59..c9347fc5e14a0 100644
* vfsmount lock must be held for write
*/
diff --git a/fs/splice.c b/fs/splice.c
index d983d375ff113..7216ef993b5f9 100644
index 06232d7e505f6..b15fd6073b6d3 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -925,8 +925,8 @@ static int warn_unsupported(struct file *file, const char *op)
@@ -933,7 +933,7 @@ static int warn_unsupported(struct file *file, const char *op)
/*
* Attempt to initiate a splice from pipe to file.
*/
-static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
- loff_t *ppos, size_t len, unsigned int flags)
+long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ loff_t *ppos, size_t len, unsigned int flags)
-static ssize_t do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ssize_t do_splice_from(struct pipe_inode_info *pipe, struct file *out,
loff_t *ppos, size_t len, unsigned int flags)
{
if (unlikely(!out->f_op->splice_write))
return warn_unsupported(out, "write");
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 81edfa1e66b60..534be34edab64 100644
index 3559446279c15..51b64b2ad82c4 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1101,6 +1101,7 @@ extern void fasync_free(struct fasync_struct *);
@@ -1160,6 +1160,7 @@ extern void fasync_free(struct fasync_struct *);
/* can be called from interrupts */
extern void kill_fasync(struct fasync_struct **, int, int);
@@ -133,7 +143,7 @@ index 81edfa1e66b60..534be34edab64 100644
extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
extern int f_setown(struct file *filp, int who, int force);
extern void f_delown(struct file *filp);
@@ -1934,6 +1935,7 @@ struct file_operations {
@@ -2082,6 +2083,7 @@ struct file_operations {
int (*lock) (struct file *, int, struct file_lock *);
unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
int (*check_flags)(int);
@@ -142,10 +152,10 @@ index 81edfa1e66b60..534be34edab64 100644
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 919a5cb6368d1..e4be17a2efdb9 100644
index 217f7abf2cbfa..0e17b8c23f105 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -249,6 +249,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
@@ -210,6 +210,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
return lock->key == key;
}
@@ -155,10 +165,10 @@ index 919a5cb6368d1..e4be17a2efdb9 100644
* Acquire a lock.
*
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
index 8f882f5881e87..6b9808f098435 100644
index 70b366b648160..08cfdabb2721f 100644
--- a/include/linux/mnt_namespace.h
+++ b/include/linux/mnt_namespace.h
@@ -7,12 +7,15 @@ struct mnt_namespace;
@@ -10,6 +10,7 @@ struct mnt_namespace;
struct fs_struct;
struct user_namespace;
struct ns_common;
@@ -166,7 +176,8 @@ index 8f882f5881e87..6b9808f098435 100644
extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
struct user_namespace *, struct fs_struct *);
extern void put_mnt_ns(struct mnt_namespace *ns);
@@ -17,6 +18,8 @@ extern void put_mnt_ns(struct mnt_namespace *ns);
DEFINE_FREE(put_mnt_ns, struct mnt_namespace *, if (!IS_ERR_OR_NULL(_T)) put_mnt_ns(_T))
extern struct ns_common *from_mnt_ns(struct mnt_namespace *);
+extern int is_current_mnt_ns(struct vfsmount *mnt);
@@ -175,19 +186,19 @@ index 8f882f5881e87..6b9808f098435 100644
extern const struct file_operations proc_mountinfo_operations;
extern const struct file_operations proc_mountstats_operations;
diff --git a/include/linux/splice.h b/include/linux/splice.h
index 6c461573434dd..f08de37759877 100644
index 9dec4861d09f6..14583d8468640 100644
--- a/include/linux/splice.h
+++ b/include/linux/splice.h
@@ -99,4 +99,7 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
@@ -108,4 +108,7 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
extern const struct pipe_buf_operations default_pipe_buf_ops;
+
+extern long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ loff_t *ppos, size_t len, unsigned int flags);
+extern ssize_t do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ loff_t *ppos, size_t len, unsigned int flags);
#endif
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 3468d8230e5f7..64b9aedbe941d 100644
index 536bd471557f5..34b378cf7a95f 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -218,7 +218,7 @@ unsigned long max_lock_class_idx;
@@ -1,11 +1,11 @@
SPDX-License-Identifier: GPL-2.0
aufs6.6.84 kbuild patch
aufs6.12 kbuild patch
diff --git a/fs/Kconfig b/fs/Kconfig
index 02a9237807a77..bb3f7ec67b867 100644
index aae170fc27952..d5bb584649f50 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -337,6 +337,7 @@ source "fs/sysv/Kconfig"
@@ -341,6 +341,7 @@ source "fs/sysv/Kconfig"
source "fs/ufs/Kconfig"
source "fs/erofs/Kconfig"
source "fs/vboxsf/Kconfig"
@@ -14,11 +14,11 @@ index 02a9237807a77..bb3f7ec67b867 100644
endif # MISC_FILESYSTEMS
diff --git a/fs/Makefile b/fs/Makefile
index f9541f40be4e0..3a0e13ee39e7f 100644
index 61679fd587b7e..b2539712b80d0 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -129,3 +129,4 @@ obj-$(CONFIG_EFIVAR_FS) += efivarfs/
obj-$(CONFIG_EROFS_FS) += erofs/
@@ -130,3 +130,4 @@ obj-$(CONFIG_EROFS_FS) += erofs/
obj-$(CONFIG_VBOXSF_FS) += vboxsf/
obj-$(CONFIG_ZONEFS_FS) += zonefs/
obj-$(CONFIG_BPF_LSM) += bpf_fs_kfuncs.o
+obj-$(CONFIG_AUFS_FS) += aufs/
@@ -1,8 +1,8 @@
SPDX-License-Identifier: GPL-2.0
aufs6.6.84 loopback patch
aufs6.12 loopback patch
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 73dae3b1bd4e5..ae84fb81acbf9 100644
index 479480f25a6c0..ba3477c30e294 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -54,7 +54,7 @@ struct loop_device {
@@ -14,7 +14,7 @@ index 73dae3b1bd4e5..ae84fb81acbf9 100644
struct block_device *lo_device;
gfp_t old_gfp_mask;
@@ -505,6 +505,15 @@ static inline void loop_update_dio(struct loop_device *lo)
@@ -526,6 +526,15 @@ static inline void loop_update_dio(struct loop_device *lo)
lo->use_dio);
}
@@ -30,7 +30,7 @@ index 73dae3b1bd4e5..ae84fb81acbf9 100644
static void loop_reread_partitions(struct loop_device *lo)
{
int rc;
@@ -562,6 +571,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -583,6 +592,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
{
struct file *file = fget(arg);
struct file *old_file;
@@ -38,7 +38,7 @@ index 73dae3b1bd4e5..ae84fb81acbf9 100644
int error;
bool partscan;
bool is_loop;
@@ -585,11 +595,19 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -606,11 +616,19 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
if (!(lo->lo_flags & LO_FLAGS_READ_ONLY))
goto out_err;
@@ -58,7 +58,7 @@ index 73dae3b1bd4e5..ae84fb81acbf9 100644
error = -EINVAL;
@@ -602,6 +620,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -623,6 +641,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
blk_mq_freeze_queue(lo->lo_queue);
mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask);
lo->lo_backing_file = file;
@@ -66,7 +66,7 @@ index 73dae3b1bd4e5..ae84fb81acbf9 100644
lo->old_gfp_mask = mapping_gfp_mask(file->f_mapping);
mapping_set_gfp_mask(file->f_mapping,
lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
@@ -624,6 +643,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -645,6 +664,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
* dependency.
*/
fput(old_file);
@@ -75,7 +75,7 @@ index 73dae3b1bd4e5..ae84fb81acbf9 100644
if (partscan)
loop_reread_partitions(lo);
@@ -637,6 +658,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -658,6 +679,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
loop_global_unlock(lo, is_loop);
out_putf:
fput(file);
@@ -84,15 +84,15 @@ index 73dae3b1bd4e5..ae84fb81acbf9 100644
goto done;
}
@@ -1008,6 +1031,7 @@ static int loop_configure(struct loop_device *lo, blk_mode_t mode,
@@ -1039,6 +1062,7 @@ static int loop_configure(struct loop_device *lo, blk_mode_t mode,
const struct loop_config *config)
{
struct file *file = fget(config->fd);
+ struct file *f, *virt_file = NULL;
struct inode *inode;
struct address_space *mapping;
int error;
@@ -1023,6 +1047,13 @@ static int loop_configure(struct loop_device *lo, blk_mode_t mode,
loff_t size;
@@ -1052,6 +1076,13 @@ static int loop_configure(struct loop_device *lo, blk_mode_t mode,
/* This is safe, since we have a reference from open(). */
__module_get(THIS_MODULE);
@@ -106,7 +106,7 @@ index 73dae3b1bd4e5..ae84fb81acbf9 100644
/*
* If we don't hold exclusive handle for the device, upgrade to it
* here to avoid changing device under exclusive owner.
@@ -1086,6 +1117,7 @@ static int loop_configure(struct loop_device *lo, blk_mode_t mode,
@@ -1108,6 +1139,7 @@ static int loop_configure(struct loop_device *lo, blk_mode_t mode,
lo->use_dio = lo->lo_flags & LO_FLAGS_DIRECT_IO;
lo->lo_device = bdev;
lo->lo_backing_file = file;
@@ -114,7 +114,7 @@ index 73dae3b1bd4e5..ae84fb81acbf9 100644
lo->old_gfp_mask = mapping_gfp_mask(mapping);
mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
@@ -1141,6 +1173,8 @@ static int loop_configure(struct loop_device *lo, blk_mode_t mode,
@@ -1150,6 +1182,8 @@ static int loop_configure(struct loop_device *lo, blk_mode_t mode,
bd_abort_claiming(bdev, loop_configure);
out_putf:
fput(file);
@@ -123,15 +123,13 @@ index 73dae3b1bd4e5..ae84fb81acbf9 100644
/* This is safe: open() is still holding a reference. */
module_put(THIS_MODULE);
return error;
@@ -1149,6 +1183,7 @@ static int loop_configure(struct loop_device *lo, blk_mode_t mode,
static void __loop_clr_fd(struct loop_device *lo, bool release)
@@ -1159,11 +1193,13 @@ static void __loop_clr_fd(struct loop_device *lo)
{
struct queue_limits lim;
struct file *filp;
+ struct file *virt_filp = lo->lo_backing_virt_file;
gfp_t gfp = lo->old_gfp_mask;
if (test_bit(QUEUE_FLAG_WC, &lo->lo_queue->queue_flags))
@@ -1165,6 +1200,7 @@ static void __loop_clr_fd(struct loop_device *lo, bool release)
spin_lock_irq(&lo->lo_lock);
filp = lo->lo_backing_file;
lo->lo_backing_file = NULL;
@@ -139,7 +137,7 @@ index 73dae3b1bd4e5..ae84fb81acbf9 100644
spin_unlock_irq(&lo->lo_lock);
lo->lo_device = NULL;
@@ -1227,6 +1263,8 @@ static void __loop_clr_fd(struct loop_device *lo, bool release)
@@ -1225,6 +1261,8 @@ static void __loop_clr_fd(struct loop_device *lo)
* fput can take open_mutex which is usually taken before lo_mutex.
*/
fput(filp);
@@ -224,10 +222,10 @@ index 9c30cba527421..8161108d0f6d5 100644
/* ---------------------------------------------------------------------- */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 534be34edab64..b7c27b0486b7d 100644
index 51b64b2ad82c4..8c3ff295b020b 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2089,6 +2089,11 @@ struct super_operations {
@@ -2248,6 +2248,11 @@ struct super_operations {
long (*free_cached_objects)(struct super_block *,
struct shrink_control *);
void (*shutdown)(struct super_block *sb);
@@ -1,21 +1,21 @@
SPDX-License-Identifier: GPL-2.0
aufs6.6.84 mmap patch
aufs6.12 mmap patch
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 91fe20b7657c0..b8573598ca4e6 100644
index b31283d81c52e..644bd3d84cf76 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2277,7 +2277,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
@@ -2270,7 +2270,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
rc = -ENOENT;
vma = find_exact_vma(mm, vm_start, vm_end);
if (vma && vma->vm_file) {
- *path = vma->vm_file->f_path;
- *path = *file_user_path(vma->vm_file);
+ *path = vma_pr_or_file(vma)->f_path;
path_get(path);
rc = 0;
}
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
index 4d3493579458f..42edd9a42c78b 100644
index c6e7ebc637562..d7ccfd9097646 100644
--- a/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
@@ -39,7 +39,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
@@ -31,32 +31,40 @@ index 4d3493579458f..42edd9a42c78b 100644
ino = inode->i_ino;
}
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index b8640f36ebf8a..fde14252ce111 100644
index 7eb010de39fe2..0c576103f7f15 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -271,7 +271,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
const char *name = NULL;
@@ -264,7 +264,8 @@ static void get_vma_name(struct vm_area_struct *vma,
*name_fmt = "[anon_shmem:%s]";
*name = anon_name->name;
} else {
- *path = file_user_path(vma->vm_file);
+ struct file *f = vma_pr_or_file(vma);
+ *path = file_user_path(f);
}
return;
}
@@ -333,7 +334,8 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
dev_t dev = 0;
if (vma->vm_file) {
- const struct inode *inode = file_user_inode(vma->vm_file);
+ const struct inode *inode
+ = file_inode(vma_pr_or_file(vma));
if (file) {
- struct inode *inode = file_inode(vma->vm_file);
+ struct inode *inode;
+
+ file = vma_pr_or_file(vma);
+ inode = file_inode(file);
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
@@ -1947,7 +1950,7 @@ static int show_numa_map(struct seq_file *m, void *v)
@@ -3008,7 +3010,7 @@ static int show_numa_map(struct seq_file *m, void *v)
struct proc_maps_private *proc_priv = &numa_priv->proc_maps;
struct vm_area_struct *vma = v;
struct numa_maps *md = &numa_priv->md;
- struct file *file = vma->vm_file;
+ struct file *file = vma_pr_or_file(vma);
struct mm_struct *mm = vma->vm_mm;
struct mempolicy *pol;
char buffer[64];
struct mempolicy *pol;
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 7cebd397cc26e..81be1641c7fbd 100644
index bce6745330003..b12b5a75c799c 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -137,7 +137,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
@@ -72,10 +80,10 @@ index 7cebd397cc26e..81be1641c7fbd 100644
ino = inode->i_ino;
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 209370f644366..5c84e2330fd64 100644
index 61fff5d34ed53..94b66987b4bb0 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2415,6 +2415,43 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
@@ -2469,6 +2469,43 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
static inline struct vm_area_struct *vma_lookup(struct mm_struct *mm,
unsigned long addr);
@@ -120,10 +128,10 @@ index 209370f644366..5c84e2330fd64 100644
void *buf, int len, unsigned int gup_flags);
extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index e77d4a5c0bace..5aa50ed123be1 100644
index 6e3bdf8e38bca..c70247dc71022 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -554,6 +554,9 @@ struct vm_region {
@@ -572,6 +572,9 @@ struct vm_region {
unsigned long vm_top; /* region allocated to here */
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
struct file *vm_file; /* the backing file or NULL */
@@ -133,7 +141,7 @@ index e77d4a5c0bace..5aa50ed123be1 100644
int vm_usage; /* region usage count (access under nommu_region_sem) */
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
@@ -697,6 +700,9 @@ struct vm_area_struct {
@@ -747,6 +750,9 @@ struct vm_area_struct {
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
units */
struct file * vm_file; /* File we map to (can be NULL). */
@@ -144,32 +152,32 @@ index e77d4a5c0bace..5aa50ed123be1 100644
#ifdef CONFIG_ANON_VMA_NAME
diff --git a/kernel/fork.c b/kernel/fork.c
index 23efaa2c42e4f..50b94374b715c 100644
index 22f43721d031d..03abd72b3353d 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -732,7 +732,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
@@ -730,7 +730,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
if (file) {
struct address_space *mapping = file->f_mapping;
- get_file(file);
+ vma_get_file(tmp);
i_mmap_lock_write(mapping);
if (tmp->vm_flags & VM_SHARED)
if (vma_is_shared_maywrite(tmp))
mapping_allow_writable(mapping);
diff --git a/mm/Makefile b/mm/Makefile
index ec65984e2adee..d59461647ccd9 100644
index d5639b0361663..bb57f616f0325 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -138,3 +138,4 @@ obj-$(CONFIG_IO_MAPPING) += io-mapping.o
obj-$(CONFIG_HAVE_BOOTMEM_INFO_NODE) += bootmem_info.o
obj-$(CONFIG_GENERIC_IOREMAP) += ioremap.o
@@ -145,3 +145,4 @@ obj-$(CONFIG_GENERIC_IOREMAP) += ioremap.o
obj-$(CONFIG_SHRINKER_DEBUG) += shrinker_debug.o
obj-$(CONFIG_EXECMEM) += execmem.o
obj-$(CONFIG_TMPFS_QUOTA) += shmem_quota.o
+obj-y += prfile.o
diff --git a/mm/filemap.c b/mm/filemap.c
index 056422e6a0be8..065b94fe81d90 100644
index 56fa431c52af7..d55fe4e7bcfd1 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -3661,7 +3661,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
@@ -3707,7 +3707,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
vm_fault_t ret = VM_FAULT_LOCKED;
sb_start_pagefault(mapping->host->i_sb);
@@ -179,37 +187,10 @@ index 056422e6a0be8..065b94fe81d90 100644
if (folio->mapping != mapping) {
folio_unlock(folio);
diff --git a/mm/mmap.c b/mm/mmap.c
index 03a24cb3951d4..db6134d0458ec 100644
index 79d541f1502b2..2dc64f6dc0181 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -139,7 +139,7 @@ static void remove_vma(struct vm_area_struct *vma, bool unreachable)
might_sleep();
vma_close(vma);
if (vma->vm_file)
- fput(vma->vm_file);
+ vma_fput(vma);
mpol_put(vma_policy(vma));
if (unreachable)
__vm_area_free(vma);
@@ -553,7 +553,7 @@ static inline void vma_complete(struct vma_prepare *vp,
if (vp->file) {
uprobe_munmap(vp->remove, vp->remove->vm_start,
vp->remove->vm_end);
- fput(vp->file);
+ vma_fput(vp->vma);
}
if (vp->remove->anon_vma)
anon_vma_merge(vp->vma, vp->remove);
@@ -2391,7 +2391,7 @@ int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma,
goto out_free_mpol;
if (new->vm_file)
- get_file(new->vm_file);
+ vma_get_file(new);
if (new->vm_ops && new->vm_ops->open)
new->vm_ops->open(new);
@@ -2810,7 +2810,7 @@ static unsigned long __mmap_region(struct file *file, unsigned long addr,
@@ -1484,7 +1484,7 @@ static unsigned long __mmap_region(struct file *file, unsigned long addr,
* and cause general protection fault
* ultimately.
*/
@@ -218,16 +199,7 @@ index 03a24cb3951d4..db6134d0458ec 100644
vm_area_free(vma);
vma = merge;
/* Update vm_flags to pick up the change. */
@@ -2887,7 +2887,7 @@ static unsigned long __mmap_region(struct file *file, unsigned long addr,
return addr;
unmap_and_free_file_vma:
- fput(vma->vm_file);
+ vma_fput(vma);
vma->vm_file = NULL;
vma_iter_set(&vmi, vma->vm_end);
@@ -2982,6 +2982,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
@@ -1654,6 +1654,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
unsigned long ret = -EINVAL;
struct file *file;
vm_flags_t vm_flags;
@@ -235,7 +207,7 @@ index 03a24cb3951d4..db6134d0458ec 100644
pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/mm/remap_file_pages.rst.\n",
current->comm, current->pid);
@@ -3024,14 +3025,18 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
@@ -1696,14 +1697,18 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
/* Save vm_flags used to calculate prot and flags, and recheck later. */
vm_flags = vma->vm_flags;
@@ -256,7 +228,7 @@ index 03a24cb3951d4..db6134d0458ec 100644
return ret;
}
@@ -3039,7 +3044,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
@@ -1711,7 +1716,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
/* OK security check passed, take write lock + let it rip. */
if (mmap_write_lock_killable(mm)) {
@@ -265,7 +237,7 @@ index 03a24cb3951d4..db6134d0458ec 100644
return -EINTR;
}
@@ -3081,9 +3086,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
@@ -1753,9 +1758,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
ret = do_mmap(vma->vm_file, start, size,
prot, flags, 0, pgoff, &populate, NULL);
@@ -293,29 +265,11 @@ index 03a24cb3951d4..db6134d0458ec 100644
if (populate)
mm_populate(ret, populate);
if (!IS_ERR_VALUE(ret))
@@ -3432,7 +3455,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
if (anon_vma_clone(new_vma, vma))
goto out_free_mempol;
if (new_vma->vm_file)
- get_file(new_vma->vm_file);
+ vma_get_file(new_vma);
if (new_vma->vm_ops && new_vma->vm_ops->open)
new_vma->vm_ops->open(new_vma);
if (vma_link(mm, new_vma))
@@ -3445,7 +3468,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
vma_close(new_vma);
if (new_vma->vm_file)
- fput(new_vma->vm_file);
+ vma_fput(new_vma);
unlink_anon_vmas(new_vma);
out_free_mempol:
diff --git a/mm/nommu.c b/mm/nommu.c
index 3228b2d3e4ab6..a1fc80e87fbd5 100644
index 9cb6e99215e2b..5add36afa9786 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -530,7 +530,7 @@ static void __put_nommu_region(struct vm_region *region)
@@ -512,7 +512,7 @@ static void __put_nommu_region(struct vm_region *region)
up_write(&nommu_region_sem);
if (region->vm_file)
@@ -324,7 +278,7 @@ index 3228b2d3e4ab6..a1fc80e87fbd5 100644
/* IO memory and memory shared directly out of the pagecache
* from ramfs/tmpfs mustn't be released here */
@@ -609,7 +609,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
@@ -591,7 +591,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
{
vma_close(vma);
if (vma->vm_file)
@@ -333,7 +287,7 @@ index 3228b2d3e4ab6..a1fc80e87fbd5 100644
put_nommu_region(vma->vm_region);
vm_area_free(vma);
}
@@ -1141,7 +1141,7 @@ unsigned long do_mmap(struct file *file,
@@ -1123,7 +1123,7 @@ unsigned long do_mmap(struct file *file,
goto error_just_free;
}
}
@@ -342,7 +296,7 @@ index 3228b2d3e4ab6..a1fc80e87fbd5 100644
kmem_cache_free(vm_region_jar, region);
region = pregion;
result = start;
@@ -1227,10 +1227,10 @@ unsigned long do_mmap(struct file *file,
@@ -1209,10 +1209,10 @@ unsigned long do_mmap(struct file *file,
error:
vma_iter_free(&vmi);
if (region->vm_file)
@@ -447,3 +401,52 @@ index 0000000000000..b034d160a18f4
+ fput(pr);
+}
+#endif /* !CONFIG_MMU */
diff --git a/mm/vma.c b/mm/vma.c
index 7621384d64cf5..3bb41fe6ac48e 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -248,7 +248,7 @@ static void vma_complete(struct vma_prepare *vp, struct vma_iterator *vmi,
if (vp->file) {
uprobe_munmap(vp->remove, vp->remove->vm_start,
vp->remove->vm_end);
- fput(vp->file);
+ vma_fput(vp->vma);
}
if (vp->remove->anon_vma)
anon_vma_merge(vp->vma, vp->remove);
@@ -328,7 +328,7 @@ void remove_vma(struct vm_area_struct *vma, bool unreachable)
might_sleep();
vma_close(vma);
if (vma->vm_file)
- fput(vma->vm_file);
+ vma_fput(vma);
mpol_put(vma_policy(vma));
if (unreachable)
__vm_area_free(vma);
@@ -405,7 +405,7 @@ static int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma,
goto out_free_mpol;
if (new->vm_file)
- get_file(new->vm_file);
+ vma_get_file(new);
if (new->vm_ops && new->vm_ops->open)
new->vm_ops->open(new);
@@ -1671,7 +1671,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
if (anon_vma_clone(new_vma, vma))
goto out_free_mempol;
if (new_vma->vm_file)
- get_file(new_vma->vm_file);
+ vma_get_file(new_vma);
if (new_vma->vm_ops && new_vma->vm_ops->open)
new_vma->vm_ops->open(new_vma);
if (vma_link(mm, new_vma))
@@ -1684,7 +1684,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
vma_close(new_vma);
if (new_vma->vm_file)
- fput(new_vma->vm_file);
+ vma_fput(new_vma);
unlink_anon_vmas(new_vma);
out_free_mempol:
@@ -1,11 +1,11 @@
SPDX-License-Identifier: GPL-2.0
aufs6.6.63 standalone patch
aufs6.12 standalone patch
diff --git a/fs/dcache.c b/fs/dcache.c
index e2877ac9a1e6..f20b4ac29a1d 100644
index 1ab11cad60e8c..3a01c42c6639e 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1455,6 +1455,7 @@ void d_walk(struct dentry *parent, void *data,
@@ -1333,6 +1333,7 @@ void d_walk(struct dentry *parent, void *data,
seq = 1;
goto again;
}
@@ -13,7 +13,7 @@ index e2877ac9a1e6..f20b4ac29a1d 100644
struct check_mount {
struct vfsmount *mnt;
@@ -3058,6 +3059,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
@@ -2899,6 +2900,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
write_sequnlock(&rename_lock);
}
@@ -22,10 +22,10 @@ index e2877ac9a1e6..f20b4ac29a1d 100644
/**
* d_ancestor - search for an ancestor
diff --git a/fs/exec.c b/fs/exec.c
index 7776209d98c1..372bbb606c38 100644
index 6c53920795c2e..22e10087e34fa 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -112,6 +112,7 @@ bool path_noexec(const struct path *path)
@@ -114,6 +114,7 @@ bool path_noexec(const struct path *path)
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
}
@@ -34,22 +34,22 @@ index 7776209d98c1..372bbb606c38 100644
#ifdef CONFIG_USELIB
/*
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 1e44fc9b0f70..f5dd3c8b414e 100644
index 460791727fd9c..75ab59a3df36f 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -87,6 +87,7 @@ int setfl(int fd, struct file * filp, unsigned int arg)
@@ -90,6 +90,7 @@ int setfl(int fd, struct file * filp, unsigned int arg)
out:
return error;
}
+EXPORT_SYMBOL_GPL(setfl);
void __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
int force)
/*
* Allocate an file->f_owner struct if it doesn't exist, handling racing
diff --git a/fs/file_table.c b/fs/file_table.c
index ee21b3da9d08..c45ac36795dd 100644
index eed5ffad9997c..2f6bead424786 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -225,6 +225,7 @@ struct file *alloc_empty_file(int flags, const struct cred *cred)
@@ -228,6 +228,7 @@ struct file *alloc_empty_file(int flags, const struct cred *cred)
}
return ERR_PTR(-ENFILE);
}
@@ -58,18 +58,10 @@ index ee21b3da9d08..c45ac36795dd 100644
/*
* Variant of alloc_empty_file() that doesn't check and modify nr_files.
diff --git a/fs/namespace.c b/fs/namespace.c
index c9347fc5e14a..d47e357d65de 100644
index 85739e2d64c00..8aa96de6c151e 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -466,6 +466,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
mnt_dec_writers(real_mount(mnt));
preempt_enable();
}
+EXPORT_SYMBOL_GPL(__mnt_drop_write);
/**
* mnt_drop_write - give up write access to a mount
@@ -877,6 +878,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
@@ -971,6 +971,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
{
return check_mnt(real_mount(mnt));
}
@@ -77,7 +69,23 @@ index c9347fc5e14a..d47e357d65de 100644
/*
* vfsmount lock must be held for write
@@ -2152,6 +2154,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
@@ -2200,6 +2201,7 @@ struct vfsmount *collect_mounts(const struct path *path)
return ERR_CAST(tree);
return &tree->mnt;
}
+EXPORT_SYMBOL_GPL(collect_mounts);
static void free_mnt_ns(struct mnt_namespace *);
static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *, bool);
@@ -2230,6 +2232,7 @@ void drop_collected_mounts(struct vfsmount *mnt)
unlock_mount_hash();
namespace_unlock();
}
+EXPORT_SYMBOL_GPL(drop_collected_mounts);
bool has_locked_children(struct mount *mnt, struct dentry *dentry)
{
@@ -2301,6 +2304,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
}
return 0;
}
@@ -86,7 +94,7 @@ index c9347fc5e14a..d47e357d65de 100644
static void lock_mnt_tree(struct mount *mnt)
{
diff --git a/fs/notify/group.c b/fs/notify/group.c
index 1de6631a3925..3008eb37a18d 100644
index 18446b7b0d495..09138e0b8a6a5 100644
--- a/fs/notify/group.c
+++ b/fs/notify/group.c
@@ -100,6 +100,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
@@ -98,10 +106,10 @@ index 1de6631a3925..3008eb37a18d 100644
/*
* Drop a reference to a group. Free it if it's through.
diff --git a/fs/open.c b/fs/open.c
index f9ac703ec1b2..d5c83814332e 100644
index 5da4df2f9b18a..6024098fc6444 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -67,6 +67,7 @@ int do_truncate(struct mnt_idmap *idmap, struct dentry *dentry,
@@ -66,6 +66,7 @@ int do_truncate(struct mnt_idmap *idmap, struct dentry *dentry,
inode_unlock(dentry->d_inode);
return ret;
}
@@ -110,10 +118,10 @@ index f9ac703ec1b2..d5c83814332e 100644
long vfs_truncate(const struct path *path, loff_t length)
{
diff --git a/fs/read_write.c b/fs/read_write.c
index 4771701c896b..c79270aba792 100644
index 64dc24afdb3a7..ec1fd6aab1759 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -477,6 +477,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
@@ -576,6 +576,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
inc_syscr(current);
return ret;
}
@@ -121,7 +129,7 @@ index 4771701c896b..c79270aba792 100644
static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
{
@@ -592,6 +593,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
@@ -691,6 +692,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
file_end_write(file);
return ret;
}
@@ -130,10 +138,10 @@ index 4771701c896b..c79270aba792 100644
/* file_ppos returns &file->f_pos or NULL if file is stream */
static inline loff_t *file_ppos(struct file *file)
diff --git a/fs/splice.c b/fs/splice.c
index 7216ef993b5f..7ce1f1bc4268 100644
index b15fd6073b6d3..0fdb86c3813e2 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -932,6 +932,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
@@ -940,6 +940,7 @@ ssize_t do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return warn_unsupported(out, "write");
return out->f_op->splice_write(pipe, out, ppos, len, flags);
}
@@ -142,10 +150,10 @@ index 7216ef993b5f..7ce1f1bc4268 100644
/*
* Indicate to the caller that there was a premature EOF when reading from the
diff --git a/fs/xattr.c b/fs/xattr.c
index c20046548f21..1d66796705fb 100644
index 05ec7e7d9e87e..e07ffa052dfb4 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -406,6 +406,7 @@ vfs_getxattr_alloc(struct mnt_idmap *idmap, struct dentry *dentry,
@@ -405,6 +405,7 @@ vfs_getxattr_alloc(struct mnt_idmap *idmap, struct dentry *dentry,
*xattr_value = value;
return error;
}
@@ -154,7 +162,7 @@ index c20046548f21..1d66796705fb 100644
ssize_t
__vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 64b9aedbe941..903a23230775 100644
index 34b378cf7a95f..df6a751298b32 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -239,6 +239,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
@@ -166,7 +174,7 @@ index 64b9aedbe941..903a23230775 100644
#ifdef CONFIG_LOCK_STAT
diff --git a/kernel/task_work.c b/kernel/task_work.c
index c969f1f26be5..68eb672f425d 100644
index c969f1f26be58..68eb672f425d9 100644
--- a/kernel/task_work.c
+++ b/kernel/task_work.c
@@ -242,3 +242,4 @@ void task_work_run(void)
@@ -175,68 +183,68 @@ index c969f1f26be5..68eb672f425d 100644
}
+EXPORT_SYMBOL_GPL(task_work_run);
diff --git a/security/security.c b/security/security.c
index b6144833c7a8..3b15e084ecc3 100644
index c5981e558bc26..045dd716e3400 100644
--- a/security/security.c
+++ b/security/security.c
@@ -1750,6 +1750,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
@@ -1944,6 +1944,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
return 0;
return call_int_hook(path_rmdir, 0, dir, dentry);
return call_int_hook(path_rmdir, dir, dentry);
}
+EXPORT_SYMBOL_GPL(security_path_rmdir);
/**
* security_path_unlink() - Check if removing a hard link is allowed
@@ -1785,6 +1786,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
@@ -1979,6 +1980,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
return 0;
return call_int_hook(path_symlink, 0, dir, dentry, old_name);
return call_int_hook(path_symlink, dir, dentry, old_name);
}
+EXPORT_SYMBOL_GPL(security_path_symlink);
/**
* security_path_link - Check if creating a hard link is allowed
@@ -1803,6 +1805,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
@@ -1997,6 +1999,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
return 0;
return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
return call_int_hook(path_link, old_dentry, new_dir, new_dentry);
}
+EXPORT_SYMBOL_GPL(security_path_link);
/**
* security_path_rename() - Check if renaming a file is allowed
@@ -1864,6 +1867,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
@@ -2058,6 +2061,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
return 0;
return call_int_hook(path_chmod, 0, path, mode);
return call_int_hook(path_chmod, path, mode);
}
+EXPORT_SYMBOL_GPL(security_path_chmod);
/**
* security_path_chown() - Check if changing the file's owner/group is allowed
@@ -1881,6 +1885,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
@@ -2075,6 +2079,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
return 0;
return call_int_hook(path_chown, 0, path, uid, gid);
return call_int_hook(path_chown, path, uid, gid);
}
+EXPORT_SYMBOL_GPL(security_path_chown);
/**
* security_path_chroot() - Check if changing the root directory is allowed
@@ -2110,6 +2115,7 @@ int security_inode_permission(struct inode *inode, int mask)
@@ -2319,6 +2324,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return call_int_hook(inode_permission, 0, inode, mask);
return call_int_hook(inode_permission, inode, mask);
}
+EXPORT_SYMBOL_GPL(security_inode_permission);
/**
* security_inode_setattr() - Check if setting file attributes is allowed
@@ -2588,6 +2594,7 @@ int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask);
@@ -2840,6 +2846,7 @@ int security_file_permission(struct file *file, int mask)
{
return call_int_hook(file_permission, file, mask);
}
+EXPORT_SYMBOL_GPL(security_file_permission);
/**
* security_file_alloc() - Allocate and init a file's LSM blob
@@ -2872,6 +2879,7 @@ int security_file_truncate(struct file *file)
@@ -3144,6 +3151,7 @@ int security_file_truncate(struct file *file)
{
return call_int_hook(file_truncate, 0, file);
return call_int_hook(file_truncate, file);
}
+EXPORT_SYMBOL_GPL(security_file_truncate);
File diff suppressed because it is too large Load Diff
@@ -1,8 +1,8 @@
SPDX-License-Identifier: GPL-2.0
aufs6.6.84 lockdep patch
aufs6.12 lockdep patch
diff --git a/include/linux/lockdep_types.h b/include/linux/lockdep_types.h
index 2ebc323d345ae..9d7009190515d 100644
index 9f361d3ab9d95..57efd6ffe7a44 100644
--- a/include/linux/lockdep_types.h
+++ b/include/linux/lockdep_types.h
@@ -12,7 +12,7 @@
@@ -1,10 +1,10 @@
SPDX-License-Identifier: GPL-2.0
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index 134c686c8676..632d447caf64 100644
index 515a9a6a3c6f..9de809dac3be 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -51,10 +51,13 @@ struct shmem_quota_limits {
@@ -55,10 +55,13 @@ struct shmem_quota_limits {
};
struct shmem_sb_info {
@@ -21,10 +21,10 @@ index 134c686c8676..632d447caf64 100644
umode_t mode; /* Mount mode for root directory */
unsigned char huge; /* Whether to try for hugepages */
diff --git a/mm/shmem.c b/mm/shmem.c
index 283fb62084d4..3ecdfcad9159 100644
index 568bb290bdce..f8869230f782 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -111,7 +111,7 @@ struct shmem_falloc {
@@ -112,7 +112,7 @@ struct shmem_falloc {
struct shmem_options {
unsigned long long blocks;
@@ -33,7 +33,7 @@ index 283fb62084d4..3ecdfcad9159 100644
struct mempolicy *mpol;
kuid_t uid;
kgid_t gid;
@@ -136,12 +136,14 @@ static unsigned long shmem_default_max_blocks(void)
@@ -144,12 +144,14 @@ static unsigned long shmem_default_max_blocks(void)
return totalram_pages() / 2;
}
@@ -51,7 +51,7 @@ index 283fb62084d4..3ecdfcad9159 100644
}
#endif
@@ -1284,6 +1286,11 @@ static void shmem_evict_inode(struct inode *inode)
@@ -1291,6 +1293,11 @@ static void shmem_evict_inode(struct inode *inode)
}
simple_xattrs_free(&info->xattrs, sbinfo->max_inodes ? &freed : NULL);
@@ -63,7 +63,7 @@ index 283fb62084d4..3ecdfcad9159 100644
shmem_free_inode(inode->i_sb, freed);
WARN_ON(inode->i_blocks);
clear_inode(inode);
@@ -2525,6 +2532,25 @@ static struct inode *__shmem_get_inode(struct mnt_idmap *idmap,
@@ -2854,6 +2861,25 @@ static struct inode *__shmem_get_inode(struct mnt_idmap *idmap,
break;
}
@@ -89,7 +89,7 @@ index 283fb62084d4..3ecdfcad9159 100644
lockdep_annotate_inode_mutex_key(inode);
return inode;
}
@@ -3772,8 +3798,7 @@ static struct dentry *shmem_get_parent(struct dentry *child)
@@ -4098,8 +4124,7 @@ static struct dentry *shmem_get_parent(struct dentry *child)
static int shmem_match(struct inode *ino, void *vfh)
{
__u32 *fh = vfh;
@@ -99,7 +99,7 @@ index 283fb62084d4..3ecdfcad9159 100644
return ino->i_ino == inum && fh[0] == ino->i_generation;
}
@@ -3793,14 +3818,11 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
@@ -4118,14 +4143,11 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
struct dentry *dentry = NULL;
u64 inum;
@@ -117,7 +117,7 @@ index 283fb62084d4..3ecdfcad9159 100644
if (inode) {
dentry = shmem_find_alias(inode);
iput(inode);
@@ -3812,30 +3834,15 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
@@ -4137,30 +4159,15 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
static int shmem_encode_fh(struct inode *inode, __u32 *fh, int *len,
struct inode *parent)
{
@@ -151,7 +151,7 @@ index 283fb62084d4..3ecdfcad9159 100644
return 1;
}
@@ -3934,7 +3941,7 @@ static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param)
@@ -4259,7 +4266,7 @@ static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param)
break;
case Opt_nr_inodes:
ctx->inodes = memparse(param->string, &rest);
@@ -160,7 +160,7 @@ index 283fb62084d4..3ecdfcad9159 100644
goto bad_value;
ctx->seen |= SHMEM_SEEN_INODES;
break;
@@ -4220,7 +4227,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root)
@@ -4541,7 +4548,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root)
if (sbinfo->max_blocks != shmem_default_max_blocks())
seq_printf(seq, ",size=%luk", K(sbinfo->max_blocks));
if (sbinfo->max_inodes != shmem_default_max_inodes())
@@ -169,7 +169,7 @@ index 283fb62084d4..3ecdfcad9159 100644
if (sbinfo->mode != (0777 | S_ISVTX))
seq_printf(seq, ",mode=%03ho", sbinfo->mode);
if (!uid_eq(sbinfo->uid, GLOBAL_ROOT_UID))
@@ -4274,6 +4281,8 @@ static void shmem_put_super(struct super_block *sb)
@@ -4613,6 +4620,8 @@ static void shmem_put_super(struct super_block *sb)
#ifdef CONFIG_TMPFS_QUOTA
shmem_disable_quotas(sb);
#endif
@@ -178,7 +178,7 @@ index 283fb62084d4..3ecdfcad9159 100644
free_percpu(sbinfo->ino_batch);
percpu_counter_destroy(&sbinfo->used_blocks);
mpol_put(sbinfo->mpol);
@@ -4318,9 +4327,11 @@ static int shmem_fill_super(struct super_block *sb, struct fs_context *fc)
@@ -4657,9 +4666,11 @@ static int shmem_fill_super(struct super_block *sb, struct fs_context *fc)
#else
sb->s_flags |= SB_NOUSER;
#endif
@@ -191,7 +191,7 @@ index 283fb62084d4..3ecdfcad9159 100644
if (sb->s_flags & SB_KERNMOUNT) {
sbinfo->ino_batch = alloc_percpu(ino_t);
if (!sbinfo->ino_batch)
@@ -4463,6 +4474,15 @@ static int shmem_error_remove_page(struct address_space *mapping,
@@ -4804,6 +4815,15 @@ static int shmem_error_remove_folio(struct address_space *mapping,
return 0;
}
@@ -204,10 +204,10 @@ index 283fb62084d4..3ecdfcad9159 100644
+ idr_destroy(&sbinfo->idr);
+}
+
const struct address_space_operations shmem_aops = {
static const struct address_space_operations shmem_aops = {
.writepage = shmem_writepage,
.dirty_folio = noop_dirty_folio,
@@ -4636,6 +4656,7 @@ void __init shmem_init(void)
@@ -4968,6 +4988,7 @@ void __init shmem_init(void)
pr_err("Could not kern_mount tmpfs\n");
goto out1;
}
@@ -1,10 +1,10 @@
SPDX-License-Identifier: GPL-2.0
diff --git a/fs/inode.c b/fs/inode.c
index 030e07b169c2..44c331163dd5 100644
index 8dabb224f941..4f03eaa25cc2 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1015,6 +1015,8 @@ unsigned int get_next_ino(void)
@@ -1070,6 +1070,8 @@ unsigned int get_next_ino(void)
unsigned int *p = &get_cpu_var(last_ino);
unsigned int res = *p;
@@ -13,7 +13,7 @@ index 030e07b169c2..44c331163dd5 100644
#ifdef CONFIG_SMP
if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) {
static atomic_t shared_last_ino;
@@ -1027,7 +1029,7 @@ unsigned int get_next_ino(void)
@@ -1082,7 +1084,7 @@ unsigned int get_next_ino(void)
res++;
/* get_next_ino should not provide a 0 inode number */
if (unlikely(!res))
@@ -0,0 +1,28 @@
From cfa62868adc134623104a759902a95bc71790614 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Giuseppe=20Ghib=C3=B2?= <ghibo@mageia.org>
Date: Sat, 16 Dec 2023 19:50:53 +0100
Subject: [PATCH] Pull device 0x0821 from list of device supported by rtl8812au
drivers
The Realtek device with ID 0x0821 seems better supported by upstream rtl8821ae
kernel module (see bug https://bugs.mageia.org/show_bug.cgi?id=31965).
---
drivers/staging/rtl8812au/os_dep/linux/usb_intf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/rtl8812au/os_dep/linux/usb_intf.c b/drivers/staging/rtl8812au/os_dep/linux/usb_intf.c
index be0f654f0..c019fa82b 100644
--- a/drivers/staging/rtl8812au/os_dep/linux/usb_intf.c
+++ b/drivers/staging/rtl8812au/os_dep/linux/usb_intf.c
@@ -185,7 +185,6 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
#ifdef CONFIG_RTL8821A
/*=== Realtek demoboard ===*/
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0811), .driver_info = RTL8821}, /* Default ID */
- {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0821), .driver_info = RTL8821}, /* Default ID */
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8822), .driver_info = RTL8821}, /* Default ID */
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0xA811) , .driver_info = RTL8821},/* Default ID */
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0x0820, 0xff, 0xff, 0xff), .driver_info = RTL8821}, /* 8821AU */
--
2.41.0
@@ -0,0 +1,22 @@
diff -up linux-6.12/drivers/staging/rtl8812au/core/rtw_mlme_ext.c.fixwarning linux-6.12/drivers/staging/rtl8812au/core/rtw_mlme_ext.c
--- linux-6.12/drivers/staging/rtl8812au/core/rtw_mlme_ext.c.fixwarning 2024-11-20 22:55:13.263847617 +0100
+++ linux-6.12/drivers/staging/rtl8812au/core/rtw_mlme_ext.c 2024-11-20 22:56:20.104794574 +0100
@@ -2152,13 +2152,15 @@ unsigned int OnAuth(_adapter *padapter,
if (rtw_is_list_empty(&pstat->asoc_list) == _FALSE) {
rtw_list_delete(&pstat->asoc_list);
pstapriv->asoc_list_cnt--;
- if (pstat->expire_to > 0)
- ;/* TODO: STA re_auth within expire_to */
+ if (pstat->expire_to > 0) {
+ ; /* TODO: STA re_auth within expire_to */
+ }
}
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
- if (seq == 1)
+ if (seq == 1) {
; /* TODO: STA re_auth and auth timeout */
+ }
}
}
@@ -0,0 +1,188 @@
From 61116d468dd551124c1ae2c01fff5da99d787fad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Giuseppe=20Ghib=C3=B2?= <ghibo@mageia.org>
Date: Thu, 21 Nov 2024 15:47:58 +0100
Subject: [PATCH] rtl8812au: add missed prototypes
---
drivers/staging/rtl8812au/core/rtw_br_ext.c | 2 ++
drivers/staging/rtl8812au/core/rtw_p2p.c | 1 +
drivers/staging/rtl8812au/core/rtw_xmit.c | 1 +
.../hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c | 7 +++++++
.../hal/phydm/halrf/rtl8814a/halrf_8814a_ce.c | 21 ++++++++++++++++++-
.../staging/rtl8812au/hal/phydm/phydm_ccx.c | 1 +
.../rtl8812au/os_dep/linux/ioctl_cfg80211.c | 12 +++++++++++
.../staging/rtl8812au/os_dep/linux/rtw_proc.c | 1 +
.../staging/rtl8812au/os_dep/linux/usb_intf.c | 2 ++
9 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8812au/core/rtw_br_ext.c b/drivers/staging/rtl8812au/core/rtw_br_ext.c
index 955a50912..283676d36 100644
--- a/drivers/staging/rtl8812au/core/rtw_br_ext.c
+++ b/drivers/staging/rtl8812au/core/rtw_br_ext.c
@@ -1369,6 +1369,8 @@ void dhcp_flag_bcast(_adapter *priv, struct sk_buff *skb)
}
+void *scdb_findEntry(_adapter *priv, unsigned char *macAddr,
+ unsigned char *ipAddr);
void *scdb_findEntry(_adapter *priv, unsigned char *macAddr,
unsigned char *ipAddr)
{
diff --git a/drivers/staging/rtl8812au/core/rtw_p2p.c b/drivers/staging/rtl8812au/core/rtw_p2p.c
index 167dd067f..c560d1712 100644
--- a/drivers/staging/rtl8812au/core/rtw_p2p.c
+++ b/drivers/staging/rtl8812au/core/rtw_p2p.c
@@ -3898,6 +3898,7 @@ void rtw_xframe_chk_wfd_ie(struct xmit_frame *xframe)
#endif
}
+u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_len);
u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_len)
{
uint attr_contentlen = 0;
diff --git a/drivers/staging/rtl8812au/core/rtw_xmit.c b/drivers/staging/rtl8812au/core/rtw_xmit.c
index 0b97e5099..e40c0aecc 100644
--- a/drivers/staging/rtl8812au/core/rtw_xmit.c
+++ b/drivers/staging/rtl8812au/core/rtw_xmit.c
@@ -3766,6 +3766,7 @@ static struct xmit_frame *get_one_xmitframe(struct xmit_priv *pxmitpriv, struct
return pxmitframe;
}
+struct xmit_frame *rtw_get_xframe(struct xmit_priv *pxmitpriv, int *num_frame);
struct xmit_frame *rtw_get_xframe(struct xmit_priv *pxmitpriv, int *num_frame)
{
_irqL irqL0;
diff --git a/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c b/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c
index a66721465..e2113e37a 100644
--- a/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c
+++ b/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c
@@ -1334,6 +1334,13 @@ void phy_lc_calibrate_8812a(void *dm_void)
_phy_lc_calibrate_8812a(dm, true);
}
+void _phy_set_rf_path_switch_8812a(
+#if ((DM_ODM_SUPPORT_TYPE & ODM_AP) || (DM_ODM_SUPPORT_TYPE == ODM_CE))
+ struct dm_struct *dm,
+#else
+ void *adapter,
+#endif
+ boolean is_main, boolean is2T);
void _phy_set_rf_path_switch_8812a(
#if ((DM_ODM_SUPPORT_TYPE & ODM_AP) || (DM_ODM_SUPPORT_TYPE == ODM_CE))
struct dm_struct *dm,
diff --git a/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8814a/halrf_8814a_ce.c b/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8814a/halrf_8814a_ce.c
index 41ce0a6dd..ae060a648 100644
--- a/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8814a/halrf_8814a_ce.c
+++ b/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8814a/halrf_8814a_ce.c
@@ -450,7 +450,17 @@ _phy_lc_calibrate_8814a(
VOID
-phy_APCalibrate_8814A(
+ phy_APCalibrate_8814A(
+#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
+ IN struct dm_struct * pDM_Odm,
+#else
+ IN PADAPTER pAdapter,
+#endif
+ IN s1Byte delta,
+ IN BOOLEAN is2T
+ );
+VOID
+ phy_APCalibrate_8814A(
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
IN struct dm_struct * pDM_Odm,
#else
@@ -545,6 +555,15 @@ BOOLEAN PHY_QueryRFPathSwitch_8814A(
}
+VOID _phy_SetRFPathSwitch_8814A(
+#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
+ IN struct dm_struct * pDM_Odm,
+#else
+ IN PADAPTER pAdapter,
+#endif
+ IN BOOLEAN bMain,
+ IN BOOLEAN is2T
+ );
VOID _phy_SetRFPathSwitch_8814A(
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
IN struct dm_struct * pDM_Odm,
diff --git a/drivers/staging/rtl8812au/hal/phydm/phydm_ccx.c b/drivers/staging/rtl8812au/hal/phydm/phydm_ccx.c
index e0f42c0be..fe69c19b2 100644
--- a/drivers/staging/rtl8812au/hal/phydm/phydm_ccx.c
+++ b/drivers/staging/rtl8812au/hal/phydm/phydm_ccx.c
@@ -26,6 +26,7 @@
#include "mp_precomp.h"
#include "phydm_precomp.h"
+void phydm_ccx_hw_restart(void *dm_void);
void phydm_ccx_hw_restart(void *dm_void)
/*@Will Restart NHM/CLM/FAHM simultaneously*/
{
diff --git a/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c b/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c
index ae4202ad4..c0f563430 100644
--- a/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c
@@ -534,6 +534,7 @@ void rtw_5g_rates_init(struct ieee80211_rate *rates)
);
}
+struct ieee80211_supported_band *rtw_spt_band_alloc(BAND_TYPE band);
struct ieee80211_supported_band *rtw_spt_band_alloc(BAND_TYPE band)
{
struct ieee80211_supported_band *spt_band = NULL;
@@ -2083,6 +2084,16 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
return 0;
}
+static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
+ struct net_device *ndev,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
+ int link_id,
+#endif
+ u8 key_index
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)
+ , bool unicast, bool multicast
+ #endif
+);
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
struct net_device *ndev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
@@ -5956,6 +5967,7 @@ static int cfg80211_rtw_change_station(struct wiphy *wiphy, struct net_device *n
return ret;
}
+struct sta_info *rtw_sta_info_get_by_idx(struct sta_priv *pstapriv, const int idx, u8 *asoc_list_num);
struct sta_info *rtw_sta_info_get_by_idx(struct sta_priv *pstapriv, const int idx, u8 *asoc_list_num)
{
_list *phead, *plist;
diff --git a/drivers/staging/rtl8812au/os_dep/linux/rtw_proc.c b/drivers/staging/rtl8812au/os_dep/linux/rtw_proc.c
index db1177c3a..3b9246bc9 100644
--- a/drivers/staging/rtl8812au/os_dep/linux/rtw_proc.c
+++ b/drivers/staging/rtl8812au/os_dep/linux/rtw_proc.c
@@ -4446,6 +4446,7 @@ static const struct file_operations rtw_odm_proc_sseq_ops = {
};
#endif
+struct proc_dir_entry *rtw_odm_proc_init(struct net_device *dev);
struct proc_dir_entry *rtw_odm_proc_init(struct net_device *dev)
{
struct proc_dir_entry *dir_odm = NULL;
diff --git a/drivers/staging/rtl8812au/os_dep/linux/usb_intf.c b/drivers/staging/rtl8812au/os_dep/linux/usb_intf.c
index 915ef6476..ae2a5a0b9 100644
--- a/drivers/staging/rtl8812au/os_dep/linux/usb_intf.c
+++ b/drivers/staging/rtl8812au/os_dep/linux/usb_intf.c
@@ -1206,6 +1206,8 @@ extern void rtd2885_wlan_netlink_sendMsg(char *action_string, char *name);
_adapter *rtw_sw_export = NULL;
+_adapter *rtw_usb_primary_adapter_init(struct dvobj_priv *dvobj,
+ struct usb_interface *pusb_intf);
_adapter *rtw_usb_primary_adapter_init(struct dvobj_priv *dvobj,
struct usb_interface *pusb_intf)
{
--
2.41.1
@@ -0,0 +1,33 @@
From a9d9038b7a15077395013f1954665656959c81b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Giuseppe=20Ghib=C3=B2?= <ghibo@mageia.org>
From: Your Name <you@example.com>
Date: Thu, 21 Nov 2024 15:53:01 +0100
Subject: [PATCH 6/8] rtl8812au: add suggested braces around empty body in an
else statement
---
drivers/staging/rtl8812au/os_dep/linux/recv_linux.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8812au/os_dep/linux/recv_linux.c b/drivers/staging/rtl8812au/os_dep/linux/recv_linux.c
index 5637e9970..051abba70 100644
--- a/drivers/staging/rtl8812au/os_dep/linux/recv_linux.c
+++ b/drivers/staging/rtl8812au/os_dep/linux/recv_linux.c
@@ -531,10 +531,12 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, union recv_frame *r
#endif /* CONFIG_RTW_NAPI */
ret = rtw_netif_rx(padapter->pnetdev, pkt);
- if (ret == NET_RX_SUCCESS)
+ if (ret == NET_RX_SUCCESS) {
DBG_COUNTER(padapter->rx_logs.os_netif_ok);
- else
+ }
+ else {
DBG_COUNTER(padapter->rx_logs.os_netif_err);
+ }
}
}
--
2.41.1
@@ -0,0 +1,45 @@
From e7f5d03d8bde8f104ed06ad0946e2e40eaf51094 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Giuseppe=20Ghib=C3=B2?= <ghibo@mageia.org>
Date: Thu, 21 Nov 2024 16:06:25 +0100
Subject: [PATCH 7/8] rtl8812au: add suggested braces around empty body in an
else statement
---
drivers/staging/rtl8812au/hal/phydm/phydm_debug.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8812au/hal/phydm/phydm_debug.c b/drivers/staging/rtl8812au/hal/phydm/phydm_debug.c
index bab92632e..a3e8bc48e 100644
--- a/drivers/staging/rtl8812au/hal/phydm/phydm_debug.c
+++ b/drivers/staging/rtl8812au/hal/phydm/phydm_debug.c
@@ -2222,10 +2222,12 @@ void phydm_basic_dbg_message(void *dm_void)
PHYDM_DBG(dm, DBG_CMN, "[%s] System up time: ((%d sec))---->\n",
__func__, dm->phydm_sys_up_time);
- if (dm->is_linked)
+ if (dm->is_linked) {
phydm_basic_dbg_msg_linked(dm);
- else
+ }
+ else {
PHYDM_DBG(dm, DBG_CMN, "No Link !!!\n");
+ }
PHYDM_DBG(dm, DBG_CMN, "[CCA Cnt] {CCK, OFDM, Total} = {%d, %d, %d}\n",
fa_t->cnt_cck_cca, fa_t->cnt_ofdm_cca, fa_t->cnt_cca_all);
@@ -4491,10 +4493,11 @@ void phydm_fw_trace_handler_code(void *dm_void, u8 *buffer, u8 cmd_len)
u16 content_3 = (((u16)buffer[9]) << 8) | ((u16)buffer[8]);
u16 content_4 = (((u16)buffer[11]) << 8) | ((u16)buffer[10]);
- if (cmd_len > 12)
+ if (cmd_len > 12) {
PHYDM_DBG(dm, DBG_FW_TRACE,
"[FW Msg] Invalid cmd length (( %d )) >12\n",
cmd_len);
+ }
/*@--------------------------------------------*/
#ifdef CONFIG_RA_FW_DBG_CODE
if (function == RATE_DECISION) {
--
2.41.1
@@ -0,0 +1,311 @@
From 22b4d5685d828b85d9fc80bfa3d8c5e97b289224 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Giuseppe=20Ghib=C3=B2?= <ghibo@mageia.org>
Date: Thu, 21 Nov 2024 16:27:10 +0100
Subject: [PATCH 8/8] rtl8812au: add suggested braces around empty body in an
else statement
---
.../rtl8812au/hal/phydm/halrf/halphyrf_ce.c | 3 ++-
.../staging/rtl8812au/hal/phydm/halrf/halrf.c | 3 ++-
.../rtl8812au/hal/phydm/halrf/halrf_kfree.c | 18 ++++++++++++------
.../hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c | 3 ++-
.../rtl8812au/hal/phydm/phydm_beamforming.c | 6 ++++--
.../rtl8812au/hal/phydm/phydm_cfotracking.c | 6 ++++--
.../staging/rtl8812au/hal/phydm/phydm_psd.c | 3 ++-
.../staging/rtl8812au/hal/phydm/phydm_rainfo.c | 6 ++++--
.../rtl8812au/hal/phydm/txbf/halcomtxbf.c | 15 ++++++++++-----
.../rtl8812au/hal/phydm/txbf/haltxbfjaguar.c | 3 ++-
10 files changed, 44 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/rtl8812au/hal/phydm/halrf/halphyrf_ce.c b/drivers/staging/rtl8812au/hal/phydm/halrf/halphyrf_ce.c
index 4443c7289..3b05d87c8 100644
--- a/drivers/staging/rtl8812au/hal/phydm/halrf/halphyrf_ce.c
+++ b/drivers/staging/rtl8812au/hal/phydm/halrf/halphyrf_ce.c
@@ -478,9 +478,10 @@ void odm_txpowertracking_callback_thermal_meter(void *adapter)
/*@4 3. Initialize ThermalValues of rf_calibrate_info*/
- if (cali_info->is_reloadtxpowerindex)
+ if (cali_info->is_reloadtxpowerindex) {
RF_DBG(dm, DBG_RF_TX_PWR_TRACK,
"reload ofdm index for band switch\n");
+ }
/*@4 4. Calculate average thermal meter*/
diff --git a/drivers/staging/rtl8812au/hal/phydm/halrf/halrf.c b/drivers/staging/rtl8812au/hal/phydm/halrf/halrf.c
index 09ab5bae9..609333db8 100644
--- a/drivers/staging/rtl8812au/hal/phydm/halrf/halrf.c
+++ b/drivers/staging/rtl8812au/hal/phydm/halrf/halrf.c
@@ -2270,8 +2270,9 @@ boolean halrf_compare(void *dm_void, u32 value)
else if (value < 0x200 && value > 0x64)
fail = true;
- if (fail)
+ if (fail) {
RF_DBG(dm, DBG_RF_DACK, "[DACK]overflow!!!!!!!!!!!!!!!");
+ }
return fail;
}
diff --git a/drivers/staging/rtl8812au/hal/phydm/halrf/halrf_kfree.c b/drivers/staging/rtl8812au/hal/phydm/halrf/halrf_kfree.c
index 773364310..a4e3504a3 100644
--- a/drivers/staging/rtl8812au/hal/phydm/halrf/halrf_kfree.c
+++ b/drivers/staging/rtl8812au/hal/phydm/halrf/halrf_kfree.c
@@ -148,9 +148,10 @@ void phydm_get_thermal_trim_offset_8821c(void *dm_void)
RF_DBG(dm, DBG_RF_MP, "[kfree] 8821c thermal trim flag:0x%02x\n",
power_trim_info->flag);
- if (power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON)
+ if (power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON) {
RF_DBG(dm, DBG_RF_MP, "[kfree] 8821c thermal:%d\n",
power_trim_info->thermal);
+ }
}
void phydm_get_power_trim_offset_8821c(void *dm_void);
@@ -281,9 +282,10 @@ void phydm_get_thermal_trim_offset_8822b(void *dm_void)
RF_DBG(dm, DBG_RF_MP, "[kfree] 8822b thermal trim flag:0x%02x\n",
power_trim_info->flag);
- if (power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON)
+ if (power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON) {
RF_DBG(dm, DBG_RF_MP, "[kfree] 8822b thermal:%d\n",
power_trim_info->thermal);
+ }
}
void phydm_get_power_trim_offset_8822b(void *dm_void);
@@ -532,9 +534,10 @@ void phydm_get_thermal_trim_offset_8710b(void *dm_void)
RF_DBG(dm, DBG_RF_MP, "[kfree] 8710b thermal trim flag:0x%02x\n",
power_trim_info->flag);
- if (power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON)
+ if (power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON) {
RF_DBG(dm, DBG_RF_MP, "[kfree] 8710b thermal:%d\n",
power_trim_info->thermal);
+ }
}
void phydm_get_power_trim_offset_8710b(void *dm_void);
@@ -559,10 +562,11 @@ void phydm_get_power_trim_offset_8710b(void *dm_void)
RF_DBG(dm, DBG_RF_MP, "[kfree] 8710b power trim flag:0x%02x\n",
power_trim_info->flag);
- if (power_trim_info->flag & KFREE_FLAG_ON)
+ if (power_trim_info->flag & KFREE_FLAG_ON) {
RF_DBG(dm, DBG_RF_MP,
"[kfree] 8710b power_trim_data->bb_gain[0][0]=0x%X\n",
power_trim_info->bb_gain[0][0]);
+ }
}
void phydm_set_kfree_to_rf_8710b(void *dm_void, u8 e_rf_path, u8 data);
@@ -620,9 +624,10 @@ void phydm_get_thermal_trim_offset_8192f(void *dm_void)
RF_DBG(dm, DBG_RF_MP, "[kfree] 8192f thermal trim flag:0x%02x\n",
power_trim_info->flag);
- if (power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON)
+ if (power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON) {
RF_DBG(dm, DBG_RF_MP, "[kfree] 8192f thermal:%d\n",
power_trim_info->thermal);
+ }
}
void phydm_get_power_trim_offset_8192f(void *dm_void);
@@ -799,8 +804,9 @@ void phydm_get_thermal_trim_offset_8198f(void *dm_void)
pg_therm = pg_therm & 0x1f;
if ((pg_therm & BIT(0)) == 0)
power_trim_info->thermal = (-1 * (pg_therm >> 1));
- else
+ else {
power_trim_info->thermal = (pg_therm >> 1);
+ }
power_trim_info->flag |= KFREE_FLAG_THERMAL_K_ON;
}
diff --git a/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c b/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c
index e2113e37a..a006d7e74 100644
--- a/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c
+++ b/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c
@@ -1323,8 +1323,9 @@ void phy_iq_calibrate_8812a(void *dm_void, boolean is_recovery)
if (dm->rf_calibrate_info.is_iqk_in_progress)
RF_DBG(dm, DBG_RF_IQK,
"== FW IQK TIMEOUT (Still in progress after 500ms) ==\n");
- } else
+ } else {
_phy_iq_calibrate_8812a(dm, *dm->channel);
+ }
}
void phy_lc_calibrate_8812a(void *dm_void)
diff --git a/drivers/staging/rtl8812au/hal/phydm/phydm_beamforming.c b/drivers/staging/rtl8812au/hal/phydm/phydm_beamforming.c
index 4a770aa72..952b5600b 100644
--- a/drivers/staging/rtl8812au/hal/phydm/phydm_beamforming.c
+++ b/drivers/staging/rtl8812au/hal/phydm/phydm_beamforming.c
@@ -1337,10 +1337,11 @@ beamforming_init_entry(void *dm_void, u16 sta_idx, u8 *bfer_bfee_idx,
if (beamformer_entry == NULL) {
beamformer_entry = beamforming_add_bfer_entry(dm, sta, beamform_cap, num_of_sounding_dim, &bfer_idx);
- if (beamformer_entry == NULL)
+ if (beamformer_entry == NULL) {
PHYDM_DBG(dm, DBG_TXBF,
"[%s]Not enough BFer entry!!!!!\n",
__func__);
+ }
}
}
@@ -1781,10 +1782,11 @@ void beamforming_timer_callback(
#endif
if (ret)
ret = beamforming_start_sw(dm, sound_info->sound_idx, sound_info->sound_mode, sound_info->sound_bw);
- else
+ else {
PHYDM_DBG(dm, DBG_TXBF,
"%s, Error value return from BeamformingStart_V2\n",
__func__);
+ }
if (beam_info->beamformee_su_cnt != 0 || beam_info->beamformee_mu_cnt > 1) {
if (sound_info->sound_mode == SOUNDING_SW_VHT_TIMER || sound_info->sound_mode == SOUNDING_SW_HT_TIMER)
diff --git a/drivers/staging/rtl8812au/hal/phydm/phydm_cfotracking.c b/drivers/staging/rtl8812au/hal/phydm/phydm_cfotracking.c
index 8aac6b094..d88d7a6c0 100644
--- a/drivers/staging/rtl8812au/hal/phydm/phydm_cfotracking.c
+++ b/drivers/staging/rtl8812au/hal/phydm/phydm_cfotracking.c
@@ -213,11 +213,13 @@ void phydm_set_crystal_cap(void *dm_void, u8 crystal_cap)
if (cfo_track->crystal_cap == crystal_cap)
return;
- if (phydm_set_crystal_cap_reg(dm, crystal_cap))
+ if (phydm_set_crystal_cap_reg(dm, crystal_cap)) {
PHYDM_DBG(dm, DBG_CFO_TRK, "Set crystal_cap = 0x%x\n",
cfo_track->crystal_cap);
- else
+ }
+ else {
PHYDM_DBG(dm, DBG_CFO_TRK, "Set fail\n");
+ }
}
boolean
diff --git a/drivers/staging/rtl8812au/hal/phydm/phydm_psd.c b/drivers/staging/rtl8812au/hal/phydm/phydm_psd.c
index 458677b59..33f715bcc 100644
--- a/drivers/staging/rtl8812au/hal/phydm/phydm_psd.c
+++ b/drivers/staging/rtl8812au/hal/phydm/phydm_psd.c
@@ -199,9 +199,10 @@ u8 phydm_psd(void *dm_void, u32 igi, u16 start_point, u16 stop_point)
if (dm->support_ic_type & ODM_IC_JGR3_SERIES)
PHYDM_DBG(dm, ODM_COMP_API, "0x1d70=((0x%x))\n",
odm_get_bb_reg(dm, R_0x1d70, MASKDWORD));
- else
+ else {
PHYDM_DBG(dm, ODM_COMP_API, "0xc50=((0x%x))\n",
odm_get_bb_reg(dm, R_0xc50, MASKDWORD));
+ }
PHYDM_DBG(dm, ODM_COMP_API, "RF0x18=((0x%x))\n",
odm_get_rf_reg(dm, RF_PATH_A, RF_0x18, RFREG_MASK));
diff --git a/drivers/staging/rtl8812au/hal/phydm/phydm_rainfo.c b/drivers/staging/rtl8812au/hal/phydm/phydm_rainfo.c
index 2c24b9be9..ca341c827 100644
--- a/drivers/staging/rtl8812au/hal/phydm/phydm_rainfo.c
+++ b/drivers/staging/rtl8812au/hal/phydm/phydm_rainfo.c
@@ -443,8 +443,9 @@ void phydm_c2h_ra_report_handler(void *dm_void, u8 *cmd_buf, u8 cmd_len)
PHYDM_DBG(dm, DBG_RA, "Rate Back\n");
else if (cmd_buf[3] == 4)
PHYDM_DBG(dm, DBG_RA, "Start rate by RSSI\n");
- else if (cmd_buf[3] == 5)
+ else if (cmd_buf[3] == 5) {
PHYDM_DBG(dm, DBG_RA, "Try rate\n");
+ }
}
phydm_print_rate_2_buff(dm, rate, dbg_buf, PHYDM_SNPRINT_SIZE);
PHYDM_DBG(dm, DBG_RA, "Tx Rate=%s (%d)", dbg_buf, rate);
@@ -829,8 +830,9 @@ u8 phydm_get_tx_stream_num(void *dm_void, enum rf_type type)
tx_num = 3;
else if (type == RF_4T4R)
tx_num = 4;
- else
+ else {
PHYDM_DBG(dm, DBG_RA, "[Warrning] no mimo_type is found\n");
+ }
return tx_num;
}
diff --git a/drivers/staging/rtl8812au/hal/phydm/txbf/halcomtxbf.c b/drivers/staging/rtl8812au/hal/phydm/txbf/halcomtxbf.c
index 4329dcaee..286105ec0 100644
--- a/drivers/staging/rtl8812au/hal/phydm/txbf/halcomtxbf.c
+++ b/drivers/staging/rtl8812au/hal/phydm/txbf/halcomtxbf.c
@@ -43,8 +43,9 @@ void hal_com_txbf_config_gtab(
{
struct dm_struct *dm = (struct dm_struct *)dm_void;
- if (dm->support_ic_type & ODM_RTL8822B)
+ if (dm->support_ic_type & ODM_RTL8822B) {
hal_txbf_8822b_config_gtab(dm);
+ }
}
void phydm_beamform_set_sounding_enter(
@@ -206,8 +207,9 @@ void hal_com_txbf_enter_work_item_callback(
hal_txbf_8192e_enter(dm, idx);
else if (dm->support_ic_type & ODM_RTL8814A)
hal_txbf_8814a_enter(dm, idx);
- else if (dm->support_ic_type & ODM_RTL8822B)
+ else if (dm->support_ic_type & ODM_RTL8822B) {
hal_txbf_8822b_enter(dm, idx);
+ }
}
void hal_com_txbf_leave_work_item_callback(
@@ -236,8 +238,9 @@ void hal_com_txbf_leave_work_item_callback(
hal_txbf_8192e_leave(dm, idx);
else if (dm->support_ic_type & ODM_RTL8814A)
hal_txbf_8814a_leave(dm, idx);
- else if (dm->support_ic_type & ODM_RTL8822B)
+ else if (dm->support_ic_type & ODM_RTL8822B) {
hal_txbf_8822b_leave(dm, idx);
+ }
}
void hal_com_txbf_fw_ndpa_work_item_callback(
@@ -265,8 +268,9 @@ void hal_com_txbf_fw_ndpa_work_item_callback(
hal_txbf_8192e_fw_tx_bf(dm, idx);
else if (dm->support_ic_type & ODM_RTL8814A)
hal_txbf_8814a_fw_txbf(dm, idx);
- else if (dm->support_ic_type & ODM_RTL8822B)
+ else if (dm->support_ic_type & ODM_RTL8822B) {
hal_txbf_8822b_fw_txbf(dm, idx);
+ }
}
void hal_com_txbf_clk_work_item_callback(
@@ -363,8 +367,9 @@ void hal_com_txbf_status_work_item_callback(
hal_txbf_8192e_status(dm, idx);
else if (dm->support_ic_type & ODM_RTL8814A)
hal_txbf_8814a_status(dm, idx);
- else if (dm->support_ic_type & ODM_RTL8822B)
+ else if (dm->support_ic_type & ODM_RTL8822B) {
hal_txbf_8822b_status(dm, idx);
+ }
}
void hal_com_txbf_reset_tx_path_work_item_callback(
diff --git a/drivers/staging/rtl8812au/hal/phydm/txbf/haltxbfjaguar.c b/drivers/staging/rtl8812au/hal/phydm/txbf/haltxbfjaguar.c
index c42fa53a6..78bb399d9 100644
--- a/drivers/staging/rtl8812au/hal/phydm/txbf/haltxbfjaguar.c
+++ b/drivers/staging/rtl8812au/hal/phydm/txbf/haltxbfjaguar.c
@@ -145,9 +145,10 @@ void hal_txbf_jaguar_download_ndpa(
dl_bcn_count++;
} while (!(bcn_valid_reg & BIT(0)) && dl_bcn_count < 5);
- if (!(bcn_valid_reg & BIT(0)))
+ if (!(bcn_valid_reg & BIT(0))) {
PHYDM_DBG(dm, DBG_TXBF, "%s Download RSVD page failed!\n",
__func__);
+ }
/*TDECTRL[15:8] 0x209[7:0] = 0xF6 Beacon Head for TXDMA*/
odm_write_1byte(dm, REG_TDECTRL_8812A + 1, tx_page_bndy);
--
2.41.1
@@ -0,0 +1,96 @@
From f9a18119d2a8f5bd4c35197c89c60305d58d3abd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Giuseppe=20Ghib=C3=B2?= <ghibo@mageia.org>
Date: Thu, 21 Nov 2024 17:03:25 +0100
Subject: [PATCH 09/10] rtl8812au: add suggested braces around empty body in an
else statement
---
drivers/staging/rtl8812au/core/rtw_recv.c | 3 ++-
drivers/staging/rtl8812au/core/rtw_xmit.c | 3 ++-
drivers/staging/rtl8812au/hal/phydm/halrf/halrf_kfree.c | 3 ++-
.../rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c | 3 ++-
drivers/staging/rtl8812au/hal/phydm/phydm_beamforming.c | 3 ++-
5 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8812au/core/rtw_recv.c b/drivers/staging/rtl8812au/core/rtw_recv.c
index ed2bf605c..bdbc146ca 100644
--- a/drivers/staging/rtl8812au/core/rtw_recv.c
+++ b/drivers/staging/rtl8812au/core/rtw_recv.c
@@ -2404,8 +2404,9 @@ sint validate_recv_frame(_adapter *adapter, union recv_frame *precv_frame)
dump_rx_packet(ptr);
}
#endif
- } else
+ } else {
DBG_COUNTER(adapter->rx_logs.core_rx_pre_data_handled);
+ }
break;
default:
DBG_COUNTER(adapter->rx_logs.core_rx_pre_unknown);
diff --git a/drivers/staging/rtl8812au/core/rtw_xmit.c b/drivers/staging/rtl8812au/core/rtw_xmit.c
index e40c0aecc..12a2d5d79 100644
--- a/drivers/staging/rtl8812au/core/rtw_xmit.c
+++ b/drivers/staging/rtl8812au/core/rtw_xmit.c
@@ -1374,8 +1374,9 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pattrib->ta, get_bssid(pmlmepriv), ETH_ALEN);
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_ap);
- } else
+ } else {
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown);
+ }
get_sta_info:
bmcast = IS_MCAST(pattrib->ra);
diff --git a/drivers/staging/rtl8812au/hal/phydm/halrf/halrf_kfree.c b/drivers/staging/rtl8812au/hal/phydm/halrf/halrf_kfree.c
index a4e3504a3..c31566d70 100644
--- a/drivers/staging/rtl8812au/hal/phydm/halrf/halrf_kfree.c
+++ b/drivers/staging/rtl8812au/hal/phydm/halrf/halrf_kfree.c
@@ -814,9 +814,10 @@ void phydm_get_thermal_trim_offset_8198f(void *dm_void)
RF_DBG(dm, DBG_RF_MP, "[kfree] 8198f thermal trim flag:0x%02x\n",
power_trim_info->flag);
- if (power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON)
+ if (power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON) {
RF_DBG(dm, DBG_RF_MP, "[kfree] 8198f thermal:%d\n",
power_trim_info->thermal);
+ }
}
void phydm_get_power_trim_offset_8198f(void *dm_void);
diff --git a/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c b/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c
index a006d7e74..4f11b8223 100644
--- a/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c
+++ b/drivers/staging/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c
@@ -1320,9 +1320,10 @@ void phy_iq_calibrate_8812a(void *dm_void, boolean is_recovery)
if (dm->fw_offload_ability & PHYDM_RF_IQK_OFFLOAD) {
_phy_iq_calibrate_by_fw_8812a(dm);
phydm_iqk_wait(dm, 500);
- if (dm->rf_calibrate_info.is_iqk_in_progress)
+ if (dm->rf_calibrate_info.is_iqk_in_progress) {
RF_DBG(dm, DBG_RF_IQK,
"== FW IQK TIMEOUT (Still in progress after 500ms) ==\n");
+ }
} else {
_phy_iq_calibrate_8812a(dm, *dm->channel);
}
diff --git a/drivers/staging/rtl8812au/hal/phydm/phydm_beamforming.c b/drivers/staging/rtl8812au/hal/phydm/phydm_beamforming.c
index 952b5600b..28ab2dd54 100644
--- a/drivers/staging/rtl8812au/hal/phydm/phydm_beamforming.c
+++ b/drivers/staging/rtl8812au/hal/phydm/phydm_beamforming.c
@@ -1196,10 +1196,11 @@ void phydm_beamforming_notify(
/*@if (sound_info->sound_mode == SOUNDING_SW_VHT_TIMER || sound_info->sound_mode == SOUNDING_SW_HT_TIMER)
odm_set_timer(dm, &beam_info->beamforming_timer, sound_info->sound_period);*/
odm_set_timer(dm, &beam_info->beamforming_timer, 1000); /*@Do MU sounding every 1sec*/
- } else
+ } else {
PHYDM_DBG(dm, DBG_TXBF,
"%s: Less or larger than 2 MU STAs, not to set timer\n",
__func__);
+ }
break;
case BEAMFORMEE_NOTIFY_DELETE_MU:
--
2.41.1
@@ -0,0 +1,42 @@
From 18bb3090b6c0876842813ac10d1822412f51e97e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Giuseppe=20Ghib=C3=B2?= <ghibo@mageia.org>
Date: Thu, 21 Nov 2024 17:07:41 +0100
Subject: [PATCH 10/10] rtl8812au: add missed prototypes
---
drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c | 7 +++++++
drivers/staging/rtl8812au/os_dep/linux/usb_ops_linux.c | 1 +
2 files changed, 8 insertions(+)
diff --git a/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c b/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c
index c0f563430..72538365a 100644
--- a/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c
@@ -2151,6 +2151,12 @@
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
int link_id,
#endif
+ u8 key_index);
+int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,
+ struct net_device *ndev,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
+ int link_id,
+#endif
u8 key_index)
{
#define SET_DEF_KEY_PARAM_FMT " key_index=%d"
diff --git a/drivers/staging/rtl8812au/os_dep/linux/usb_ops_linux.c b/drivers/staging/rtl8812au/os_dep/linux/usb_ops_linux.c
index c7eb7ea40..9ced824fe 100644
--- a/drivers/staging/rtl8812au/os_dep/linux/usb_ops_linux.c
+++ b/drivers/staging/rtl8812au/os_dep/linux/usb_ops_linux.c
@@ -898,6 +898,7 @@ void usb_recv_tasklet(unsigned long priv)
}
}
+void usb_read_port_complete(struct urb *purb, struct pt_regs *regs);
void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
{
struct recv_buf *precvbuf = (struct recv_buf *)purb->context;
--
2.41.1
@@ -0,0 +1,33 @@
From c0d16813f5af3b464cdb6dd415c83d1f238e3548 Mon Sep 17 00:00:00 2001
From: CamiKaseM7 <camilorivasramunni@gmail.com>
Date: Tue, 16 Jan 2024 03:44:34 -0300
Subject: [PATCH 122/132] Fix change_beacon for kernel 6.7
---
os_dep/linux/ioctl_cfg80211.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c b/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c
index 510fa45..a135804 100644
--- a/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c
@@ -5283,9 +5283,16 @@ exit:
return ret;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0))
+static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
+ struct cfg80211_ap_update *params)
+{
+ struct cfg80211_beacon_data *info = &params->beacon;
+#else
static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
struct cfg80211_beacon_data *info)
{
+#endif
int ret = 0;
_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
--
2.41.1
@@ -0,0 +1,27 @@
From d3feb6ae9398834d7778c0e43ebd1fa757eaecd8 Mon Sep 17 00:00:00 2001
From: alium <info@aloisnespor.info>
Date: Tue, 12 Mar 2024 07:11:35 +0100
Subject: [PATCH 123/132] Update os_intfs.c for kernel 6.8
---
os_dep/linux/os_intfs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/staging/rtl8812au/os_dep/linux/os_intfs.c b/drivers/staging/rtl8812au/os_dep/linux/os_intfs.c
index 2dadae0..f4f2ef9 100644
--- a/drivers/staging/rtl8812au/os_dep/linux/os_intfs.c
+++ b/drivers/staging/rtl8812au/os_dep/linux/os_intfs.c
@@ -17,6 +17,10 @@
#include <drv_types.h>
#include <hal_data.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0))
+#define strlcpy strscpy
+#endif
+
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
MODULE_AUTHOR("Realtek Semiconductor Corp.");
--
2.41.1
@@ -0,0 +1,25 @@
From 88d0f5ca85cb8f6a7970ccca9d06a5aa424a18b2 Mon Sep 17 00:00:00 2001
From: alium <info@aloisnespor.info>
Date: Tue, 12 Mar 2024 07:14:38 +0100
Subject: [PATCH 124/132] Update usb_intf.c for kernel 6.8
---
os_dep/linux/usb_intf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8812au/os_dep/linux/usb_intf.c b/drivers/staging/rtl8812au/os_dep/linux/usb_intf.c
index be0f654..709e935 100644
--- a/drivers/staging/rtl8812au/os_dep/linux/usb_intf.c
+++ b/drivers/staging/rtl8812au/os_dep/linux/usb_intf.c
@@ -270,7 +270,7 @@ struct rtw_usb_drv usb_drv = {
.usbdrv.supports_autosuspend = 1,
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0))
.usbdrv.drvwrap.driver.shutdown = rtw_dev_shutdown,
#else
.usbdrv.driver.shutdown = rtw_dev_shutdown,
--
2.41.1
@@ -0,0 +1,35 @@
From 860ccf31655e160ec921190e443f0b532d8d3308 Mon Sep 17 00:00:00 2001
From: alium <info@aloisnespor.info>
Date: Sat, 30 Mar 2024 09:50:44 +0100
Subject: [PATCH 128/132] Update ioctl_cfg80211.c - support for kernel 6.9
support for kernel 6.9
---
drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c b/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c
index a135804..c1f20e9 100644
--- a/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8812au/os_dep/linux/ioctl_cfg80211.c
@@ -460,7 +460,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
if (started) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);
@@ -476,7 +476,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
goto exit;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
--
2.41.1
@@ -30,13 +30,11 @@ diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c b/drivers/net/wirele
index 3bdd6774716d..3c6dc3601784 100644
--- a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
+++ b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
@@ -1065,3 +1065,7 @@ MODULE_FIRMWARE(IWL_BNJ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_BZ_A_FM4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_GL_B_FM_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_BNJ_B_FM_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
@@ -426,3 +426,7 @@
MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_QUZ_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_CC_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
+
+MODULE_FIRMWARE("iwlwifi-so-a0-gf4-a0.pnvm");
+MODULE_FIRMWARE("iwlwifi-so-a0-gf-a0.pnvm");
+MODULE_FIRMWARE("iwlwifi-ty-a0-gf-a0.pnvm");
--
2.35.3
@@ -0,0 +1,42 @@
From 09fcdbd28404b7e02cc9fc4862ae5b43b76867c0 Mon Sep 17 00:00:00 2001
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: Mon, 22 May 2023 22:24:24 +0200
Subject: [PATCH] mmc: sdio: Add/rename SDIO ID of the RTL8723DS SDIO wifi
cards
RTL8723DS comes in two variant and each of them has their own SDIO ID:
- 0xd723 can connect two antennas. The WiFi part is still 1x1 so the
second antenna can be dedicated to Bluetooth
- 0xd724 can only connect one antenna so it's shared between WiFi and
Bluetooth
Add a new entry for the single antenna RTL8723DS (0xd724) which can be
found on the MangoPi MQ-Quad. Also rename the existing RTL8723DS entry
(0xd723) so it's name reflects that it's the variant with support for
two antennas.
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230522202425.1827005-4-martin.blumenstingl@googlemail.com
---
include/linux/mmc/sdio_ids.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h
index c653accdc7fd..7fada7a714fe 100644
--- a/include/linux/mmc/sdio_ids.h
+++ b/include/linux/mmc/sdio_ids.h
@@ -121,7 +121,8 @@
#define SDIO_DEVICE_ID_REALTEK_RTW8822BS 0xb822
#define SDIO_DEVICE_ID_REALTEK_RTW8821CS 0xc821
#define SDIO_DEVICE_ID_REALTEK_RTW8822CS 0xc822
-#define SDIO_DEVICE_ID_REALTEK_RTW8723DS 0xd723
+#define SDIO_DEVICE_ID_REALTEK_RTW8723DS_2ANT 0xd723
+#define SDIO_DEVICE_ID_REALTEK_RTW8723DS_1ANT 0xd724
#define SDIO_DEVICE_ID_REALTEK_RTW8821DS 0xd821
#define SDIO_VENDOR_ID_SIANO 0x039a
--
2.41.0
@@ -6,9 +6,9 @@
drivers/platform/x86/shuttle-wmi.c | 1297 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 1393 insertions(+)
diff -Nurp linux-5.15.1/Documentation/ABI/testing/sysfs-platform-shuttle-wmi linux-5.15.1-shuttle/Documentation/ABI/testing/sysfs-platform-shuttle-wmi
--- linux-5.15.1/Documentation/ABI/testing/sysfs-platform-shuttle-wmi 1970-01-01 02:00:00.000000000 +0200
+++ linux-5.15.1-shuttle/Documentation/ABI/testing/sysfs-platform-shuttle-wmi 2021-11-08 23:24:45.468092228 +0200
diff -up linux-6.11/Documentation/ABI/testing/sysfs-platform-shuttle-wmi.wmi linux-6.11/Documentation/ABI/testing/sysfs-platform-shuttle-wmi
--- linux-6.11/Documentation/ABI/testing/sysfs-platform-shuttle-wmi.wmi 2024-11-18 10:43:15.072608505 +0100
+++ linux-6.11/Documentation/ABI/testing/sysfs-platform-shuttle-wmi 2024-11-18 10:43:15.072608505 +0100
@@ -0,0 +1,72 @@
+What: /sys/devices/platform/shuttle_wmi/lcd_auto_adjust
+Date: December 2010
@@ -82,10 +82,10 @@ diff -Nurp linux-5.15.1/Documentation/ABI/testing/sysfs-platform-shuttle-wmi lin
+ shuttle wmi documentation. It also starts an auto adjust and
+ color adjust cycle. The function should only work in shuttle
+ machines with LCD attached to an analog VGA connector.
diff -Nurp linux-5.15.1/drivers/platform/x86/Kconfig linux-5.15.1-shuttle/drivers/platform/x86/Kconfig
--- linux-5.15.1/drivers/platform/x86/Kconfig 2021-10-31 22:53:10.000000000 +0200
+++ linux-5.15.1-shuttle/drivers/platform/x86/Kconfig 2021-11-08 23:24:45.469092275 +0200
@@ -879,6 +879,21 @@ config PANASONIC_LAPTOP
diff -up linux-6.11/drivers/platform/x86/Kconfig.wmi linux-6.11/drivers/platform/x86/Kconfig
--- linux-6.11/drivers/platform/x86/Kconfig.wmi 2024-11-18 00:42:21.841340904 +0100
+++ linux-6.11/drivers/platform/x86/Kconfig 2024-11-18 10:43:15.072608505 +0100
@@ -947,6 +947,21 @@ config PANASONIC_LAPTOP
If you have a Panasonic Let's note laptop (such as the R1(N variant),
R2, R3, R5, T2, W2 and Y2 series), say Y.
@@ -107,10 +107,10 @@ diff -Nurp linux-5.15.1/drivers/platform/x86/Kconfig linux-5.15.1-shuttle/driver
config SONY_LAPTOP
tristate "Sony Laptop Extras"
depends on ACPI
diff -Nurp linux-5.15.1/drivers/platform/x86/Makefile linux-5.15.1-shuttle/drivers/platform/x86/Makefile
--- linux-5.15.1/drivers/platform/x86/Makefile 2021-10-31 22:53:10.000000000 +0200
+++ linux-5.15.1-shuttle/drivers/platform/x86/Makefile 2021-11-08 23:24:45.469092275 +0200
@@ -84,6 +84,9 @@ obj-$(CONFIG_PCENGINES_APU2) += pcengine
diff -up linux-6.11/drivers/platform/x86/Makefile.wmi linux-6.11/drivers/platform/x86/Makefile
--- linux-6.11/drivers/platform/x86/Makefile.wmi 2024-09-15 16:57:56.000000000 +0200
+++ linux-6.11/drivers/platform/x86/Makefile 2024-11-18 10:43:15.072608505 +0100
@@ -98,6 +98,9 @@ obj-$(CONFIG_BARCO_P50_GPIO) += barco-p5
obj-$(CONFIG_SAMSUNG_LAPTOP) += samsung-laptop.o
obj-$(CONFIG_SAMSUNG_Q10) += samsung-q10.o
@@ -120,9 +120,9 @@ diff -Nurp linux-5.15.1/drivers/platform/x86/Makefile linux-5.15.1-shuttle/drive
# Toshiba
obj-$(CONFIG_TOSHIBA_BT_RFKILL) += toshiba_bluetooth.o
obj-$(CONFIG_TOSHIBA_HAPS) += toshiba_haps.o
diff -Nurp linux-5.15.1/drivers/platform/x86/shuttle-wmi.c linux-5.15.1-shuttle/drivers/platform/x86/shuttle-wmi.c
--- linux-5.15.1/drivers/platform/x86/shuttle-wmi.c 1970-01-01 02:00:00.000000000 +0200
+++ linux-5.15.1-shuttle/drivers/platform/x86/shuttle-wmi.c 2021-11-08 23:24:45.468092228 +0200
diff -up linux-6.11/drivers/platform/x86/shuttle-wmi.c.wmi linux-6.11/drivers/platform/x86/shuttle-wmi.c
--- linux-6.11/drivers/platform/x86/shuttle-wmi.c.wmi 2024-11-18 10:43:15.072608505 +0100
+++ linux-6.11/drivers/platform/x86/shuttle-wmi.c 2024-11-18 10:43:15.072608505 +0100
@@ -0,0 +1,1297 @@
+/*
+ * ACPI-WMI driver for Shuttle WMI interface
@@ -1421,10 +1421,10 @@ diff -Nurp linux-5.15.1/drivers/platform/x86/shuttle-wmi.c linux-5.15.1-shuttle/
+
+module_init(shuttle_wmi_init);
+module_exit(shuttle_wmi_exit);
diff -Nurp linux-5.18/MAINTAINERS.orig linux-5.18/MAINTAINERS
--- linux-5.18/MAINTAINERS.orig
+++ linux-5.18/MAINTAINERS
@@ -17888,6 +17888,12 @@
diff -up linux-6.11/MAINTAINERS.wmi linux-6.11/MAINTAINERS
--- linux-6.11/MAINTAINERS.wmi 2024-11-18 00:42:21.251332731 +0100
+++ linux-6.11/MAINTAINERS 2024-11-18 10:43:15.076608549 +0100
@@ -20958,6 +20958,12 @@ S: Orphan
F: drivers/media/platform/renesas/sh_vou.c
F: include/media/drv-intf/sh_vou.h
@@ -1435,5 +1435,5 @@ diff -Nurp linux-5.18/MAINTAINERS.orig linux-5.18/MAINTAINERS
+F: drivers/platform/x86/shuttle-wmi.c
+
SI2157 MEDIA DRIVER
M: Antti Palosaari <crope@iki.fi>
L: linux-media@vger.kernel.org
S: Orphan
@@ -0,0 +1,105 @@
From a3b125ceb45e1acd21c9bcb6d3a5c52897d536e6 Mon Sep 17 00:00:00 2001
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: Mon, 22 May 2023 22:24:25 +0200
Subject: [PATCH] wifi: rtw88: Add support for the SDIO based RTL8723DS chipset
Wire up RTL8723DS chipset support using the rtw88 SDIO HCI code as well
as the existing RTL8723D chipset code.
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230522202425.1827005-5-martin.blumenstingl@googlemail.com
---
drivers/net/wireless/realtek/rtw88/Kconfig | 11 +++++
drivers/net/wireless/realtek/rtw88/Makefile | 3 ++
.../net/wireless/realtek/rtw88/rtw8723ds.c | 41 +++++++++++++++++++
3 files changed, 55 insertions(+)
create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723ds.c
diff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig
index 29eb2f8e0eb7..cffad1c01249 100644
--- a/drivers/net/wireless/realtek/rtw88/Kconfig
+++ b/drivers/net/wireless/realtek/rtw88/Kconfig
@@ -111,6 +111,17 @@ config RTW88_8723DE
802.11n PCIe wireless network adapter
+config RTW88_8723DS
+ tristate "Realtek 8723DS SDIO wireless network adapter"
+ depends on MMC
+ select RTW88_CORE
+ select RTW88_SDIO
+ select RTW88_8723D
+ help
+ Select this option will enable support for 8723DS chipset
+
+ 802.11n SDIO wireless network adapter
+
config RTW88_8723DU
tristate "Realtek 8723DU USB wireless network adapter"
depends on USB
diff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile
index 82979b30ae8d..fd212c09d88a 100644
--- a/drivers/net/wireless/realtek/rtw88/Makefile
+++ b/drivers/net/wireless/realtek/rtw88/Makefile
@@ -50,6 +50,9 @@ rtw88_8723d-objs := rtw8723d.o rtw8723d_table.o
obj-$(CONFIG_RTW88_8723DE) += rtw88_8723de.o
rtw88_8723de-objs := rtw8723de.o
+obj-$(CONFIG_RTW88_8723DS) += rtw88_8723ds.o
+rtw88_8723ds-objs := rtw8723ds.o
+
obj-$(CONFIG_RTW88_8723DU) += rtw88_8723du.o
rtw88_8723du-objs := rtw8723du.o
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723ds.c b/drivers/net/wireless/realtek/rtw88/rtw8723ds.c
new file mode 100644
index 000000000000..e5b6960ba0a0
--- /dev/null
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723ds.c
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
+/* Copyright(c) Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+ */
+
+#include <linux/mmc/sdio_func.h>
+#include <linux/mmc/sdio_ids.h>
+#include <linux/module.h>
+#include "main.h"
+#include "rtw8723d.h"
+#include "sdio.h"
+
+static const struct sdio_device_id rtw_8723ds_id_table[] = {
+ {
+ SDIO_DEVICE(SDIO_VENDOR_ID_REALTEK,
+ SDIO_DEVICE_ID_REALTEK_RTW8723DS_1ANT),
+ .driver_data = (kernel_ulong_t)&rtw8723d_hw_spec,
+ },
+ {
+ SDIO_DEVICE(SDIO_VENDOR_ID_REALTEK,
+ SDIO_DEVICE_ID_REALTEK_RTW8723DS_2ANT),
+ .driver_data = (kernel_ulong_t)&rtw8723d_hw_spec,
+ },
+ {}
+};
+MODULE_DEVICE_TABLE(sdio, rtw_8723ds_id_table);
+
+static struct sdio_driver rtw_8723ds_driver = {
+ .name = "rtw_8723ds",
+ .probe = rtw_sdio_probe,
+ .remove = rtw_sdio_remove,
+ .id_table = rtw_8723ds_id_table,
+ .drv = {
+ .pm = &rtw_sdio_pm_ops,
+ .shutdown = rtw_sdio_shutdown,
+ }
+};
+module_sdio_driver(rtw_8723ds_driver);
+
+MODULE_AUTHOR("Martin Blumenstingl <martin.blumenstingl@googlemail.com>");
+MODULE_DESCRIPTION("Realtek 802.11n wireless 8723ds driver");
+MODULE_LICENSE("Dual BSD/GPL");
--
2.41.0
@@ -0,0 +1,73 @@
From 9be20a82232779c59979527dfc8febca3182fee2 Mon Sep 17 00:00:00 2001
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: Mon, 22 May 2023 22:24:23 +0200
Subject: [PATCH] wifi: rtw88: rtw8723d: Implement RTL8723DS (SDIO) efuse
parsing
The efuse of the SDIO RTL8723DS chip has only one known member: the mac
address is at offset 0x11a. Add a struct rtw8723ds_efuse describing this
and use it for copying the mac address when the SDIO bus is used.
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230522202425.1827005-3-martin.blumenstingl@googlemail.com
---
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 9 +++++++++
drivers/net/wireless/realtek/rtw88/rtw8723d.h | 6 ++++++
2 files changed, 15 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723d.c b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
index 06e7454c9ca6..cadf66f4e854 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
@@ -216,6 +216,12 @@ static void rtw8723du_efuse_parsing(struct rtw_efuse *efuse,
ether_addr_copy(efuse->addr, map->u.mac_addr);
}
+static void rtw8723ds_efuse_parsing(struct rtw_efuse *efuse,
+ struct rtw8723d_efuse *map)
+{
+ ether_addr_copy(efuse->addr, map->s.mac_addr);
+}
+
static int rtw8723d_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)
{
struct rtw_efuse *efuse = &rtwdev->efuse;
@@ -248,6 +254,9 @@ static int rtw8723d_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)
case RTW_HCI_TYPE_USB:
rtw8723du_efuse_parsing(efuse, map);
break;
+ case RTW_HCI_TYPE_SDIO:
+ rtw8723ds_efuse_parsing(efuse, map);
+ break;
default:
/* unsupported now */
return -ENOTSUPP;
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723d.h b/drivers/net/wireless/realtek/rtw88/rtw8723d.h
index a356318a5c15..3642a2c7f80c 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.h
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.h
@@ -49,6 +49,11 @@ struct rtw8723du_efuse {
u8 mac_addr[ETH_ALEN]; /* 0x107 */
};
+struct rtw8723ds_efuse {
+ u8 res4[0x4a]; /* 0xd0 */
+ u8 mac_addr[ETH_ALEN]; /* 0x11a */
+};
+
struct rtw8723d_efuse {
__le16 rtl_id;
u8 rsvd[2];
@@ -80,6 +85,7 @@ struct rtw8723d_efuse {
union {
struct rtw8723de_efuse e;
struct rtw8723du_efuse u;
+ struct rtw8723ds_efuse s;
};
};
--
2.41.0
+29 -4
View File
@@ -12,16 +12,16 @@
<IsA>app:console</IsA>
<Summary>CPU power management tools</Summary>
<Description>cpupowertools contains utilities to manage power management and frequency scaling policies of modern CPUs.</Description>
<Archive sha1sum="026a9f37b498ab533f843d4a3a85c40f9d108431" type="targz">https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/linux-6.6.tar.gz</Archive>
<Archive sha1sum="42188f7e49564f5ed4fcf8591c6f7477a063fc54" type="tarxz">https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/linux-6.12.tar.xz</Archive>
<BuildDependencies>
<Dependency>pciutils-devel</Dependency>
</BuildDependencies>
<Patches>
<!-- Linux patches -->
<Patch level="1" compressionType="xz">patches/linux/patch-6.6.92.xz</Patch>
<Patch level="1" compressionType="xz">patches/linux/patch-6.12.40.xz</Patch>
<!-- aufs6 patchec -->
<Patch level="1">patches/aufs6/aufs6.6.84-20250414.patch</Patch>
<Patch level="1">patches/aufs6/aufs6.12-20250414.patch</Patch>
<Patch level="1">patches/aufs6/aufs6-base.patch</Patch>
<Patch level="1">patches/aufs6/aufs6-kbuild.patch</Patch>
<!-- <Patch level="1">patches/aufs6/aufs6-loopback.patch</Patch> -->
@@ -37,17 +37,35 @@
<Patch level="1">patches/mageia/platform-x86-shuttle-wmi-drop-devinit-exit.patch</Patch>
<Patch level="1">patches/mageia/platform-x86-shuttle-wmi-kernel-5.5.patch</Patch>
<!-- rtl8812 -->
<Patch level="1">patches/mageia/staging-rtl8812au.patch</Patch>
<Patch level="1">patches/mageia/staging-rtl8812au-rename.patch</Patch>
<Patch level="1">patches/mageia/staging-rtl8812au-Kconfig-Makefile.patch</Patch>
<Patch level="1">patches/mageia/staging-rtl8812au-20231117.patch</Patch>
<Patch level="1">patches/mageia/0001-Pull-device-0x0821-from-list-of-device-supported-by-.patch</Patch>
<Patch level="1">patches/mageia/0122-Fix-change_beacon-for-kernel-6.7.patch</Patch>
<Patch level="1">patches/mageia/0123-Update-os_intfs.c-for-kernel-6.8.patch</Patch>
<Patch level="1">patches/mageia/0124-Update-usb_intf.c-for-kernel-6.8.patch</Patch>
<Patch level="1">patches/mageia/0128-Update-ioctl_cfg80211.c-support-for-kernel-6.9.patch</Patch>
<Patch level="1">patches/mageia/0001-rtl8812au-add-missed-prototypes.patch</Patch>
<Patch level="1">patches/mageia/0005-rtl8812au-add-missed-prototypes.patch</Patch>
<Patch level="1">patches/mageia/0006-rtl8812au-add-suggested-braces-around-empty-body-in-.patch</Patch>
<Patch level="1">patches/mageia/0007-rtl8812au-add-suggested-braces-around-empty-body-in-.patch</Patch>
<Patch level="1">patches/mageia/0008-rtl8812au-add-suggested-braces-around-empty-body-in-.patch</Patch>
<Patch level="1">patches/mageia/0009-rtl8812au-add-suggested-braces-around-empty-body-in-.patch</Patch>
<Patch level="1">patches/mageia/0010-rtl8812au-add-missed-prototypes.patch</Patch>
<Patch level="1">patches/mageia/0002-rtl8812au-fix-warnings.patch</Patch>
<!-- rtw88 -->
<Patch level="1">patches/mageia/net-wireless-rtw88-add-8723de-alias.patch</Patch>
<Patch level="1">patches/mageia/net-wireless-rtw88-add-r8822be-alias.patch</Patch>
<!-- iwlfiwi -->
<Patch level="1">patches/mageia/net-wireless-iwlwifi-add-new-pci-id-for-6235.patch</Patch>
<Patch level="1">patches/mageia/wifi-iwlwifi-pcie-add-support-for-AX101NGW.patch</Patch>
<!-- <Patch level="1">patches/mageia/iwlwifi-cfg-Add-missing-MODULE_FIRMWARE-for-pnvm.patch</Patch> -->
<!-- <Patch level="1">patches/mageia/wifi-iwlwifi-fw-skip-ppag-for-jf.patch</Patch> -->
<Patch level="1">patches/mageia/x86-pci-toshiba-equium-a60-assign-busses.patch</Patch>
</Patches>
@@ -77,6 +95,13 @@
</Package>
<History>
<Update release="101">
<Date>2025-07-24</Date>
<Version>6.12.40</Version>
<Comment>Version bump</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="100">
<Date>2025-05-23</Date>
<Version>6.6.92</Version>