diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/9p/client.c | 70 | ||||
| -rw-r--r-- | net/9p/protocol.c | 6 | ||||
| -rw-r--r-- | net/mac80211/key.c | 1 |
3 files changed, 73 insertions, 4 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index 0aa79faa9850..37c8da07a80b 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
| @@ -1321,7 +1321,8 @@ static int p9_client_statsize(struct p9_wstat *wst, int proto_version) | |||
| 1321 | if (wst->muid) | 1321 | if (wst->muid) |
| 1322 | ret += strlen(wst->muid); | 1322 | ret += strlen(wst->muid); |
| 1323 | 1323 | ||
| 1324 | if (proto_version == p9_proto_2000u) { | 1324 | if ((proto_version == p9_proto_2000u) || |
| 1325 | (proto_version == p9_proto_2000L)) { | ||
| 1325 | ret += 2+4+4+4; /* extension[s] n_uid[4] n_gid[4] n_muid[4] */ | 1326 | ret += 2+4+4+4; /* extension[s] n_uid[4] n_gid[4] n_muid[4] */ |
| 1326 | if (wst->extension) | 1327 | if (wst->extension) |
| 1327 | ret += strlen(wst->extension); | 1328 | ret += strlen(wst->extension); |
| @@ -1364,3 +1365,70 @@ error: | |||
| 1364 | return err; | 1365 | return err; |
| 1365 | } | 1366 | } |
| 1366 | EXPORT_SYMBOL(p9_client_wstat); | 1367 | EXPORT_SYMBOL(p9_client_wstat); |
| 1368 | |||
| 1369 | int p9_client_statfs(struct p9_fid *fid, struct p9_rstatfs *sb) | ||
| 1370 | { | ||
| 1371 | int err; | ||
| 1372 | struct p9_req_t *req; | ||
| 1373 | struct p9_client *clnt; | ||
| 1374 | |||
| 1375 | err = 0; | ||
| 1376 | clnt = fid->clnt; | ||
| 1377 | |||
| 1378 | P9_DPRINTK(P9_DEBUG_9P, ">>> TSTATFS fid %d\n", fid->fid); | ||
| 1379 | |||
| 1380 | req = p9_client_rpc(clnt, P9_TSTATFS, "d", fid->fid); | ||
| 1381 | if (IS_ERR(req)) { | ||
| 1382 | err = PTR_ERR(req); | ||
| 1383 | goto error; | ||
| 1384 | } | ||
| 1385 | |||
| 1386 | err = p9pdu_readf(req->rc, clnt->proto_version, "ddqqqqqqd", &sb->type, | ||
| 1387 | &sb->bsize, &sb->blocks, &sb->bfree, &sb->bavail, | ||
| 1388 | &sb->files, &sb->ffree, &sb->fsid, &sb->namelen); | ||
| 1389 | if (err) { | ||
| 1390 | p9pdu_dump(1, req->rc); | ||
| 1391 | p9_free_req(clnt, req); | ||
| 1392 | goto error; | ||
| 1393 | } | ||
| 1394 | |||
| 1395 | P9_DPRINTK(P9_DEBUG_9P, "<<< RSTATFS fid %d type 0x%lx bsize %ld " | ||
| 1396 | "blocks %llu bfree %llu bavail %llu files %llu ffree %llu " | ||
| 1397 | "fsid %llu namelen %ld\n", | ||
| 1398 | fid->fid, (long unsigned int)sb->type, (long int)sb->bsize, | ||
| 1399 | sb->blocks, sb->bfree, sb->bavail, sb->files, sb->ffree, | ||
| 1400 | sb->fsid, (long int)sb->namelen); | ||
| 1401 | |||
| 1402 | p9_free_req(clnt, req); | ||
| 1403 | error: | ||
| 1404 | return err; | ||
| 1405 | } | ||
| 1406 | EXPORT_SYMBOL(p9_client_statfs); | ||
| 1407 | |||
| 1408 | int p9_client_rename(struct p9_fid *fid, struct p9_fid *newdirfid, char *name) | ||
| 1409 | { | ||
| 1410 | int err; | ||
| 1411 | struct p9_req_t *req; | ||
| 1412 | struct p9_client *clnt; | ||
| 1413 | |||
| 1414 | err = 0; | ||
| 1415 | clnt = fid->clnt; | ||
| 1416 | |||
| 1417 | P9_DPRINTK(P9_DEBUG_9P, ">>> TRENAME fid %d newdirfid %d name %s\n", | ||
| 1418 | fid->fid, newdirfid->fid, name); | ||
| 1419 | |||
| 1420 | req = p9_client_rpc(clnt, P9_TRENAME, "dds", fid->fid, | ||
| 1421 | newdirfid->fid, name); | ||
| 1422 | if (IS_ERR(req)) { | ||
| 1423 | err = PTR_ERR(req); | ||
| 1424 | goto error; | ||
| 1425 | } | ||
| 1426 | |||
| 1427 | P9_DPRINTK(P9_DEBUG_9P, "<<< RRENAME fid %d\n", fid->fid); | ||
| 1428 | |||
| 1429 | p9_free_req(clnt, req); | ||
| 1430 | error: | ||
| 1431 | return err; | ||
| 1432 | } | ||
| 1433 | EXPORT_SYMBOL(p9_client_rename); | ||
| 1434 | |||
diff --git a/net/9p/protocol.c b/net/9p/protocol.c index e7541d5b0118..77d3aab4036b 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c | |||
| @@ -341,7 +341,8 @@ p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt, | |||
| 341 | } | 341 | } |
| 342 | break; | 342 | break; |
| 343 | case '?': | 343 | case '?': |
| 344 | if (proto_version != p9_proto_2000u) | 344 | if ((proto_version != p9_proto_2000u) && |
| 345 | (proto_version != p9_proto_2000L)) | ||
| 345 | return 0; | 346 | return 0; |
| 346 | break; | 347 | break; |
| 347 | default: | 348 | default: |
| @@ -488,7 +489,8 @@ p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt, | |||
| 488 | } | 489 | } |
| 489 | break; | 490 | break; |
| 490 | case '?': | 491 | case '?': |
| 491 | if (proto_version != p9_proto_2000u) | 492 | if ((proto_version != p9_proto_2000u) && |
| 493 | (proto_version != p9_proto_2000L)) | ||
| 492 | return 0; | 494 | return 0; |
| 493 | break; | 495 | break; |
| 494 | default: | 496 | default: |
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 8d4b41787dcf..e8f6e3b252d8 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
| @@ -140,7 +140,6 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key) | |||
| 140 | struct ieee80211_sub_if_data, | 140 | struct ieee80211_sub_if_data, |
| 141 | u.ap); | 141 | u.ap); |
| 142 | 142 | ||
| 143 | key->conf.ap_addr = sdata->dev->dev_addr; | ||
| 144 | ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf); | 143 | ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf); |
| 145 | 144 | ||
| 146 | if (!ret) { | 145 | if (!ret) { |
