bcmwl 6.30.223.271+bdcom build fails with kernel 5.8.0-34/36 Ubuntu 20.04.1 LTS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bcmwl (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 20.04.1 LTS
bcmwl-kernel-
I believe the important part of the /var/lib/
/var/lib/
/var/lib/
r type [-Werror=
3376 | if ((wl->proc_entry = proc_create_
| ^~~~~~~~
| |
| const struct file_operations *
In file included from /var/lib/
./include/
102 | extern struct proc_dir_entry *proc_create_
| ^~~~~~~~~~~~~~~~
It looks like /var/lib/
lines 3359-3381 from wl_linux.c
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
static const struct file_operations wl_fops = {
.owner = THIS_MODULE,
.read = wl_proc_read,
.write = wl_proc_write,
};
#endif
static int
wl_reg_
{
char tmp[32];
sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
if ((wl->proc_entry = create_
WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
#else
if ((wl->proc_entry = proc_create_
WL_ERROR(("%s: proc_create_data %s failed\n", __FUNCTION__, tmp));
#endif
ASSERT(0);
return -1;
}
However, it looks like proc_fs.h uses a different structure (proc_ops).
/usr/src/
/usr/src/
kernel 5.8.0-34
proc_fs.h
lines 29-43
struct proc_ops {
unsigned int proc_flags;
int (*proc_open)(struct inode *, struct file *);
ssize_t (*proc_read)(struct file *, char __user *, size_t, loff_t *);
ssize_t (*proc_
loff_t (*proc_
int (*proc_
__poll_t (*proc_poll)(struct file *, struct poll_table_struct *);
long (*proc_
#ifdef CONFIG_COMPAT
long (*proc_
#endif
int (*proc_mmap)(struct file *, struct vm_area_struct *);
unsigned long (*proc_
} __randomize_layout;
and lines 102-107
extern struct proc_dir_entry *proc_create_
struct proc_dir_entry *,
const struct proc_ops *,
void *);
struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
Looking back at the linux 5.4.0-59 headers, proc_fs.h appears to use the file_operations structure.
/usr/src/
/usr/src/
kernel 5.4.0-59
proc_fs.h
lines 44-49
extern struct proc_dir_entry *proc_create_
struct proc_dir_entry *,
const struct file_operations *,
void *);
struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct file_operations *proc_fops);
If this is where the problem lies, I am guessing it is better to try to fix the Broadcom package/ wl_linux.c than the Linux 5.8.0-34 headers?
The information above, was prompted by:
sudo apt-get install --reinstall bcmwl-kernel-source
...
Building initial module for 5.8.0-34-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/
Error! Bad return status for module build on kernel: 5.8.0-34-generic (x86_64)
Consult /var/lib/
dpkg: error processing package bcmwl-kernel-source (--configure):
installed bcmwl-kernel-source package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
bcmwl-
E: Sub-process /usr/bin/dpkg returned an error code (1)
affects: | broadcom-sta (Ubuntu) → bcmwl (Ubuntu) |
summary: |
- bcmwl 6.30.223.271+bdcom build fails with kernel 5.8.0-34 + bcmwl 6.30.223.271+bdcom build fails with kernel 5.8.0-34/36 Ubuntu + 20.04 LTS |
summary: |
bcmwl 6.30.223.271+bdcom build fails with kernel 5.8.0-34/36 Ubuntu - 20.04 LTS + 20.04.1 LTS |
From what I have been reading, it sounds like linux is converting to proc_ops.
From this, I am guessing lines 3360-3364 in wl_linux.c will need to changed from using the file_operations structure to the proc_ops structure.
I do realize this is easier said than done.