Funny timing, I was working on a patch for the same thing too. Instead of using a bitmask, I used ida_alloc (just like hid-playstation does). I'll leave my version of the patch here, for comparison's sake. (It has no description, and it wraps on the 8th player) I can't properly test either of them, since I have only one controller (though every time I connect it, only the first LED light up, as expected).