Johannes Berg <johannes@xxxxxxxxxxxxxxxx> writes: >> + ret = strict_strtoul(buf, 0, &val); >> + >> + if (ret) >> + return -EINVAL; >> + >> + if (val != 0 && (val & IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK) == 0) >> + return -ERANGE; >> + >> + local->uapsd_max_sp_len = val; > > This seems a bit weird, that means you need to use 0x20, ..., 0x60, > right? Yes. > I think you should shift it up/down when reading/writing, or > probably even store it shifted in local->uapsd_max_sp_len and then > shift it up by 5 when using that value -- the value itself is only > 0..3 after all, and only stored in a bitmasked field. I was actually thinking this option but ended up requiring the user to do the shift. But thinking is again it doesn't make any sense, I'll do it as you recommend. I'll store the values shifted in local->uapsd_max_sp_len and do the conversion in debugfs.c. -- Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html