merge upstream frequency changes

This seems to get performance up to that of stock firmware, although frequency is defaulting to 270 for LIR somehow and I have to flag it at initialization to 300 manually.