Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lighthomo
xone
buildfix.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File buildfix.patch of Package xone
--- ./bus/bus.c.orig 2023-10-25 18:35:10.848436750 +0800 +++ ./bus/bus.c 2023-10-25 18:56:56.639860811 +0800 @@ -153,11 +153,9 @@ } #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) -static int gip_bus_remove_compat(struct device *dev) +static void gip_bus_remove_compat(struct device *dev) { gip_bus_remove(dev); - - return 0; } #endif --- ./driver/chatpad.c.orig 2023-10-25 18:35:10.848436750 +0800 +++ ./driver/chatpad.c 2023-10-25 18:57:16.490052236 +0800 @@ -8,7 +8,7 @@ #include "common.h" -#define GIP_CP_NAME "Microsoft X-Box One chatpad" +#define GIP_CP_NAME "Microsoft Xbox One Chatpad" struct gip_chatpad { struct gip_client *client; --- ./driver/gamepad.c.orig 2023-10-25 18:35:10.851770151 +0800 +++ ./driver/gamepad.c 2023-10-25 18:57:37.996724926 +0800 @@ -9,7 +9,7 @@ #include "common.h" -#define GIP_GP_NAME "Microsoft X-Box One pad" +#define GIP_GP_NAME "Microsoft Xbox Controller" /* vendor/product ID for the elite controller series 2 */ #define GIP_GP_VID_MICROSOFT 0x045e --- ./driver/headset.c.orig 2023-10-25 18:35:10.851770151 +0800 +++ ./driver/headset.c 2023-10-25 18:58:43.490435262 +0800 @@ -11,7 +11,7 @@ #include "../bus/bus.h" -#define GIP_HS_NAME "Microsoft X-Box One headset" +#define GIP_HS_NAME "Microsoft Xbox One Headset" #define GIP_HS_CONFIG_DELAY msecs_to_jiffies(1000) #define GIP_HS_POWER_ON_DELAY msecs_to_jiffies(1000) --- ./transport/dongle.c.orig 2023-10-25 18:35:10.851770151 +0800 +++ ./transport/dongle.c 2023-10-25 18:58:24.533691907 +0800 @@ -7,6 +7,7 @@ #include <linux/slab.h> #include <linux/bitfield.h> #include <linux/usb.h> +#include <linux/sysfs.h> #include <linux/ieee80211.h> #include <net/cfg80211.h> @@ -243,6 +244,53 @@ __func__, err); } +static ssize_t xone_dongle_pairing_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct usb_interface *intf = to_usb_interface(dev); + struct xone_dongle *dongle = usb_get_intfdata(intf); + + return sprintf(buf, "%d\n", dongle->pairing); +} + +static ssize_t xone_dongle_pairing_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct usb_interface *intf = to_usb_interface(dev); + struct xone_dongle *dongle = usb_get_intfdata(intf); + bool enable; + int err; + + err = kstrtobool(buf, &enable); + if (err) + return err; + + err = pm_runtime_resume_and_get(dev); + if (err) + return err; + + err = xone_dongle_toggle_pairing(dongle, enable); + if (err) + return err; + + pm_runtime_put(dev); + + return count; +} + +static struct device_attribute xone_dongle_attr_pairing = + __ATTR(pairing, 0644, + xone_dongle_pairing_show, + xone_dongle_pairing_store); + +static struct attribute *xone_dongle_attrs[] = { + &xone_dongle_attr_pairing.attr, + NULL, +}; +ATTRIBUTE_GROUPS(xone_dongle); + static struct xone_dongle_client * xone_dongle_create_client(struct xone_dongle *dongle, u8 *addr) { @@ -879,6 +927,12 @@ usb_set_intfdata(intf, dongle); + err = device_add_groups(&intf->dev, xone_dongle_groups); + if (err) { + xone_dongle_destroy(dongle); + return err; + } + /* enable USB remote wakeup and autosuspend */ intf->needs_remote_wakeup = true; device_wakeup_enable(&dongle->mt.udev->dev); @@ -894,6 +948,8 @@ struct xone_dongle *dongle = usb_get_intfdata(intf); int err; + device_remove_groups(&intf->dev, xone_dongle_groups); + /* can fail during USB device removal */ err = xone_dongle_power_off_clients(dongle); if (err) --- ./transport/mt76.c.orig 2023-10-25 18:35:10.851770151 +0800 +++ ./transport/mt76.c 2023-10-25 18:59:12.323952183 +0800 @@ -629,7 +629,9 @@ static int xone_mt76_evaluate_channels(struct xone_mt76 *mt) { struct xone_mt76_channel *chan; - int i, err; + int i, err, pow = 0; + + mt->channel = NULL; memcpy(mt->channels, xone_mt76_channels, sizeof(xone_mt76_channels)); @@ -644,13 +646,20 @@ err = xone_mt76_switch_channel(mt, chan); if (err) return err; + + /* pick the highest power channel seen first */ + /* the last channel might not be the best one */ + if (chan->power > pow) { + mt->channel = chan; + pow = chan->power; + } dev_dbg(mt->dev, "%s: channel=%u, power=%u\n", __func__, chan->index, chan->power); } - /* the last channel might not be the best one */ - mt->channel = chan; + if (mt->channel == NULL) + mt->channel = chan; return 0; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor