diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-05 14:50:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-05 14:50:51 -0700 |
commit | 41844e36206be90cd4d962ea49b0abc3612a99d0 (patch) | |
tree | ce0b3a3403bc6abdb28f52779d0d7b57a51a5c86 /drivers/staging/rtl8192e/rtllib_softmac.c | |
parent | 5691f0e9a3e7855832d5fd094801bf600347c2d0 (diff) | |
parent | fc1e2c8ea85e109acf09e74789e9b852f6eed251 (diff) | |
download | op-kernel-dev-41844e36206be90cd4d962ea49b0abc3612a99d0.zip op-kernel-dev-41844e36206be90cd4d962ea49b0abc3612a99d0.tar.gz |
Merge tag 'staging-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO updates from Greg KH:
"Here is the big staging and IIO driver pull request for 4.9-rc1.
There are a lot of patches in here, the majority due to the
drivers/staging/greybus/ subsystem being merged in with full
development history that went back a few years, in order to preserve
the work that those developers did over time.
Lots and lots of tiny cleanups happened in the tree as well, due to
the Outreachy application process and lots of other developers showing
up for the first time to clean code up. Along with those changes, we
deleted a wireless driver, and added a raspberrypi driver (currently
marked broken), and lots of new iio drivers.
Overall the tree still shrunk with more lines removed than added,
about 10 thousand lines removed in total. Full details are in the very
long shortlog below.
All of this has been in the linux-next tree with no issues. There will
be some merge problems with other subsystem trees, but those are all
minor problems and shouldn't be hard to work out when they happen
(MAINTAINERS and some lustre build problems with the IB tree)"
And furter from me asking for clarification about greybus:
"Right now there is a phone from Motorola shipping with this code (a
slightly older version, but the same tree), so even though Ara is not
alive in the same form, the functionality is happening. We are working
with the developers of that phone to merge the newer stuff in with
their fork so they can use the upstream version in future versions of
their phone product line.
Toshiba has at least one chip shipping in their catalog that
needs/uses this protocol over a Unipro link, and rumor has it that
there might be more in the future.
There are also other users of the greybus protocols, there is a talk
next week at ELC that shows how it is being used across a network
connection to control a device, and previous ELC talks have showed the
protocol stack being used over USB to drive embedded Linux boards.
I've also talked to some people who are starting to work to add a host
controller driver to control arduinos as the greybus PHY protocols are
very useful to control a serial/i2c/spio/whatever device across a
random physical link, as it is a way to have a self-describing device
be attached to a host without needing manual configuration.
So yes, people are using it, and there is still the chance that it
will show up in a phone/laptop/tablet/whatever from Google in the
future as well, the tech isn't dead, even if the original large phone
project happens to be"
* tag 'staging-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (3703 commits)
Staging: fbtft: Fix bug in fbtft-core
staging: rtl8188eu: fix double unlock error in rtw_resume_process()
staging:r8188eu: remove GEN_MLME_EXT_HANDLER macro
staging:r8188eu: remove GEN_DRV_CMD_HANDLER macro
staging:r8188eu: remove GEN_EVT_CODE macro
staging:r8188eu: remove GEN_CMD_CODE macro
staging:r8188eu: remove pkt_newalloc member of the recv_buf structure
staging:r8188eu: remove rtw_handle_dualmac declaration
staging:r8188eu: remove (RGTRY|BSSID)_(OFT|SZ) macros
staging:r8188eu: change rtl8188e_process_phy_info function argument type
Staging: fsl-mc: Remove blank lines
Staging: fsl-mc: Fix unaligned * in block comments
Staging: comedi: Align the * in block comments
Staging : ks7010 : Fix block comments warninig
Staging: vt6655: Remove explicit NULL comparison using Coccinelle
staging: rtl8188eu: core: rtw_xmit: Use macros instead of constants
staging: rtl8188eu: core: rtw_xmit: Move constant of the right side
staging: dgnc: Fix lines longer than 80 characters
Staging: dgnc: constify attribute_group structures
Staging: most: hdm-dim2: constify attribute_group structures
...
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib_softmac.c')
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac.c | 99 |
1 files changed, 54 insertions, 45 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 62154e3..da74dc4 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -276,8 +276,9 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee) } } -inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, - struct rtllib_device *ieee) +static inline void +softmac_ps_mgmt_xmit(struct sk_buff *skb, + struct rtllib_device *ieee) { short single = ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE; struct rtllib_hdr_3addr *header = @@ -513,7 +514,7 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh) ieee->be_scan_inprogress = true; - down(&ieee->scan_sem); + mutex_lock(&ieee->scan_mutex); while (1) { do { @@ -566,7 +567,7 @@ out: if (IS_DOT11D_ENABLE(ieee)) DOT11D_ScanComplete(ieee); } - up(&ieee->scan_sem); + mutex_unlock(&ieee->scan_mutex); ieee->be_scan_inprogress = false; @@ -587,7 +588,7 @@ static void rtllib_softmac_scan_wq(void *data) if (rtllib_act_scanning(ieee, true)) return; - down(&ieee->scan_sem); + mutex_lock(&ieee->scan_mutex); if (ieee->eRFPowerState == eRfOff) { netdev_info(ieee->dev, @@ -618,7 +619,7 @@ static void rtllib_softmac_scan_wq(void *data) schedule_delayed_work(&ieee->softmac_scan_wq, msecs_to_jiffies(RTLLIB_SOFTMAC_SCAN_TIME)); - up(&ieee->scan_sem); + mutex_unlock(&ieee->scan_mutex); return; out: @@ -630,7 +631,7 @@ out1: ieee->actscanning = false; ieee->scan_watch_dog = 0; ieee->scanning_continue = 0; - up(&ieee->scan_sem); + mutex_unlock(&ieee->scan_mutex); } @@ -683,7 +684,7 @@ EXPORT_SYMBOL(rtllib_start_send_beacons); static void rtllib_softmac_stop_scan(struct rtllib_device *ieee) { - down(&ieee->scan_sem); + mutex_lock(&ieee->scan_mutex); ieee->scan_watch_dog = 0; if (ieee->scanning_continue == 1) { ieee->scanning_continue = 0; @@ -692,7 +693,7 @@ static void rtllib_softmac_stop_scan(struct rtllib_device *ieee) cancel_delayed_work_sync(&ieee->softmac_scan_wq); } - up(&ieee->scan_sem); + mutex_unlock(&ieee->scan_mutex); } void rtllib_stop_scan(struct rtllib_device *ieee) @@ -753,7 +754,7 @@ static void rtllib_start_scan(struct rtllib_device *ieee) } } -/* called with wx_sem held */ +/* called with wx_mutex held */ void rtllib_start_scan_syncro(struct rtllib_device *ieee, u8 is_mesh) { if (IS_DOT11D_ENABLE(ieee)) { @@ -770,8 +771,10 @@ void rtllib_start_scan_syncro(struct rtllib_device *ieee, u8 is_mesh) } EXPORT_SYMBOL(rtllib_start_scan_syncro); -inline struct sk_buff *rtllib_authentication_req(struct rtllib_network *beacon, - struct rtllib_device *ieee, int challengelen, u8 *daddr) +static inline struct sk_buff * +rtllib_authentication_req(struct rtllib_network *beacon, + struct rtllib_device *ieee, + int challengelen, u8 *daddr) { struct sk_buff *skb; struct rtllib_authentication *auth; @@ -1130,7 +1133,7 @@ static void rtllib_resp_to_probe(struct rtllib_device *ieee, u8 *dest) } -inline int SecIsInPMKIDList(struct rtllib_device *ieee, u8 *bssid) +static inline int SecIsInPMKIDList(struct rtllib_device *ieee, u8 *bssid) { int i = 0; @@ -1146,8 +1149,9 @@ inline int SecIsInPMKIDList(struct rtllib_device *ieee, u8 *bssid) return i; } -inline struct sk_buff *rtllib_association_req(struct rtllib_network *beacon, - struct rtllib_device *ieee) +static inline struct sk_buff * +rtllib_association_req(struct rtllib_network *beacon, + struct rtllib_device *ieee) { struct sk_buff *skb; struct rtllib_assoc_request_frame *hdr; @@ -1590,7 +1594,7 @@ static void rtllib_associate_procedure_wq(void *data) rtllib_stop_scan_syncro(ieee); if (ieee->rtllib_ips_leave != NULL) ieee->rtllib_ips_leave(ieee->dev); - down(&ieee->wx_sem); + mutex_lock(&ieee->wx_mutex); if (ieee->data_hard_stop) ieee->data_hard_stop(ieee->dev); @@ -1605,14 +1609,14 @@ static void rtllib_associate_procedure_wq(void *data) __func__); if (ieee->rtllib_ips_leave_wq != NULL) ieee->rtllib_ips_leave_wq(ieee->dev); - up(&ieee->wx_sem); + mutex_unlock(&ieee->wx_mutex); return; } ieee->associate_seq = 1; rtllib_associate_step1(ieee, ieee->current_network.bssid); - up(&ieee->wx_sem); + mutex_unlock(&ieee->wx_mutex); } inline void rtllib_softmac_new_net(struct rtllib_device *ieee, @@ -2209,8 +2213,9 @@ static void rtllib_process_action(struct rtllib_device *ieee, } } -inline int rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb, - struct rtllib_rx_stats *rx_stats) +static inline int +rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb, + struct rtllib_rx_stats *rx_stats) { u16 errcode; int aid; @@ -2344,8 +2349,9 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb) } } -inline int rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb, - struct rtllib_rx_stats *rx_stats) +static inline int +rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb, + struct rtllib_rx_stats *rx_stats) { if (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) { @@ -2361,7 +2367,8 @@ inline int rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb, return 0; } -inline int rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb) +static inline int +rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb) { struct rtllib_hdr_3addr *header = (struct rtllib_hdr_3addr *) skb->data; u16 frame_ctl; @@ -2582,16 +2589,16 @@ static void rtllib_start_ibss_wq(void *data) struct rtllib_device, start_ibss_wq); /* iwconfig mode ad-hoc will schedule this and return * on the other hand this will block further iwconfig SET - * operations because of the wx_sem hold. + * operations because of the wx_mutex hold. * Anyway some most set operations set a flag to speed-up * (abort) this wq (when syncro scanning) before sleeping - * on the semaphore + * on the mutex */ if (!ieee->proto_started) { netdev_info(ieee->dev, "==========oh driver down return\n"); return; } - down(&ieee->wx_sem); + mutex_lock(&ieee->wx_mutex); if (ieee->current_network.ssid_len == 0) { strcpy(ieee->current_network.ssid, RTLLIB_DEFAULT_TX_ESSID); @@ -2703,7 +2710,7 @@ static void rtllib_start_ibss_wq(void *data) netif_carrier_on(ieee->dev); - up(&ieee->wx_sem); + mutex_unlock(&ieee->wx_mutex); } inline void rtllib_start_ibss(struct rtllib_device *ieee) @@ -2711,7 +2718,7 @@ inline void rtllib_start_ibss(struct rtllib_device *ieee) schedule_delayed_work(&ieee->start_ibss_wq, msecs_to_jiffies(150)); } -/* this is called only in user context, with wx_sem held */ +/* this is called only in user context, with wx_mutex held */ static void rtllib_start_bss(struct rtllib_device *ieee) { unsigned long flags; @@ -2773,7 +2780,7 @@ static void rtllib_associate_retry_wq(void *data) struct rtllib_device, associate_retry_wq); unsigned long flags; - down(&ieee->wx_sem); + mutex_lock(&ieee->wx_mutex); if (!ieee->proto_started) goto exit; @@ -2806,7 +2813,7 @@ static void rtllib_associate_retry_wq(void *data) ieee->beinretry = false; exit: - up(&ieee->wx_sem); + mutex_unlock(&ieee->wx_mutex); } static struct sk_buff *rtllib_get_beacon_(struct rtllib_device *ieee) @@ -2853,9 +2860,9 @@ void rtllib_softmac_stop_protocol(struct rtllib_device *ieee, u8 mesh_flag, u8 shutdown) { rtllib_stop_scan_syncro(ieee); - down(&ieee->wx_sem); + mutex_lock(&ieee->wx_mutex); rtllib_stop_protocol(ieee, shutdown); - up(&ieee->wx_sem); + mutex_unlock(&ieee->wx_mutex); } EXPORT_SYMBOL(rtllib_softmac_stop_protocol); @@ -2902,9 +2909,9 @@ void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown) void rtllib_softmac_start_protocol(struct rtllib_device *ieee, u8 mesh_flag) { - down(&ieee->wx_sem); + mutex_lock(&ieee->wx_mutex); rtllib_start_protocol(ieee); - up(&ieee->wx_sem); + mutex_unlock(&ieee->wx_mutex); } EXPORT_SYMBOL(rtllib_softmac_start_protocol); @@ -3034,9 +3041,9 @@ void rtllib_softmac_init(struct rtllib_device *ieee) INIT_WORK_RSL(&ieee->wx_sync_scan_wq, (void *)rtllib_wx_sync_scan_wq, ieee); - sema_init(&ieee->wx_sem, 1); - sema_init(&ieee->scan_sem, 1); - sema_init(&ieee->ips_sem, 1); + mutex_init(&ieee->wx_mutex); + mutex_init(&ieee->scan_mutex); + mutex_init(&ieee->ips_mutex); spin_lock_init(&ieee->mgmt_tx_lock); spin_lock_init(&ieee->beacon_lock); @@ -3049,7 +3056,7 @@ void rtllib_softmac_init(struct rtllib_device *ieee) void rtllib_softmac_free(struct rtllib_device *ieee) { - down(&ieee->wx_sem); + mutex_lock(&ieee->wx_mutex); kfree(ieee->pDot11dInfo); ieee->pDot11dInfo = NULL; del_timer_sync(&ieee->associate_timer); @@ -3064,7 +3071,7 @@ void rtllib_softmac_free(struct rtllib_device *ieee) cancel_work_sync(&ieee->associate_complete_wq); cancel_work_sync(&ieee->ips_leave_wq); cancel_work_sync(&ieee->wx_sync_scan_wq); - up(&ieee->wx_sem); + mutex_unlock(&ieee->wx_mutex); tasklet_kill(&ieee->ps_task); } @@ -3397,8 +3404,9 @@ static int rtllib_wpa_set_encryption(struct rtllib_device *ieee, return ret; } -inline struct sk_buff *rtllib_disauth_skb(struct rtllib_network *beacon, - struct rtllib_device *ieee, u16 asRsn) +static inline struct sk_buff * +rtllib_disauth_skb(struct rtllib_network *beacon, + struct rtllib_device *ieee, u16 asRsn) { struct sk_buff *skb; struct rtllib_disauth *disauth; @@ -3423,8 +3431,9 @@ inline struct sk_buff *rtllib_disauth_skb(struct rtllib_network *beacon, return skb; } -inline struct sk_buff *rtllib_disassociate_skb(struct rtllib_network *beacon, - struct rtllib_device *ieee, u16 asRsn) +static inline struct sk_buff * +rtllib_disassociate_skb(struct rtllib_network *beacon, + struct rtllib_device *ieee, u16 asRsn) { struct sk_buff *skb; struct rtllib_disassoc *disass; @@ -3499,7 +3508,7 @@ int rtllib_wpa_supplicant_ioctl(struct rtllib_device *ieee, struct iw_point *p, struct ieee_param *param; int ret = 0; - down(&ieee->wx_sem); + mutex_lock(&ieee->wx_mutex); if (p->length < sizeof(struct ieee_param) || !p->pointer) { ret = -EINVAL; @@ -3543,7 +3552,7 @@ int rtllib_wpa_supplicant_ioctl(struct rtllib_device *ieee, struct iw_point *p, kfree(param); out: - up(&ieee->wx_sem); + mutex_unlock(&ieee->wx_mutex); return ret; } |