Instead of hard-coding four different cases, use variables (and printf) to reduce the duplication. Signed-hostap: Johannes Berg <johannes.berg@intel.com>