Commit fb6c1c6c authored by Wey-Yi Guy's avatar Wey-Yi Guy

iwlwifi: use bus_get_hw_id for IWL_TM_CMD_APP2DEV_GET_DEVICE_ID

instead of doing all the work in IWL_TM_CMD_APP2DEV_GET_DEVICE_ID, just use
the information from bus_get_hw_id()
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 0ba958eb
...@@ -422,8 +422,7 @@ static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb) ...@@ -422,8 +422,7 @@ static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb)
struct sk_buff *skb; struct sk_buff *skb;
unsigned char *rsp_data_ptr = NULL; unsigned char *rsp_data_ptr = NULL;
int status = 0, rsp_data_len = 0; int status = 0, rsp_data_len = 0;
char buf[32], *ptr = NULL; u32 devid;
unsigned int num, devid;
switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) { switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) {
case IWL_TM_CMD_APP2DEV_GET_DEVICENAME: case IWL_TM_CMD_APP2DEV_GET_DEVICENAME:
...@@ -534,14 +533,8 @@ static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb) ...@@ -534,14 +533,8 @@ static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb)
break; break;
case IWL_TM_CMD_APP2DEV_GET_DEVICE_ID: case IWL_TM_CMD_APP2DEV_GET_DEVICE_ID:
bus_get_hw_id_string(bus(priv), buf, sizeof(buf)); devid = bus_get_hw_id(bus(priv));
ptr = buf; IWL_INFO(priv, "hw version: 0x%x\n", devid);
strsep(&ptr, ":");
sscanf(strsep(&ptr, ":"), "%x", &num);
sscanf(strsep(&ptr, ":"), "%x", &devid);
IWL_INFO(priv, "Device ID = 0x%04x, SubDevice ID= 0x%04x\n",
num, devid);
devid |= (num << 16);
skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20); skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20);
if (!skb) { if (!skb) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment