diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_module.c | 32 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 2 | ||||
-rw-r--r-- | net/sunrpc/svc.c | 2 |
3 files changed, 13 insertions, 23 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_module.c b/net/ieee80211/softmac/ieee80211softmac_module.c index c308756c2f9d..6398e6e67493 100644 --- a/net/ieee80211/softmac/ieee80211softmac_module.c +++ b/net/ieee80211/softmac/ieee80211softmac_module.c | |||
@@ -456,18 +456,13 @@ void | |||
456 | ieee80211softmac_add_network_locked(struct ieee80211softmac_device *mac, | 456 | ieee80211softmac_add_network_locked(struct ieee80211softmac_device *mac, |
457 | struct ieee80211softmac_network *add_net) | 457 | struct ieee80211softmac_network *add_net) |
458 | { | 458 | { |
459 | struct list_head *list_ptr; | 459 | struct ieee80211softmac_network *softmac_net; |
460 | struct ieee80211softmac_network *softmac_net = NULL; | ||
461 | 460 | ||
462 | list_for_each(list_ptr, &mac->network_list) { | 461 | list_for_each_entry(softmac_net, &mac->network_list, list) { |
463 | softmac_net = list_entry(list_ptr, struct ieee80211softmac_network, list); | ||
464 | if(!memcmp(softmac_net->bssid, add_net->bssid, ETH_ALEN)) | 462 | if(!memcmp(softmac_net->bssid, add_net->bssid, ETH_ALEN)) |
465 | break; | 463 | return; |
466 | else | ||
467 | softmac_net = NULL; | ||
468 | } | 464 | } |
469 | if(softmac_net == NULL) | 465 | list_add(&(add_net->list), &mac->network_list); |
470 | list_add(&(add_net->list), &mac->network_list); | ||
471 | } | 466 | } |
472 | 467 | ||
473 | /* Add a network to the list, with locking */ | 468 | /* Add a network to the list, with locking */ |
@@ -506,16 +501,13 @@ struct ieee80211softmac_network * | |||
506 | ieee80211softmac_get_network_by_bssid_locked(struct ieee80211softmac_device *mac, | 501 | ieee80211softmac_get_network_by_bssid_locked(struct ieee80211softmac_device *mac, |
507 | u8 *bssid) | 502 | u8 *bssid) |
508 | { | 503 | { |
509 | struct list_head *list_ptr; | 504 | struct ieee80211softmac_network *softmac_net; |
510 | struct ieee80211softmac_network *softmac_net = NULL; | 505 | |
511 | list_for_each(list_ptr, &mac->network_list) { | 506 | list_for_each_entry(softmac_net, &mac->network_list, list) { |
512 | softmac_net = list_entry(list_ptr, struct ieee80211softmac_network, list); | ||
513 | if(!memcmp(softmac_net->bssid, bssid, ETH_ALEN)) | 507 | if(!memcmp(softmac_net->bssid, bssid, ETH_ALEN)) |
514 | break; | 508 | return softmac_net; |
515 | else | ||
516 | softmac_net = NULL; | ||
517 | } | 509 | } |
518 | return softmac_net; | 510 | return NULL; |
519 | } | 511 | } |
520 | 512 | ||
521 | /* Get a network from the list by BSSID with locking */ | 513 | /* Get a network from the list by BSSID with locking */ |
@@ -537,11 +529,9 @@ struct ieee80211softmac_network * | |||
537 | ieee80211softmac_get_network_by_essid_locked(struct ieee80211softmac_device *mac, | 529 | ieee80211softmac_get_network_by_essid_locked(struct ieee80211softmac_device *mac, |
538 | struct ieee80211softmac_essid *essid) | 530 | struct ieee80211softmac_essid *essid) |
539 | { | 531 | { |
540 | struct list_head *list_ptr; | 532 | struct ieee80211softmac_network *softmac_net; |
541 | struct ieee80211softmac_network *softmac_net = NULL; | ||
542 | 533 | ||
543 | list_for_each(list_ptr, &mac->network_list) { | 534 | list_for_each_entry(softmac_net, &mac->network_list, list) { |
544 | softmac_net = list_entry(list_ptr, struct ieee80211softmac_network, list); | ||
545 | if (softmac_net->essid.len == essid->len && | 535 | if (softmac_net->essid.len == essid->len && |
546 | !memcmp(softmac_net->essid.data, essid->data, essid->len)) | 536 | !memcmp(softmac_net->essid.data, essid->data, essid->len)) |
547 | return softmac_net; | 537 | return softmac_net; |
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 099a983797da..c094583386fd 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
@@ -853,7 +853,7 @@ unwrap_priv_data(struct svc_rqst *rqstp, struct xdr_buf *buf, u32 seq, struct gs | |||
853 | u32 priv_len, maj_stat; | 853 | u32 priv_len, maj_stat; |
854 | int pad, saved_len, remaining_len, offset; | 854 | int pad, saved_len, remaining_len, offset; |
855 | 855 | ||
856 | rqstp->rq_sendfile_ok = 0; | 856 | rqstp->rq_splice_ok = 0; |
857 | 857 | ||
858 | priv_len = svc_getnl(&buf->head[0]); | 858 | priv_len = svc_getnl(&buf->head[0]); |
859 | if (rqstp->rq_deferred) { | 859 | if (rqstp->rq_deferred) { |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index e673ef993904..55ea6df069de 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -814,7 +814,7 @@ svc_process(struct svc_rqst *rqstp) | |||
814 | rqstp->rq_res.tail[0].iov_base = NULL; | 814 | rqstp->rq_res.tail[0].iov_base = NULL; |
815 | rqstp->rq_res.tail[0].iov_len = 0; | 815 | rqstp->rq_res.tail[0].iov_len = 0; |
816 | /* Will be turned off only in gss privacy case: */ | 816 | /* Will be turned off only in gss privacy case: */ |
817 | rqstp->rq_sendfile_ok = 1; | 817 | rqstp->rq_splice_ok = 1; |
818 | /* tcp needs a space for the record length... */ | 818 | /* tcp needs a space for the record length... */ |
819 | if (rqstp->rq_prot == IPPROTO_TCP) | 819 | if (rqstp->rq_prot == IPPROTO_TCP) |
820 | svc_putnl(resv, 0); | 820 | svc_putnl(resv, 0); |