Skip to content

Instantly share code, notes, and snippets.

View vejeta's full-sized avatar
🎯
Focusing

Juan Manuel Méndez Rey vejeta

🎯
Focusing
View GitHub Profile
@vejeta
vejeta / broadcom-sta-fix-6.16.x.patch
Last active September 15, 2025 01:08
Tentative fix for broadcom-sta-dkms 6.30.223.271-27 module for Linux 6.16.x
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
@@ -2378,7 +2378,7 @@
) {
wl_timer_t *t =
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
- from_timer(t, tl, timer);
+ timer_container_of(t, tl, timer);
#else
(wl_timer_t *)data;
@vejeta
vejeta / rtl8192eu-1.0-fix-linux-6.16.x.patch
Created August 25, 2025 00:55
Tentative fix for rtl8192-eu module for Linux 6.16.x
--- rtl8192eu-1.0/include/osdep_service_linux.h 2025-06-08 17:25:56.726822818 +0200
+++ b/include/osdep_service_linux.h 2025-08-25 02:46:08.747420075 +0200
@@ -360,7 +360,7 @@
#endif
{
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
- _timer *ptimer = from_timer(ptimer, in_timer, timer);
+ _timer *ptimer = timer_container_of(ptimer, in_timer, timer);
#else
_timer *ptimer = (_timer *)cntx;
@vejeta
vejeta / kernel-6.17-fixes.patch
Last active October 19, 2025 01:46
Patch for broadcom-sta-6.30.223.271/wl-kernel-6.17-fix.patch
--- a/src/wl/sys/wl_cfg80211_hybrid.c
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
@@ -67,7 +67,7 @@
static s32 wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
struct cfg80211_scan_request *request);
#endif
-static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed);
+static int wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, int unused, u32 changed);
static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ibss_params *params);
@vejeta
vejeta / stremio-nonroot-secure.sh
Last active October 28, 2025 21:02
Running stremio in wolfi
#!/bin/bash
# stremio-nonroot-secure.sh
# Secure nonroot execution for Stremio in production environments
# Implements security best practices for containerized GUI applications
set -e
# Detect system configuration
VIDEO_GID=$(stat -c "%g" /dev/dri/card0)
RENDER_GID=$(stat -c "%g" /dev/dri/renderD128)
@vejeta
vejeta / fixtest.c
Created July 5, 2026 23:34
Reproduction scripts for SDL2-compat/SDL3 stuck-event-queue bug and libx11-compat Cocoa pump-wake fix (sdl2-compat 2.32.70 on SDL3 3.4.12)
/* Validates the proposed long-term fix design: the pump-wake timer writes the
* pipe byte DIRECTLY (no SDL event, no event filter, no SDL queue), rate-limited
* by an atomic 'pendingWakeBytes', and the main-thread pump consumes it. This
* must sustain ~30Hz wakes indefinitely with no freeze and no busy-spin.
*/
#include <SDL.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>