Unfortunately, the accepted answer suggests something that is wrong. A companies name is simply "Firma". That is "legal name of the business" is the true meaning of the word. Here is a citation from Wikipedia:
Eine Firma (abgekürzt: Fa.; von lat. firmare „beglaubigen, befestigen“) ist der Name, unter dem ein Kaufmann seine Geschäfte betreibt, seine Unterschriften leistet und unter dem er klagen und verklagt werden kann.
From this, it is also apparent, why we cannot use "Firma" for a law firm, at least not in Germany, as an attorney is simply not a merchant.
To be sure, we can use the word "Firma" figuratively, like in
Ich gehe in die Firma.
but this should not let us forget the literal meaning. Because, when you say "Firmenname", this is then non-sensical "name of the name of a business".