Staging: at76_usb: fix !CONFIG_WIRELESS_EXT build
PATCH 1/4 Staging: at76_usb: fix !CONFIG_WIRELESS_EXT build
Fix this build error when CONFIG_WIRELESS_EXT is not set at76_usb.c:5322: error: 'struct net_device' has no member named 'wireless_data' at76_usb.c:5325: error: 'struct net_device' has no member named 'wireless_handlers'
Signed-off-by Alexander Beregalov <[email protected]>
--- drivers/staging/at76_usb/at76_usb.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/staging/at76_usb/at76_usb.c +3 -1
@@ -5319,10 +5319,12 @@ static int at76_init_new_device(struct at76_priv *priv,/* Add pointers to enable iwspy support. */ priv->wireless_data.spy_data = &priv->spy_data; +#ifdef CONFIG_WIRELESS_EXT netdev->wireless_data = &priv->wireless_data; + netdev->wireless_handlers = &at76_handler_def; +#endif netdev->watchdog_timeo =2 *HZ ; - netdev->wireless_handlers = &at76_handler_def;dev_alloc_name (netdev,"wlan%d" ); ret =register_netdev (priv->netdev);
Signature · 1 line
1.6.3.3
PATCH 2/4 Staging: at76_usb: replace mac2str() with %pM
Signed-off-by Alexander Beregalov <[email protected]>
--- drivers/staging/at76_usb/at76_usb.c | 127 +++++++++++++++------------------- 1 files changed, 56 insertions(+), 71 deletions(-)
drivers/staging/at76_usb/at76_usb.c +56 -71
@@ -558,20 +558,6 @@ static char *hex2str(void *buf, int len)return ret; } -#define MAC2STR_BUFFERS 4 - -static inline char *mac2str (u8 *mac) -{ -static atomic_t a =ATOMIC_INIT (0 ); -static char bufs[MAC2STR_BUFFERS ][6 *3 ]; -char *str; - - str = bufs[atomic_inc_return (&a) & (MAC2STR_BUFFERS -1 )]; -sprintf (str,"%02x:%02x:%02x:%02x:%02x:%02x" , - mac[0 ], mac[1 ], mac[2 ], mac[3 ], mac[4 ], mac[5 ]); -return str; -} -/* LED trigger */ static int tx_activity;static void at76_ledtrig_tx_timerfunc (unsigned long data);
@@ -1071,13 +1057,12 @@ static void at76_dump_mib_mac_addr(struct at76_priv *priv) goto exit; } -at76_dbg (DBG_MIB ,"%s: MIB MAC_ADDR: mac_addr %s res 0x%x 0x%x" , - priv->netdev->name, -mac2str (m->mac_addr), m->res[0 ], m->res[1 ]); +at76_dbg (DBG_MIB ,"%s: MIB MAC_ADDR: mac_addr %pM res 0x%x 0x%x" , + priv->netdev->name, m->mac_addr, m->res[0 ], m->res[1 ]);for (i =0 ; i <ARRAY_SIZE (m->group_addr); i++) -at76_dbg (DBG_MIB ,"%s: MIB MAC_ADDR: group addr %d: %s, " +at76_dbg (DBG_MIB ,"%s: MIB MAC_ADDR: group addr %d: %pM, " "status %d" , priv->netdev->name, i, -mac2str (m->group_addr[i]), m->group_addr_status[i]); + m->group_addr[i], m->group_addr_status[i]); exit:kfree (m); }
@@ -1140,7 +1125,7 @@ static void at76_dump_mib_mac_mgmt(struct at76_priv *priv) at76_dbg(DBG_MIB, "%s: MIB MAC_MGMT: beacon_period %d CFP_max_duration " "%d medium_occupancy_limit %d station_id 0x%x ATIM_window %d " "CFP_mode %d privacy_opt_impl %d DTIM_period %d CFP_period %d " - "current_bssid %s current_essid %s current_bss_type %d " + "current_bssid %pM scurrent_essid %s current_bss_type %d " "pm_mode %d ibss_change %d res %d " "multi_domain_capability_implemented %d " "international_roaming %d country_string %.3s",
@@ -1149,7 +1134,7 @@ static void at76_dump_mib_mac_mgmt(struct at76_priv *priv)le16_to_cpu (m->medium_occupancy_limit),le16_to_cpu (m->station_id),le16_to_cpu (m->ATIM_window), m->CFP_mode, m->privacy_option_implemented, m->DTIM_period, - m->CFP_period,mac2str (m->current_bssid), + m->CFP_period, m->current_bssid,hex2str (m->current_essid,IW_ESSID_MAX_SIZE ), m->current_bss_type, m->power_mgmt_mode, m->ibss_change, m->res, m->multi_domain_capability_implemented,
@@ -1178,7 +1163,7 @@ static void at76_dump_mib_mac(struct at76_priv *priv)"cwmin %d cwmax %d short_retry_time %d long_retry_time %d " "scan_type %d scan_channel %d probe_delay %u " "min_channel_time %d max_channel_time %d listen_int %d " -"desired_ssid %s desired_bssid %s desired_bsstype %d" , +"desired_ssid %s desired_bssid %pM desired_bsstype %d" , priv->netdev->name,le32_to_cpu (m->max_tx_msdu_lifetime),le32_to_cpu (m->max_rx_lifetime), le16_to_cpu(m->frag_threshold), le16_to_cpu(m->rts_threshold),
@@ -1189,7 +1174,7 @@ static void at76_dump_mib_mac(struct at76_priv *priv)le16_to_cpu (m->max_channel_time),le16_to_cpu (m->listen_interval),hex2str (m->desired_ssid,IW_ESSID_MAX_SIZE ), - mac2str(m->desired_bssid), m->desired_bsstype); + m->desired_bssid, m->desired_bsstype); exit:kfree (m); }
@@ -1297,8 +1282,8 @@ static int at76_get_current_bssid(struct at76_priv *priv) goto error; }memcpy (priv->bssid, mac_mgmt->current_bssid,ETH_ALEN ); -printk (KERN_INFO "%s: using BSSID %s\n" , priv->netdev->name, -mac2str (priv->bssid)); +printk (KERN_INFO "%s: using BSSID %pM\n" , priv->netdev->name, + priv->bssid); error:kfree (mac_mgmt); exit:
@@ -1468,8 +1453,8 @@ static int at76_join_bss(struct at76_priv *priv, struct bss_info *ptr) join.timeout =cpu_to_le16 (2000 );at76_dbg (DBG_PROGRESS , -"%s join addr %s ssid %s type %d ch %d timeout %d" , - priv->netdev->name,mac2str (join.bssid), join.essid, +"%s join addr %pM ssid %s stype %d ch %d timeout %d" , + priv->netdev->name, join.bssid, join.essid, join.bss_type, join.channel,le16_to_cpu (join.timeout));return at76_set_card_command (priv->udev,CMD_JOIN , &join,sizeof (struct at76_req_join ));
@@ -1670,8 +1655,8 @@ static int at76_auth_req(struct at76_priv *priv, struct bss_info *bss,/* init. at76_priv tx header */ tx_buffer->wlength =cpu_to_le16 (buf_len -AT76_TX_HDRLEN ); -at76_dbg (DBG_TX_MGMT ,"%s: AuthReq bssid %s alg %d seq_nr %d" , - priv->netdev->name,mac2str (mgmt->addr3), +at76_dbg (DBG_TX_MGMT ,"%s: AuthReq bssid %pM alg %d seq_nr %d" , + priv->netdev->name, mgmt->addr3,le16_to_cpu (req->algorithm),le16_to_cpu (req->transaction));if (seq_nr ==3 ) at76_dbg(DBG_TX_MGMT, "%s: AuthReq challenge: %s ...",
@@ -1746,8 +1731,8 @@ static int at76_assoc_req(struct at76_priv *priv, struct bss_info *bss)next_ie (&ie);/* points to IE of rates now */ at76_dbg (DBG_TX_MGMT , -"%s: AssocReq bssid %s capa 0x%04x ssid %.*s rates %s" , - priv->netdev->name,mac2str (mgmt->addr3), +"%s: AssocReq bssid %pM capa 0x%04x ssid %.*s rates %s" , + priv->netdev->name, mgmt->addr3,le16_to_cpu (req->capability), essid_len, essid,hex2str (ie->data, ie->len));
@@ -1773,8 +1758,8 @@ static void at76_bss_list_timeout(unsigned long par)if (ptr != priv->curr_bss &&time_after (jiffies, ptr->last_rx +BSS_LIST_TIMEOUT )) {at76_dbg (DBG_BSS_TABLE_RM , -"%s: bss_list: removing old BSS %s ch %d" , - priv->netdev->name,mac2str (ptr->bssid), +"%s: bss_list: removing old BSS %pM ch %d" , + priv->netdev->name, ptr->bssid, ptr->channel);list_del (&ptr->list);kfree (ptr);
@@ -1806,9 +1791,9 @@ static void at76_dump_bss_table(struct at76_priv *priv)list_for_each (lptr, &priv->bss_list) { ptr = list_entry(lptr, struct bss_info, list); -at76_dbg (DBG_BSS_TABLE ,"0x%p: bssid %s channel %d ssid %.*s " +at76_dbg (DBG_BSS_TABLE ,"0x%p: bssid %pM channel %d ssid %.*s " "(%s) capa 0x%04x rates %s rssi %d link %d noise %d" , - ptr,mac2str (ptr->bssid), ptr->channel, ptr->ssid_len, + ptr, ptr->bssid, ptr->channel, ptr->ssid_len, ptr->ssid,hex2str (ptr->ssid, ptr->ssid_len), ptr->capa,hex2str (ptr->rates, ptr->rates_len), ptr->rssi, ptr->link_qual, ptr->noise_level);
@@ -1855,8 +1840,8 @@ static void at76_work_assoc_done(struct work_struct *work)netif_wake_queue (priv->netdev);at76_set_mac_state (priv,MAC_CONNECTED );at76_iwevent_bss_connect (priv->netdev, priv->curr_bss->bssid); -at76_dbg (DBG_PROGRESS ,"%s: connected to BSSID %s" , - priv->netdev->name,mac2str (priv->curr_bss->bssid)); +at76_dbg (DBG_PROGRESS ,"%s: connected to BSSID %pM" , + priv->netdev->name, priv->curr_bss->bssid); exit:mutex_unlock (&priv->mtx);
@@ -2218,8 +2203,8 @@ static int at76_iw_handler_set_wap(struct net_device *netdev, {struct at76_priv *priv =netdev_priv (netdev); -at76_dbg (DBG_IOCTL ,"%s: SIOCSIWAP - wap/bssid %s" , netdev->name, -mac2str (ap_addr->sa_data)); +at76_dbg (DBG_IOCTL ,"%s: SIOCSIWAP - wap/bssid %pM" , netdev->name, + ap_addr->sa_data);/* if the incoming address == ff:ff:ff:ff:ff:ff, the user has chosen any or auto AP preference */
@@ -2244,8 +2229,8 @@ static int at76_iw_handler_get_wap(struct net_device *netdev, ap_addr->sa_family =ARPHRD_ETHER ;memcpy (ap_addr->sa_data, priv->bssid,ETH_ALEN ); -at76_dbg (DBG_IOCTL ,"%s: SIOCGIWAP - wap/bssid %s" , netdev->name, -mac2str (ap_addr->sa_data)); +at76_dbg (DBG_IOCTL ,"%s: SIOCGIWAP - wap/bssid %pM" , netdev->name, + ap_addr->sa_data);return 0 ; }
@@ -3323,8 +3308,8 @@ static int at76_open(struct net_device *netdev)set the mac address in the device ! */ if (compare_ether_addr (netdev->dev_addr, priv->mac_addr)) {if (at76_add_mac_address (priv, netdev->dev_addr) >=0 ) -at76_dbg (DBG_PROGRESS ,"%s: set new MAC addr %s" , - netdev->name,mac2str (netdev->dev_addr)); +at76_dbg (DBG_PROGRESS ,"%s: set new MAC addr %pM" , + netdev->name, netdev->dev_addr); } priv->scan_state =SCAN_IDLE ;
@@ -3581,11 +3566,11 @@ static inline int at76_match_bssid(struct at76_priv *priv, struct bss_info *ptr)return 1 ;at76_dbg (DBG_BSS_MATCH , -"%s: requested bssid - %s does not match" , - priv->netdev->name,mac2str (priv->wanted_bssid)); +"%s: requested bssid - %pM does not match" , + priv->netdev->name, priv->wanted_bssid);at76_dbg (DBG_BSS_MATCH , -" AP bssid - %s of bss table entry %p" , -mac2str (ptr->bssid), ptr); +" AP bssid - %pM of bss table entry %p" , + ptr->bssid, ptr);return 0 ; }
@@ -3668,9 +3653,9 @@ static void at76_work_join(struct work_struct *work)printk (KERN_ERR "%s: join_bss completed with %d\n" , priv->netdev->name, ret); else - printk(KERN_INFO "%s: join_bss ssid %s timed out\n", + printk(KERN_INFO "%s: join_bss ssid %pM timed out\n", priv->netdev->name, - mac2str(priv->curr_bss->bssid)); + priv->curr_bss->bssid);/* retry next BSS immediately */ schedule_work (&priv->work_join);
@@ -3788,8 +3773,8 @@ static void at76_dwork_beacon(struct work_struct *work) goto exit;/* We haven't received any beacons from out AP for BEACON_TIMEOUT */ -printk (KERN_INFO "%s: lost beacon bssid %s\n" , - priv->netdev->name,mac2str (priv->curr_bss->bssid)); +printk (KERN_INFO "%s: lost beacon bssid %pM\n" , + priv->netdev->name, priv->curr_bss->bssid);netif_carrier_off (priv->netdev);netif_stop_queue (priv->netdev);
@@ -3879,7 +3864,7 @@ static void at76_work_new_bss(struct work_struct *work)at76_dbg (DBG_PROGRESS ,"ibss_change = 0x%2x" , mac_mgmt.ibss_change);memcpy (priv->bssid, mac_mgmt.current_bssid,ETH_ALEN ); -at76_dbg (DBG_PROGRESS ,"using BSSID %s" ,mac2str (priv->bssid)); +at76_dbg (DBG_PROGRESS ,"using BSSID %pM" , priv->bssid);at76_iwevent_bss_connect (priv->netdev, priv->bssid);
@@ -4116,9 +4101,9 @@ static void at76_rx_mgmt_assoc(struct at76_priv *priv,u16 assoc_id =le16_to_cpu (resp->aid);u16 status =le16_to_cpu (resp->status); -at76_dbg (DBG_RX_MGMT ,"%s: rx AssocResp bssid %s capa 0x%04x status " +at76_dbg (DBG_RX_MGMT ,"%s: rx AssocResp bssid %pM capa 0x%04x status " "0x%04x assoc_id 0x%04x rates %s" , priv->netdev->name, -mac2str (resp->header.addr3),le16_to_cpu (resp->capability), + resp->header.addr3,le16_to_cpu (resp->capability), status, assoc_id,hex2str (resp->info_element->data, resp->info_element->len));
@@ -4155,9 +4140,9 @@ static void at76_rx_mgmt_disassoc(struct at76_priv *priv,struct ieee80211_hdr_3addr *mgmt = &resp->header;at76_dbg (DBG_RX_MGMT , -"%s: rx DisAssoc bssid %s reason 0x%04x destination %s" , - priv->netdev->name,mac2str (mgmt->addr3), -le16_to_cpu (resp->reason),mac2str (mgmt->addr1)); +"%s: rx DisAssoc bssid %pM reason 0x%04x destination %pM" , + priv->netdev->name, mgmt->addr3, +le16_to_cpu (resp->reason), mgmt->addr1);/* We are not connected, ignore */ if (priv->mac_state == MAC_SCANNING || priv->mac_state == MAC_INIT
@@ -4203,9 +4188,9 @@ static void at76_rx_mgmt_auth(struct at76_priv *priv,int status =le16_to_cpu (resp->status);at76_dbg (DBG_RX_MGMT , -"%s: rx AuthFrame bssid %s alg %d seq_nr %d status %d " -"destination %s" , priv->netdev->name,mac2str (mgmt->addr3), - alg, seq_nr, status,mac2str (mgmt->addr1)); +"%s: rx AuthFrame bssid %pM alg %d seq_nr %d status %d " +"destination %pM" , priv->netdev->name, mgmt->addr3, + alg, seq_nr, status, mgmt->addr1);if (alg ==WLAN_AUTH_SHARED_KEY && seq_nr ==2 ) at76_dbg(DBG_RX_MGMT, "%s: AuthFrame challenge %s ...",
@@ -4262,9 +4247,9 @@ static void at76_rx_mgmt_deauth(struct at76_priv *priv,struct ieee80211_hdr_3addr *mgmt = &resp->header;at76_dbg (DBG_RX_MGMT |DBG_PROGRESS , -"%s: rx DeAuth bssid %s reason 0x%04x destination %s" , - priv->netdev->name,mac2str (mgmt->addr3), -le16_to_cpu (resp->reason),mac2str (mgmt->addr1)); +"%s: rx DeAuth bssid %pM reason 0x%04x destination %pM" , + priv->netdev->name, mgmt->addr3, +le16_to_cpu (resp->reason), mgmt->addr1);if (priv->mac_state !=MAC_AUTH && priv->mac_state !=MAC_ASSOC && priv->mac_state !=MAC_CONNECTED ) {
@@ -4366,8 +4351,8 @@ static void at76_rx_mgmt_beacon(struct at76_priv *priv, match->link_qual = buf->link_quality; match->noise_level = buf->noise_level;memcpy (match->bssid, mgmt->addr3,ETH_ALEN ); -at76_dbg (DBG_RX_BEACON ,"%s: bssid %s" , priv->netdev->name, -mac2str (match->bssid)); +at76_dbg (DBG_RX_BEACON ,"%s: bssid %pM" , priv->netdev->name, + match->bssid); ie = bdata->info_element;
@@ -4677,9 +4662,9 @@ static struct sk_buff *at76_check_for_rx_frags(struct at76_priv *priv)unsigned long oldest = ~0UL ;at76_dbg (DBG_RX_FRAGS , -"%s: rx data frame_ctl %04x addr2 %s seq/frag %d/%d " +"%s: rx data frame_ctl %04x addr2 %pM seq/frag %d/%d " "length %d data %d: %s ..." , priv->netdev->name, frame_ctl, -mac2str (i802_11_hdr->addr2), seqnr, fragnr, length, data_len, + i802_11_hdr->addr2, seqnr, fragnr, length, data_len,hex2str (data,32 )); at76_dbg(DBG_RX_FRAGS_SKB, "%s: incoming skb: head %p data %p "
@@ -4838,8 +4823,8 @@ static struct sk_buff *at76_check_for_rx_frags(struct at76_priv *priv) priv->rx_skb = skb;at76_dbg (DBG_RX_FRAGS , -"%s: free old contents: sender %s seq/frag %d/%d" , - priv->netdev->name,mac2str (optr->sender), +"%s: free old contents: sender %pM seq/frag %d/%d" , + priv->netdev->name, optr->sender, optr->seqnr, optr->fragnr); }else {
@@ -5335,8 +5320,8 @@ static int at76_init_new_device(struct at76_priv *priv, } priv->netdev_registered =1 ; -printk (KERN_INFO "%s: USB %s, MAC %s, firmware %d.%d.%d-%d\n" , - netdev->name,dev_name (&interface->dev),mac2str (priv->mac_addr), +printk (KERN_INFO "%s: USB %s, MAC %pM, firmware %d.%d.%d-%d\n" , + netdev->name,dev_name (&interface->dev), priv->mac_addr, priv->fw_version.major, priv->fw_version.minor, priv->fw_version.patch, priv->fw_version.build); printk(KERN_INFO "%s: regulatory domain 0x%02x: %s\n", netdev->name,
Signature · 1 line
1.6.3.3
PATCH 3/4 Staging: otus: remove dependency on WIRELESS_EXT version
As the driver is in mainline now we can remove such dependency. WIRELESS_EXT is 22 now and it is always defined.
Signed-off-by Alexander Beregalov <[email protected]>
--- drivers/staging/otus/ioctl.c | 18 +----------------- drivers/staging/otus/usbdrv.c | 14 -------------- drivers/staging/otus/wrap_buf.c | 3 --- drivers/staging/otus/wrap_dbg.c | 3 --- drivers/staging/otus/wrap_ev.c | 7 ------- drivers/staging/otus/wrap_mem.c | 3 --- drivers/staging/otus/wrap_mis.c | 3 --- drivers/staging/otus/wrap_pkt.c | 4 ---- drivers/staging/otus/wrap_sec.c | 3 --- drivers/staging/otus/wrap_usb.c | 3 --- drivers/staging/otus/wwrap.c | 3 --- drivers/staging/otus/zdcompat.h | 10 ---------- 12 files changed, 1 insertions(+), 73 deletions(-)
drivers/staging/otus/ioctl.c +1 -17
@@ -58,9 +58,7 @@#define ZD_MAX_KEY_SIZE 32#define ZD_MAX_GENERIC_SIZE 64 -#if WIRELESS_EXT >12 #include <net/iw_handler.h> -#endif extern u16_t zfLnxGetVapId (zdev_t *dev);
@@ -248,7 +246,6 @@ int usbdrv_ioctl_setrts(struct net_device *dev, struct iw_param *rrq)return 0 ; } -#if WIRELESS_EXT >14 /* * Encode a WPA or RSN information element as a custom * element using the hostap format.
@@ -269,7 +266,6 @@ u32 encode_ie(void *buf, u32 bufsize, const u8 *ie, u32 ielen, p +=sprintf (p,"%02x" , ie[i]);return (i == ielen ? p - (u8 *)buf:0 ); } -#endif /* WIRELESS_EXT > 14 */ /* * Translate scan data returned from the card to a card independent
@@ -284,9 +280,7 @@ char *usbdrv_translate_scan(struct net_device *dev,char *current_val;/* For rates */ char *last_ev;int i; -#if WIRELESS_EXT >14 -char buf[64 *2 +30 ]; -#endif +char buf[64 *2 +30 ]; last_ev = current_ev;
@@ -365,10 +359,8 @@ char *usbdrv_translate_scan(struct net_device *dev,/* Add quality statistics */ iwe.cmd =IWEVQUAL ; -#if WIRELESS_EXT >18 iwe.u.qual.updated =IW_QUAL_QUAL_UPDATED |IW_QUAL_LEVEL_UPDATED |IW_QUAL_NOISE_UPDATED ; -#endif iwe.u.qual.level = list->signalStrength; iwe.u.qual.noise =0 ; iwe.u.qual.qual = list->signalQuality;
@@ -441,7 +433,6 @@ char *usbdrv_translate_scan(struct net_device *dev,/* Check if we added any event */ if ((current_val - current_ev) >IW_EV_LCP_LEN ) current_ev = current_val; -#if WIRELESS_EXT >14 #define IEEE80211_ELEMID_RSN 0x30memset (&iwe,0 ,sizeof (iwe)); iwe.cmd =IWEVCUSTOM ;
@@ -503,7 +494,6 @@ char *usbdrv_translate_scan(struct net_device *dev, last_ev = current_ev; } } -#endif /* The other data in the scan result are not really * interesting, so for now drop it */
@@ -697,12 +687,9 @@ int usbdrvwext_giwrange(struct net_device *dev,if (!netif_running (dev))return -EINVAL ; -#if WIRELESS_EXT >9 range->txpower_capa =IW_TXPOW_DBM ;/* XXX what about min/max_pmp, min/max_pmt, etc. */ -#endif -#if WIRELESS_EXT >10 range->we_version_compiled =WIRELESS_EXT ; range->we_version_source =13 ;
@@ -710,7 +697,6 @@ int usbdrvwext_giwrange(struct net_device *dev, range->retry_flags =IW_RETRY_LIMIT ; range->min_retry =0 ; range->max_retry =255 ; -#endif /* WIRELESS_EXT > 10 */ channel_num =zfiWlanQueryAllowChannels (dev, channels);
@@ -917,13 +903,11 @@ int usbdrvwext_giwscan(struct net_device *dev, current_ev =usbdrv_translate_scan (dev, info, current_ev, end_buf, &pBssList->bssInfo[i]); -#if WIRELESS_EXT >16 if (current_ev == end_buf) {kfree (pBssList); data->length = current_ev - extra;return -E2BIG ; } -#endif }/* Length of data */
drivers/staging/otus/usbdrv.c +0 -14
@@ -39,9 +39,7 @@#include "linux/netlink.h" #include "linux/rtnetlink.h" -#if WIRELESS_EXT >12 #include <net/iw_handler.h> -#endif #ifdef ZM_HOSTAPD_SUPPORT #include "athr_common.h"
@@ -113,9 +111,6 @@ extern u8_t zfLnxCreateThread(zdev_t *dev);/* Definition of Wireless Extension */ -#if WIRELESS_EXT >12 -#include <net/iw_handler.h> -#endif //wireless extension helper functions extern int usbdrv_ioctl_setessid (struct net_device *dev,struct iw_point *erq);extern int usbdrv_ioctl_setrts (struct net_device *dev,struct iw_param *rrq);
@@ -203,7 +198,6 @@ struct iw_priv_args usbdrv_private_args[] = {// { SIOCIWFIRSTPRIV + 0xC, 0, IW_PRIV_TYPE_CHAR | 12, "get_mac_mode" }, }; -#if WIRELESS_EXT >12 static iw_handler usbdrvwext_handler[] = { (iw_handler )NULL ,/* SIOCSIWCOMMIT */ (iw_handler ) usbdrvwext_giwname,/* SIOCGIWNAME */
@@ -229,13 +223,8 @@ static iw_handler usbdrvwext_handler[] = { (iw_handler ) usbdrvwext_giwap,/* SIOCGIWAP */ (iw_handler )NULL ,/* -- hole -- */ (iw_handler ) usbdrvwext_iwaplist,/* SIOCGIWAPLIST */ -#if WIRELESS_EXT > 13 (iw_handler ) usbdrvwext_siwscan,/* SIOCSIWSCAN */ (iw_handler ) usbdrvwext_giwscan,/* SIOCGIWSCAN */ -#else /* WIRELESS_EXT > 13 */ - (iw_handler )NULL ,/* null */ /* SIOCSIWSCAN */ - (iw_handler )NULL ,/* null */ /* SIOCGIWSCAN */ -#endif /* WIRELESS_EXT > 13 */ (iw_handler ) usbdrvwext_siwessid,/* SIOCSIWESSID */ (iw_handler) usbdrvwext_giwessid, /* SIOCGIWESSID */
@@ -291,7 +280,6 @@ static struct iw_handler_def p80211wext_handler_def = { .private = (iw_handler *) usbdrv_private_handler, .private_args = (struct iw_priv_args *) usbdrv_private_args }; -#endif /* WDS */ //struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER];
@@ -1106,9 +1094,7 @@ u8_t zfLnxInitSetup(struct net_device *dev, struct usbdrv_private *macp) dev->dev_addr[4 ] = addr[4 ]; dev->dev_addr[5 ] = addr[5 ];#endif -#if WIRELESS_EXT >12 dev->wireless_handlers = (struct iw_handler_def *)&p80211wext_handler_def; -#endif dev->netdev_ops = &otus_netdev_ops;
drivers/staging/otus/wrap_buf.c +0 -3
@@ -30,10 +30,7 @@#include <linux/netlink.h> -#if WIRELESS_EXT >12 #include <net/iw_handler.h> -#endif -/* Called to allocate buffer, must return a continue buffer space */
drivers/staging/otus/wrap_dbg.c +0 -3
@@ -27,10 +27,7 @@#include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT >12 #include <net/iw_handler.h> -#endif void zfwDumpBuf (zdev_t * dev,zbuf_t * buf) {
drivers/staging/otus/wrap_ev.c +0 -7
@@ -28,10 +28,7 @@#include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT >12 #include <net/iw_handler.h> -#endif /***** Management *****/
@@ -75,7 +72,6 @@ u16_t zfLnxAsocNotify(zdev_t* dev, u16_t* macAddr, u8_t* body, u16_t bodySize, u// //wireless_send_event(macp->device, SIOCGIWSCAN, &wreq, NULL); // wireless_send_event(macp->device, SIOCGIWAP, &wreq, NULL); //} -#if WIRELESS_EXT >=15 //else if(macp->cardSetting.BssType == AP_BSS) { // if (port == 0) // {
@@ -94,7 +90,6 @@ u16_t zfLnxAsocNotify(zdev_t* dev, u16_t* macAddr, u8_t* body, u16_t bodySize, u// } // } //} -#endif //#endif return 0 ;
@@ -185,7 +180,6 @@ void zfLnxConnectNotify(zdev_t* dev, u16_t status, u16_t* bssid)// //wireless_send_event(dev, SIOCGIWSCAN, &wreq, NULL); wireless_send_event (dev,SIOCGIWAP , &wreq,NULL ); } -#if WIRELESS_EXT >=15 else if (zfiWlanQueryWlanMode (dev) ==ZM_MODE_AP ) {//if (port == 0) //{
@@ -204,7 +198,6 @@ void zfLnxConnectNotify(zdev_t* dev, u16_t status, u16_t* bssid)// } //} } -#endif }//return 0; }
drivers/staging/otus/wrap_mem.c +0 -3
@@ -27,10 +27,7 @@#include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT >12 #include <net/iw_handler.h> -#endif /* Memory management */ /* Called to allocate uncached memory, allocated memory must */
drivers/staging/otus/wrap_mis.c +0 -3
@@ -28,10 +28,7 @@#include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT >12 #include <net/iw_handler.h> -#endif //extern struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER]; extern struct zsVapStruct vap[ZM_VAP_PORT_NUMBER ];
drivers/staging/otus/wrap_pkt.c +0 -4
@@ -28,11 +28,7 @@#include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT >12 #include <net/iw_handler.h> -#endif -//extern struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER];
drivers/staging/otus/wrap_sec.c +0 -3
@@ -28,10 +28,7 @@#include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT >12 #include <net/iw_handler.h> -#endif #ifdef ZM_ENABLE_CENC extern int zfLnxCencSendMsg (struct sock *netlink_sk,u_int8_t *msg,int len);
drivers/staging/otus/wrap_usb.c +0 -3
@@ -28,10 +28,7 @@#include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT >12 #include <net/iw_handler.h> -#endif extern void zfLnxInitUsbTxQ (zdev_t * dev);extern void zfLnxInitUsbRxQ (zdev_t * dev);
drivers/staging/otus/wwrap.c +0 -3
@@ -26,10 +26,7 @@#include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT >12 #include <net/iw_handler.h> -#endif extern void zfiRecv80211 (zdev_t * dev,zbuf_t * buf,struct zsAdditionInfo * addInfo);extern void zfCoreRecv (zdev_t * dev,zbuf_t * buf,struct zsAdditionInfo * addInfo);
drivers/staging/otus/zdcompat.h +0 -10
@@ -35,16 +35,6 @@#undef netdevice_ttypedef struct net_device netdevice_t ; -#ifdef WIRELESS_EXT -#if (WIRELESS_EXT <13 ) -struct iw_request_info -{ -__u16 cmd;/* Wireless Extension command */ -__u16 flags;/* More to come ;-) */ -}; -#endif -#endif -#ifndef in_atomic#define in_atomic () 0#endif
Signature · 1 line
1.6.3.3
PATCH 4/4 Staging: wlan-ng: remove dependency on WIRELESS_EXT version
As the driver is in mainline now we can remove such dependency. WIRELESS_EXT is 22 now and it is always defined.
Signed-off-by Alexander Beregalov <[email protected]>
--- drivers/staging/wlan-ng/p80211netdev.c | 3 --- drivers/staging/wlan-ng/p80211wext.c | 8 -------- drivers/staging/wlan-ng/prism2sta.c | 2 -- 3 files changed, 0 insertions(+), 13 deletions(-)
drivers/staging/wlan-ng/p80211netdev.c +0 -3
@@ -767,9 +767,6 @@ int wlan_setup(wlandevice_t *wlandev) dev->ml_priv = wlandev; dev->netdev_ops = &p80211_netdev_ops; -#if (WIRELESS_EXT <21 ) - dev->get_wireless_stats = p80211wext_get_wireless_stats; -#endif dev->wireless_handlers = &p80211wext_handler_def;netif_stop_queue (dev);
drivers/staging/wlan-ng/p80211wext.c +0 -8
@@ -692,9 +692,6 @@ static int p80211wext_giwessid(netdevice_t *dev, data->flags =1 ;memcpy (essid, wlandev->ssid.data, data->length); essid[data->length] =0 ; -#if (WIRELESS_EXT <21 ) - data->length++; -#endif }else {memset (essid,0 ,sizeof (wlandev->ssid.data)); data->length =0 ;
@@ -727,11 +724,6 @@ static int p80211wext_siwessid(netdevice_t *dev, msg.msgcode = DIDmsg_lnxreq_autojoin; -#if (WIRELESS_EXT <21 ) -if (length) - length--; -#endif -/* Trim the last '\0' to fit the SSID format */ if (length && essid[length -1 ] =='\0' ) length--;
drivers/staging/wlan-ng/prism2sta.c +0 -2
@@ -1447,9 +1447,7 @@ void prism2sta_processing_defer(struct work_struct *data) } wlandev->linkstatus = (hw->link_status == HFA384x_LINK_CONNECTED); -#ifdef WIRELESS_EXT p80211wext_event_associated (wlandev, wlandev->linkstatus); -#endif failed:return ;
Signature · 1 line
1.6.3.3