wmi.c (f9e5f05cb9c944696def27618215216df59c7c33) | wmi.c (1276c9ef6db2bc856579bc7f02e4cc710b089f0d) |
---|---|
1/* 2 * Copyright (c) 2004-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 1695 unchanged lines hidden (view full) --- 1704int ath6kl_wmi_startscan_cmd(struct wmi *wmi, enum wmi_scan_type scan_type, 1705 u32 force_fgscan, u32 is_legacy, 1706 u32 home_dwell_time, u32 force_scan_interval, 1707 s8 num_chan, u16 *ch_list) 1708{ 1709 struct sk_buff *skb; 1710 struct wmi_start_scan_cmd *sc; 1711 s8 size; | 1/* 2 * Copyright (c) 2004-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 1695 unchanged lines hidden (view full) --- 1704int ath6kl_wmi_startscan_cmd(struct wmi *wmi, enum wmi_scan_type scan_type, 1705 u32 force_fgscan, u32 is_legacy, 1706 u32 home_dwell_time, u32 force_scan_interval, 1707 s8 num_chan, u16 *ch_list) 1708{ 1709 struct sk_buff *skb; 1710 struct wmi_start_scan_cmd *sc; 1711 s8 size; |
1712 int ret; | 1712 int i, ret; |
1713 1714 size = sizeof(struct wmi_start_scan_cmd); 1715 1716 if ((scan_type != WMI_LONG_SCAN) && (scan_type != WMI_SHORT_SCAN)) 1717 return -EINVAL; 1718 1719 if (num_chan > WMI_MAX_CHANNELS) 1720 return -EINVAL; --- 8 unchanged lines hidden (view full) --- 1729 sc = (struct wmi_start_scan_cmd *) skb->data; 1730 sc->scan_type = scan_type; 1731 sc->force_fg_scan = cpu_to_le32(force_fgscan); 1732 sc->is_legacy = cpu_to_le32(is_legacy); 1733 sc->home_dwell_time = cpu_to_le32(home_dwell_time); 1734 sc->force_scan_intvl = cpu_to_le32(force_scan_interval); 1735 sc->num_ch = num_chan; 1736 | 1713 1714 size = sizeof(struct wmi_start_scan_cmd); 1715 1716 if ((scan_type != WMI_LONG_SCAN) && (scan_type != WMI_SHORT_SCAN)) 1717 return -EINVAL; 1718 1719 if (num_chan > WMI_MAX_CHANNELS) 1720 return -EINVAL; --- 8 unchanged lines hidden (view full) --- 1729 sc = (struct wmi_start_scan_cmd *) skb->data; 1730 sc->scan_type = scan_type; 1731 sc->force_fg_scan = cpu_to_le32(force_fgscan); 1732 sc->is_legacy = cpu_to_le32(is_legacy); 1733 sc->home_dwell_time = cpu_to_le32(home_dwell_time); 1734 sc->force_scan_intvl = cpu_to_le32(force_scan_interval); 1735 sc->num_ch = num_chan; 1736 |
1737 if (num_chan) 1738 memcpy(sc->ch_list, ch_list, num_chan * sizeof(u16)); | 1737 for (i = 0; i < num_chan; i++) 1738 sc->ch_list[i] = cpu_to_le16(ch_list[i]); |
1739 1740 ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_START_SCAN_CMDID, 1741 NO_SYNC_WMIFLAG); 1742 1743 return ret; 1744} 1745 1746int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u16 fg_start_sec, --- 1373 unchanged lines hidden --- | 1739 1740 ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_START_SCAN_CMDID, 1741 NO_SYNC_WMIFLAG); 1742 1743 return ret; 1744} 1745 1746int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u16 fg_start_sec, --- 1373 unchanged lines hidden --- |