John 17:22 does not tell us that God gave Jesus His glory. In Scripture glory is not limited to God:
Proverbs 14:28
28 In a multitude of people is a king's glory,
But in the dearth of people is a prince's ruin.
NAS
Proverbs 17:6
6 Grandchildren are the crown of old men,
And the glory of sons is their fathers.
NAS
Proverbs 20:29
29 The glory of young men is their strength,
And the honor of old men is their gray hair.
NAS
Proverbs 28:12
12 When the righteous triumph, there is great glory,
But when the wicked rise, men hide themselves.
NAS
Daniel 7:14
14 "And to Him was given dominion,
Glory and a kingdom,
That all the peoples, nations, and men of every language
Might serve Him.
His dominion is an everlasting dominion
Which will not pass away;
And His kingdom is one
Which will not be destroyed.
NAS
Hebrews 2:7-8
7 "Thou hast made him for a little while lower than the angels;
Thou hast crowned him with glory and honor,
And hast appointed him over the works of Thy hands;
8 Thou hast put all things in subjection under his feet.
NAS