diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-12-10 14:33:53 -0500 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-12-19 16:33:52 -0500 |
commit | fb6c1c6c352260bc1c90e474f6c08de7e06f1990 (patch) | |
tree | 3bfb895fe7e0f525788462026232cdf33616b767 /drivers/net/wireless/iwlwifi/iwl-testmode.c | |
parent | 0ba958ebf1440411a052bfeedd5b80f7645b3541 (diff) |
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: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-testmode.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-testmode.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-testmode.c b/drivers/net/wireless/iwlwifi/iwl-testmode.c index 05d301687dae..4a5cddd2d56b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-testmode.c +++ b/drivers/net/wireless/iwlwifi/iwl-testmode.c | |||
@@ -422,8 +422,7 @@ static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb) | |||
422 | struct sk_buff *skb; | 422 | struct sk_buff *skb; |
423 | unsigned char *rsp_data_ptr = NULL; | 423 | unsigned char *rsp_data_ptr = NULL; |
424 | int status = 0, rsp_data_len = 0; | 424 | int status = 0, rsp_data_len = 0; |
425 | char buf[32], *ptr = NULL; | 425 | u32 devid; |
426 | unsigned int num, devid; | ||
427 | 426 | ||
428 | switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) { | 427 | switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) { |
429 | case IWL_TM_CMD_APP2DEV_GET_DEVICENAME: | 428 | case IWL_TM_CMD_APP2DEV_GET_DEVICENAME: |
@@ -534,14 +533,8 @@ static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb) | |||
534 | break; | 533 | break; |
535 | 534 | ||
536 | case IWL_TM_CMD_APP2DEV_GET_DEVICE_ID: | 535 | case IWL_TM_CMD_APP2DEV_GET_DEVICE_ID: |
537 | bus_get_hw_id_string(bus(priv), buf, sizeof(buf)); | 536 | devid = bus_get_hw_id(bus(priv)); |
538 | ptr = buf; | 537 | IWL_INFO(priv, "hw version: 0x%x\n", devid); |
539 | strsep(&ptr, ":"); | ||
540 | sscanf(strsep(&ptr, ":"), "%x", &num); | ||
541 | sscanf(strsep(&ptr, ":"), "%x", &devid); | ||
542 | IWL_INFO(priv, "Device ID = 0x%04x, SubDevice ID= 0x%04x\n", | ||
543 | num, devid); | ||
544 | devid |= (num << 16); | ||
545 | 538 | ||
546 | skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20); | 539 | skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20); |
547 | if (!skb) { | 540 | if (!skb) { |