carl9170: add hweight and fieldmax from the linux kernel